| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- /* eslint-disable import/prefer-default-export */
- import HTTPREQUEST from "./http"
- import Taro from "@tarojs/taro";
- //登录
- export const login = (res) => {
- return new Promise(async (resolve, reject) => {
- Taro.showLoading({
- title: '登录中...',
- })
- try {
- let msg = await HTTPREQUEST.post('/managesignin', {
- mobile: res.username,
- password: res.password,
- remeber: false
- });
- if (msg.error.length === 0) {
- Taro.setStorageSync('token', msg.token);
- Taro.setStorageSync('userInfor', msg.data);
- Taro.hideLoading();
- Taro.showToast({ title: '登录成功', icon: 'success' })
- resolve(msg);
- } else {
- Taro.hideLoading();
- Taro.showToast({ title: msg.error[0].message, icon: 'none' })
- reject();
- }
- } catch (err) {
- Taro.showToast({ title: '系统错误,请稍后重试', icon: 'none' });
- Taro.hideLoading();
- reject();
- }
- })
- }
- // 查询客户订单
- export const getOrderByUid = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/release/selectOrderByUid', postData)
- }
- export const getUserByName = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/customer/getUserByNames', postData)
- }
- export const getadminByName = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/customer/listAdminByName', postData)
- }
- export const addPublicRelease = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/release/addPublicRelease', postData)
- }
- export const setOpenId = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/setOpenId', postData)
- }
- //获取最近打卡信息
- export const getPunchClockInfo = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/release/getMyNewPublic', postData)
- }
- export const getPublicReleaseList = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/release/listPublicRelease', postData)
- }
- export const publicReleaseClockIn = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/release/publicReleaseClockIn', postData)
- }
- // 公出审批
- export const examinePublicRelease = (isSuperior = 1, postData = {}) => {
- return HTTPREQUEST.post(isSuperior == 1 ? '/api/admin/release/examinePublicRelease' : isSuperior == 2 ? '/api/admin/release/marketersExamine' : '/api/admin/release/techExamine', postData)
- }
- //获取外出公出详情
- export const getReleasetDails = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/release/dtails', postData)
- }
- //获取公出日志
- export const getListPublicReleaseLog = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/release/listPublicReleaseLog', postData)
- }
- //修改公出申请
- export const updatePublicRelease = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/release/updatePublicRelease', postData)
- }
- //外出未读
- export const getPublicReleaseUnread = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/notice/publicReleaseUnread', postData)
- }
- //获取知道部门作息时间
- export const getWorkingHours = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/department/workingHours/get', postData)
- }
- //获取部门作息列表
- export const getWorkingHoursList = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/department/workingHours/list', postData)
- }
- //获取微信参数
- export const getWxConfig = (postData = {}) => {
- return HTTPREQUEST.get('/open/getWxConfig', postData)
- }
- //测试
- export const test = (postData = {}) => {
- return HTTPREQUEST.get('/open/getVCode', postData)
- }
- //技术协单驳回
- export const techReject = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/release/techReject', postData)
- }
- //新增协单助力
- export const addAssistant = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/release/addAssistant', postData)
- }
- //删除协单助力
- export const deleteAssistant = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/release/deleteAssistant', postData)
- }
- //修改公出地址
- export const updateLocation = (postData = {}) => {
- return HTTPREQUEST.post('/api/admin/release/updateLocation', postData)
- }
- // 技术公出发起情况
- export const checkOrderNoDuration = (postData = {}) => {
- return HTTPREQUEST.get('/api/admin/release/checkOrderNoDuration', postData)
- }
|