From 292b1857ec885633cb2152ebe256ed7796392eb7 Mon Sep 17 00:00:00 2001
From: tianyi <13521030702@163.com>
Date: Fri, 27 Mar 2026 18:02:54 +0800
Subject: [PATCH] 11
---
package1/myCenter/merchantCenter.vue | 73 ++++++++++++++++++++++------
1 file changed, 59 insertions(+), 14 deletions(-)
diff --git a/package1/myCenter/merchantCenter.vue b/package1/myCenter/merchantCenter.vue
index a6e6b4c..53480ec 100644
--- a/package1/myCenter/merchantCenter.vue
+++ b/package1/myCenter/merchantCenter.vue
@@ -18,8 +18,8 @@
老王的店
-
- 暂停营业
+
+ {{businessStatus == '1'?'暂停营业':'正常营业'}}
@@ -30,7 +30,7 @@
-
+
0
@@ -38,7 +38,7 @@
待接单
-
+
0
@@ -46,7 +46,7 @@
待发货
-
+
0
@@ -56,7 +56,7 @@
-
+
0
@@ -64,7 +64,7 @@
待顾客自取
-
+
0
@@ -72,7 +72,7 @@
待退款/售后
-
+
0
@@ -88,7 +88,7 @@
今日实时数据
-
+
更多
@@ -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:
}