|
|
|
@ -18,8 +18,8 @@ |
|
|
|
<view class="title22"> |
|
|
|
老王的店 |
|
|
|
</view> |
|
|
|
<view class="title33"> |
|
|
|
暂停营业 |
|
|
|
<view class="title33" @tap="updateStatus"> |
|
|
|
{{businessStatus == '1'?'暂停营业':'正常营业'}} |
|
|
|
<uni-icons type="right" size="12"></uni-icons> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -30,7 +30,7 @@ |
|
|
|
</view> |
|
|
|
<view class="order2"> |
|
|
|
<view class="order22"> |
|
|
|
<view class="order33"> |
|
|
|
<view class="order33" @tap="goDetail('db',0)"> |
|
|
|
<view class="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
@ -38,7 +38,7 @@ |
|
|
|
待接单 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="order33"> |
|
|
|
<view class="order33" @tap="goDetail('db',1)"> |
|
|
|
<view class="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
@ -46,7 +46,7 @@ |
|
|
|
待发货 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="order33"> |
|
|
|
<view class="order33" @tap="goDetail('db',2)"> |
|
|
|
<view class="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
@ -56,7 +56,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="order22"> |
|
|
|
<view class="order33"> |
|
|
|
<view class="order33" @tap="goDetail('db',3)"> |
|
|
|
<view class="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
@ -64,7 +64,7 @@ |
|
|
|
待顾客自取 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="order33"> |
|
|
|
<view class="order33" @tap="goDetail('db',4)"> |
|
|
|
<view class="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
@ -72,7 +72,7 @@ |
|
|
|
待退款/售后 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="order33"> |
|
|
|
<view class="order33" @tap="goDetail('db',5)"> |
|
|
|
<view class="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
@ -88,7 +88,7 @@ |
|
|
|
<view style="flex: 1;"> |
|
|
|
今日实时数据 |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view @tap="goDetail('tj')"> |
|
|
|
更多 |
|
|
|
<uni-icons type="right" size="12"></uni-icons> |
|
|
|
</view> |
|
|
|
@ -174,19 +174,64 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
menuButtonInfo: {} |
|
|
|
menuButtonInfo: {}, |
|
|
|
businessStatus:1, |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
|
|
|
|
this.getBusinessStatus() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//获取营业状态 |
|
|
|
getBusinessStatus(){ |
|
|
|
this.tui.request("/app/shoptakeaway/getByShopId", "GET", { |
|
|
|
shopId: uni.getStorageSync('shopId') |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.businessStatus = res.result.status |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
uni.hideLoading() |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
//更改营业状态 |
|
|
|
updateStatus(){ |
|
|
|
let that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '要更改营业状态吗?', |
|
|
|
success: function (res1) { |
|
|
|
if (res1.confirm) { |
|
|
|
that.tui.request("/app/shoptakeaway/update", "post", { |
|
|
|
shopId: uni.getStorageSync('shopId'), |
|
|
|
status:that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
uni.showToast("更改成功") |
|
|
|
that.businessStatus = that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' |
|
|
|
} else { |
|
|
|
that.tui.toast(res.message) |
|
|
|
} |
|
|
|
uni.hideLoading() |
|
|
|
}).catch((res) => {}) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
goDetail(type) { |
|
|
|
let url = '' |
|
|
|
switch (type) { |
|
|
|
case 'tj': |
|
|
|
url = '/package1/myCenter/dataStatistics' |
|
|
|
break; |
|
|
|
case 'db': |
|
|
|
url = '/package1/order/orderDetail' |
|
|
|
break; |
|
|
|
case 'sp': |
|
|
|
url = '/package1/myCenter/goodsList' |
|
|
|
break; |
|
|
|
@ -194,13 +239,13 @@ |
|
|
|
url = '' |
|
|
|
break; |
|
|
|
case 'dd': |
|
|
|
url = '' |
|
|
|
url = '/package1/myCenter/shopOrderList' |
|
|
|
break; |
|
|
|
case 'zd': |
|
|
|
url = '' |
|
|
|
url = '/package1/myCenter/shopBill' |
|
|
|
break; |
|
|
|
case 'pj': |
|
|
|
url = '/package1/group/shopEvaluate' |
|
|
|
url = '/package1/group/shopEvaluate?item=' + JSON.stringify(uni.getStorageSync('schoolShop')) |
|
|
|
break; |
|
|
|
default: |
|
|
|
} |
|
|
|
|