DaMowang vor 2 Jahren
Ursprung
Commit
3e3becbc38
3 geänderte Dateien mit 36 neuen und 49 gelöschten Zeilen
  1. 8 8
      src/pages.json
  2. 24 39
      src/pages/my/index.vue
  3. 4 2
      src/pages/settledMerchant/index.vue

+ 8 - 8
src/pages.json

@@ -15,7 +15,7 @@
 		{
 			"path": "pages/settledMerchant/index",
 			"style": {
-				"navigationBarTitleText": "快捷买单"
+				"navigationBarTitleText": "本地生活"
 			}
 		},
 		{
@@ -522,12 +522,12 @@
 			]
 		}
 	],
-	"preloadRule": {
-		"pages/index/index": {
-			"network": "all",
-			"packages": [ "pagesB", "pagesC" ]
-		}
-	},
+	// "preloadRule": {
+	// 	"pages/index/index": {
+	// 		"network": "all",
+	// 		"packages": [ "pagesB", "pagesC" ]
+	// 	}
+	// },
 	"tabBar": {
 		"color": "#999",
 		"selectedColor": "#18bb88",
@@ -544,7 +544,7 @@
 				"pagePath": "pages/settledMerchant/index",
 				"iconPath": "static/nav/local_.png",
 				"selectedIconPath": "static/nav/local.png",
-				"text": "快捷买单"
+				"text": "本地生活"
 			},
 			{
 				"pagePath": "pages/sign/index",

+ 24 - 39
src/pages/my/index.vue

@@ -123,26 +123,26 @@
                     </navigator>
                 </view>
             </view>
-            <view class="fun mar_t30">
+            <view class="fun mar_t30" v-if="isBusinessCenter">
                 <view class="fun_title">商家中心</view>
                 <view class="fun_con mar_t50 flex_r flex_ac">
-                    <navigator class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myShop" hover-class="none">
+                    <navigator v-if="merchantSetlet.shop" class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myShop" hover-class="none">
                         <image class="fun_img" src="/static/my/store.png"></image>
                         <view class="fun_text">我的店铺</view>
                     </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/my/addShop" hover-class="none">
+                    <navigator v-if="merchantSetlet.settled" class="fun_list flex_c flex_ac" url="/pagesB/my/addShop" hover-class="none">
                         <image class="fun_img" src="/static/my/merchant.png"></image>
                         <view class="fun_text">商家入驻</view>
                     </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myBusiness" hover-class="none">
+                    <navigator v-if="merchantSetlet.settled" class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myBusiness" hover-class="none">
                         <image class="fun_img" src="/static/my/merchant2.png"></image>
                         <view class="fun_text">我的商家</view>
                     </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/business" hover-class="none">
+                    <navigator v-if="merchantSetlet.region" class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/business" hover-class="none">
                         <image class="fun_img" src="/static/my/merchant3.png"></image>
                         <view class="fun_text">区域商家</view>
                     </navigator>
-                    <navigator class="fun_list flex_c flex_ac" hover-class="none">
+                    <navigator v-if="false" class="fun_list flex_c flex_ac" hover-class="none">
                         <image class="fun_img" src="/static/my/operator.png"></image>
                         <view class="fun_text">申请运营商</view>
                     </navigator>
@@ -215,9 +215,10 @@ export default {
             userinfo: {}, // 获取用户信息
             unid: "",
             invited: "",
-            allChaYou: "",
             isAuthentication: uni.getStorageSync("isAuthentication"), //是否开启实名模块
             localInfo: {}, //数智生活信息
+            merchantSetlet: {},
+            isBusinessCenter: false,
         };
     },
     onLoad(options) {
@@ -229,8 +230,8 @@ export default {
         let token = uni.getStorageSync("token");
         if (!token) this.login()
         else {
+            this.merchantSet();
             this.getuserInfo();
-            this.getchayou(); //获取茶友
         }
     },
     methods: {
@@ -294,14 +295,10 @@ export default {
         goToAutonym() {
             this.goto("/pages/autonym-submit/index")
         },
-        // 关闭实名信息 提示
+        // 关闭实名信息提示
         closeAuto() {
             this.isShiMing = false;
         },
-        // 未开放提示信息
-        SetHint() {
-            this.goto('/pages/agreement/index', { tit: '用户身份及权益', type: 24 })
-        },
         // 跳转到分享页面
         getImgPage() {
             if (this.isAuthentication) {
@@ -336,24 +333,6 @@ export default {
                 error: (e) => {},
             });
         },
-        // 跳转到用户设置页面
-        getToSetting: function() {
-            uni.navigateTo({
-                url: "/pages/setting/index",
-            });
-        },
-        // 跳转到拼豆页面
-        getToBean: function() {
-            uni.navigateTo({
-                url: "/pages/bean-info/index",
-            });
-        },
-        // 跳转到拼团金页面
-        getToAccMoney: function() {
-            uni.navigateTo({
-                url: "/pages/my-acc-money/my-acc-money",
-            });
-        },
         // 点击头像
         upheadimg() {
             let that = this;
@@ -362,14 +341,6 @@ export default {
                 current: 0,
             });
         },
-        // 获取茶友
-        getchayou() {
-            post("v1/my/chayou").then((res) => {
-                if (res.code === 0) {
-                    this.allChaYou = res.data.data.below + res.data.data.lower_level;
-                }
-            });
-        },
         activation() {
             this.$refs.activation.open()
         },
@@ -383,6 +354,20 @@ export default {
                 default:
                     return ""
             }
+        },
+        // 商家中心权限
+        merchantSet(){
+            post("v1/merchant/settled").then((res) => {
+                if (res.code === 0) {
+                    this.merchantSetlet = res.data
+                    for (const i in res.data) {
+                        if(res.data[i]) {
+                            this.isBusinessCenter = true
+                            return
+                        }
+                    }
+                }
+            });
         }
     },
 };

+ 4 - 2
src/pages/settledMerchant/index.vue

@@ -24,17 +24,19 @@
                 </div>
             </div>
         </div>
+        <not-goods v-else textStr="暂无附近商家"></not-goods>
         <!-- 城市选择 -->
         <h-address @select="selectaddress" :visible.sync="showAddress" />
     </div>
 </template>
 <script>
 import hAddress from "@/components/h-address/address.vue"; //城市选择
+import notGoods from "@/components/not-goods/index.vue";
 import { post } from "@/request/api.js";
 export default {
     name: "settledMerchantList",
     props: {},
-    components: { hAddress },
+    components: { hAddress,notGoods },
     data() {
         return {
             list: [],
@@ -111,7 +113,7 @@ export default {
 <style scoped lang='scss'>
 .search-box {
     width: 100%;
-    padding: 10rpx 32rpx;
+    padding: 30rpx 32rpx 0;
 
     .district {
         font-size: 32rpx;