baijunde 8 місяців тому
батько
коміт
d65b95c557
2 змінених файлів з 38 додано та 16 видалено
  1. 36 14
      components/index_nav.vue
  2. 2 2
      manifest.json

+ 36 - 14
components/index_nav.vue

@@ -94,29 +94,51 @@
 			}
 		},
 		methods: {
-			jump(item) {
+			async jump(item) {
 				// 需要先报名
 				if (item.name === '团餐活动') {
-					this.$http.post('/groupmeal/gmMerchantApplicationRecord/isApply', {}).then(res => {
-						if (!res.data.result) {
-							uni.navigateTo({
-								url: '/pages/groupMeal/goods/index'
-							});
-						} else {
-							let status = res.data.result.status;
-							if (status == 1) {
+					try {
+						// 获取门店状态
+						const res1 = await this.$http.get('/groupmeal/gmMerchant/queryByMerchantId?merchantId=' + uni
+							.getStorageSync('login_user_info').merchantId);
+						const isOpen = res1.data.result;
+						// 门店是否关闭
+						if (isOpen) {
+							// 检查报名状态
+							const res2 = await this.$http.post('/groupmeal/gmMerchantApplicationRecord/isApply', {});
+							if (!res2.data.result) {
 								uni.navigateTo({
-									url: item.path
+									url: '/pages/groupMeal/goods/index'
 								});
 							} else {
-								this.modalText.content = status == 2 ? '很抱歉,您没有通过平台审核,如有疑问请联系平台客服。' :
-									'团餐活动报名审核中,请耐心等待';
-								this.$refs.myModal.onOpen();
+								let status = res2.data.result.status;
+								if (status == 1) {
+									uni.navigateTo({
+										url: item.path
+									});
+								} else {
+									this.modalText.content = status == 2 ?
+										'很抱歉,您没有通过平台审核,如有疑问请联系平台客服。' :
+										'团餐活动报名审核中,请耐心等待';
+									this.$refs.myModal.onOpen();
+								}
 							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: '团餐活动已关闭'
+							});
 						}
-					});
+					} catch (error) {
+						console.error('跳转出错:', error);
+						uni.showToast({
+							icon: 'none',
+							title: '网络错误,请重试'
+						});
+					}
 					return;
 				}
+
 				if (!item.path) return;
 				uni.navigateTo({
 					url: item.path

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "掌柜生活商户版",
     "appid" : "__UNI__E0EA6E1",
     "description" : "",
-    "versionName" : "1.1.4.2",
-    "versionCode" : 1142,
+    "versionName" : "1.1.4.4",
+    "versionCode" : 1144,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */