tianyi 3 weeks ago
parent
commit
292b1857ec
  1. 73
      package1/myCenter/merchantCenter.vue

73
package1/myCenter/merchantCenter.vue

@ -18,8 +18,8 @@
<view class="title22"> <view class="title22">
老王的店 老王的店
</view> </view>
<view class="title33"> <view class="title33" @tap="updateStatus">
暂停营业 {{businessStatus == '1'?'暂停营业':'正常营业'}}
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
</view> </view>
@ -30,7 +30,7 @@
</view> </view>
<view class="order2"> <view class="order2">
<view class="order22"> <view class="order22">
<view class="order33"> <view class="order33" @tap="goDetail('db',0)">
<view class="order44"> <view class="order44">
0 0
</view> </view>
@ -38,7 +38,7 @@
待接单 待接单
</view> </view>
</view> </view>
<view class="order33"> <view class="order33" @tap="goDetail('db',1)">
<view class="order44"> <view class="order44">
0 0
</view> </view>
@ -46,7 +46,7 @@
待发货 待发货
</view> </view>
</view> </view>
<view class="order33"> <view class="order33" @tap="goDetail('db',2)">
<view class="order44"> <view class="order44">
0 0
</view> </view>
@ -56,7 +56,7 @@
</view> </view>
</view> </view>
<view class="order22"> <view class="order22">
<view class="order33"> <view class="order33" @tap="goDetail('db',3)">
<view class="order44"> <view class="order44">
0 0
</view> </view>
@ -64,7 +64,7 @@
待顾客自取 待顾客自取
</view> </view>
</view> </view>
<view class="order33"> <view class="order33" @tap="goDetail('db',4)">
<view class="order44"> <view class="order44">
0 0
</view> </view>
@ -72,7 +72,7 @@
待退款/售后 待退款/售后
</view> </view>
</view> </view>
<view class="order33"> <view class="order33" @tap="goDetail('db',5)">
<view class="order44"> <view class="order44">
0 0
</view> </view>
@ -88,7 +88,7 @@
<view style="flex: 1;"> <view style="flex: 1;">
今日实时数据 今日实时数据
</view> </view>
<view> <view @tap="goDetail('tj')">
更多 更多
<uni-icons type="right" size="12"></uni-icons> <uni-icons type="right" size="12"></uni-icons>
</view> </view>
@ -174,19 +174,64 @@
export default { export default {
data() { data() {
return { return {
menuButtonInfo: {} menuButtonInfo: {},
businessStatus:1,
} }
}, },
onShow() { onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
}, },
onLoad(option) { onLoad(option) {
this.getBusinessStatus()
}, },
methods: { 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) { goDetail(type) {
let url = '' let url = ''
switch (type) { switch (type) {
case 'tj':
url = '/package1/myCenter/dataStatistics'
break;
case 'db':
url = '/package1/order/orderDetail'
break;
case 'sp': case 'sp':
url = '/package1/myCenter/goodsList' url = '/package1/myCenter/goodsList'
break; break;
@ -194,13 +239,13 @@
url = '' url = ''
break; break;
case 'dd': case 'dd':
url = '' url = '/package1/myCenter/shopOrderList'
break; break;
case 'zd': case 'zd':
url = '' url = '/package1/myCenter/shopBill'
break; break;
case 'pj': case 'pj':
url = '/package1/group/shopEvaluate' url = '/package1/group/shopEvaluate?item=' + JSON.stringify(uni.getStorageSync('schoolShop'))
break; break;
default: default:
} }

Loading…
Cancel
Save