|
|
|
@ -258,7 +258,7 @@ |
|
|
|
getBusinessStatus(){ |
|
|
|
this.NB.sendRequest("/app/shoptakeaway/getByShopId", { |
|
|
|
shopId: uni.getStorageSync('shopId') |
|
|
|
}, true, 'GET', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
}, false, 'GET', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.shop = res.result |
|
|
|
this.shop.shopIcon = uni.getStorageSync('shopIcon') |
|
|
|
@ -299,12 +299,18 @@ |
|
|
|
that.NB.sendRequest("/app/shoptakeaway/update", { |
|
|
|
shopId: uni.getStorageSync('shopId'), |
|
|
|
status:that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' |
|
|
|
}, true, 'post', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
}, false, 'post', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
uni.showToast("更改成功") |
|
|
|
uni.showToast({ |
|
|
|
title: '更改成功', |
|
|
|
icon:'none' |
|
|
|
}); |
|
|
|
that.businessStatus = that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' |
|
|
|
} else { |
|
|
|
that.tui.toast(res.message) |
|
|
|
uni.showToast({ |
|
|
|
title: res.message, |
|
|
|
icon:'none' |
|
|
|
}); |
|
|
|
} |
|
|
|
uni.hideLoading() |
|
|
|
}).catch((res) => {}) |
|
|
|
@ -355,7 +361,7 @@ |
|
|
|
}, |
|
|
|
getData(){ |
|
|
|
let that = this; |
|
|
|
that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, true, 'GET', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, false, 'GET', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.shopData = res.result |
|
|
|
for(let i=0;i<this.shopData.orderStatusCount.length;i++){ |
|
|
|
@ -393,7 +399,7 @@ |
|
|
|
if (res1.confirm) { |
|
|
|
that.NB.sendRequest("/mall/order/complete", { |
|
|
|
orderId: productId |
|
|
|
}, true, 'post', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
}, false, 'post', 'application/x-www-form-urlencoded').then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
uni.showToast({ |
|
|
|
title: '核销成功', |
|
|
|
|