Merge branch 'dwb' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into test
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
* 因为两个小程序接口不一致,餐饮商超商家端的接口使用该http
|
||||
*/
|
||||
import useStorage from '@/commons/utils/useStroage.js'
|
||||
|
||||
import go from '@/commons/utils/go.js';
|
||||
// const baseURL = 'http://192.168.2.128:9000/cashierService'
|
||||
// const baseURL = 'http://192.168.2.41:9888/cashierService'
|
||||
let baseURL = 'https://wxcashiertest.sxczgkj.cn/cashierService'
|
||||
// #ifdef H5
|
||||
baseURL = '/shopApi'
|
||||
baseURL = '/ysk'
|
||||
// #endif
|
||||
// const baseURL = 'https://cashier.sxczgkj.cn/cashierService'
|
||||
export default function(api = '', data = {}, method = 'GET') {
|
||||
@@ -20,7 +20,8 @@ export default function(api = '', data = {}, method = 'GET') {
|
||||
'environment': 'wx',
|
||||
'type': 'ios',
|
||||
'version': '1.0.0',
|
||||
'token': useStorage.get('token'),
|
||||
'token': useStorage.get('iToken'),
|
||||
'Authorization': useStorage.get('iToken'),
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
success: res => {
|
||||
@@ -31,6 +32,11 @@ export default function(api = '', data = {}, method = 'GET') {
|
||||
icon: 'none',
|
||||
"title": res.data.msg
|
||||
})
|
||||
if(res.data.code==-4){
|
||||
setTimeout(()=>{
|
||||
go.to('PAGES_LOGIN', {}, 'redirect')
|
||||
},2000)
|
||||
}
|
||||
reject(res.data.msg)
|
||||
}
|
||||
},
|
||||
|
||||
69
http/yskApi/requestAll.js
Normal file
69
http/yskApi/requestAll.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import http from './http.js'
|
||||
const request = http.request
|
||||
// 销售总会list
|
||||
export function summaryTrade(data) {
|
||||
return request({
|
||||
url: '/api/summary/trade',
|
||||
method: 'post',
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
// 销售排行榜
|
||||
export function dateProduct(params) {
|
||||
return request({
|
||||
url: '/api/summary/dateProduct',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 桌型列表
|
||||
export function callTable(params) {
|
||||
return request({
|
||||
url: '/callTable',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 排队列表
|
||||
export function callTablequeue(params) {
|
||||
return request({
|
||||
url: '/callTable/queue',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 取号
|
||||
export function callTabletakeNumber(data) {
|
||||
return request({
|
||||
url: '/callTable/takeNumber',
|
||||
method: 'post',
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function callTablecallRecord(params) {
|
||||
return request({
|
||||
url: '/callTable/callRecord',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function callTableput(data) {
|
||||
return request({
|
||||
url: `/callTable/updateState`,
|
||||
method: "put",
|
||||
data
|
||||
});
|
||||
}
|
||||
// 叫号
|
||||
export function callTablecall(data) {
|
||||
return request({
|
||||
url: `/callTable/call`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user