增加部分接口
This commit is contained in:
@@ -126,15 +126,12 @@ function commonsProcess(showLoading, httpReqCallback) {
|
|||||||
|
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
if(res.status==401||res.status==400){
|
if(res.status==401||res.status==400){
|
||||||
storageManage.token(null, true)
|
// storageManage.token(null, true)
|
||||||
infoBox.showErrorToast('请登录').then(() => {
|
infoBox.showErrorToast(res.message||'状态码400').then(() => {
|
||||||
go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(res.status==500){
|
if(res.status==500){
|
||||||
storageManage.token(null, true)
|
infoBox.showErrorToast(res.message||'服务器异常').then(() => {
|
||||||
infoBox.showErrorToast('请登录').then(() => {
|
|
||||||
go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// if(res&&res.msg){
|
// if(res&&res.msg){
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// 桌台管理
|
// 桌台管理
|
||||||
import http from './http.js'
|
import http from './http.js'
|
||||||
const request=http.request
|
const request = http.request
|
||||||
import $API from '@/http/classApi.js'
|
import $API from '@/http/classApi.js'
|
||||||
import appConfig from '@/config/appConfig.js'
|
import appConfig from '@/config/appConfig.js'
|
||||||
import {
|
import {
|
||||||
@@ -9,9 +9,9 @@ import {
|
|||||||
import infoBox from '@/commons/utils/infoBox.js'
|
import infoBox from '@/commons/utils/infoBox.js'
|
||||||
|
|
||||||
/* 台桌区域 */
|
/* 台桌区域 */
|
||||||
export const $tableArea=new $API('/api/tbShopArea',http.req)
|
export const $tableArea = new $API('/api/tbShopArea', http.req)
|
||||||
/* 台桌 */
|
/* 台桌 */
|
||||||
export const $table=new $API('/api/tbShopTable',http.req)
|
export const $table = new $API('/api/tbShopTable', http.req)
|
||||||
/* 绑定 */
|
/* 绑定 */
|
||||||
// export const $bind=new $API('/api/tbShopTable/bind',http.req)
|
// export const $bind=new $API('/api/tbShopTable/bind',http.req)
|
||||||
export function $bind(data) {
|
export function $bind(data) {
|
||||||
@@ -23,4 +23,28 @@ export function $bind(data) {
|
|||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
//获取台桌详情状态
|
||||||
|
export function $returnTableDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/tbShopTable/state',
|
||||||
|
method: "get",
|
||||||
|
params: {
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 选择台桌
|
||||||
|
export function $choseTable(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/place/choseTable',
|
||||||
|
method: "put",
|
||||||
|
data: {
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user