宋飞扬 há 1 ano atrás
pai
commit
893614f5d2
1 ficheiros alterados com 4 adições e 4 exclusões
  1. 4 4
      src/pages/merchant/mine/index.vue

+ 4 - 4
src/pages/merchant/mine/index.vue

@@ -15,7 +15,7 @@
           <image
             :src="merchant.logo"
             style="width: 140rpx; height: 140rpx; border-radius: 50%"
-            v-if="merchant.logo"
+            v-if="merchant && merchant.logo"
           />
           <image
             src="@/static/QR57a.jpg"
@@ -24,8 +24,8 @@
           />
         </view>
         <view class="userName">
-          <view> {{ merchant.name || '--' }}</view>
-          <text> +86 {{ merchant.mobile || '--' }}</text>
+          <view v-if="merchant && merchant.name"> {{ merchant.name || '--' }}</view>
+          <text v-if="merchant && merchant.mobile"> +86 {{ merchant.mobile || '--' }}</text>
         </view>
         <view
           class="status"
@@ -177,7 +177,7 @@ export default {
     this.merchant = merchant;
 
     // 判断是否存在商家id,是否需要认证
-    if (merchant.id) {
+    if (merchant && merchant.id) {
       this.showAut = false;
     } else {
       this.showAut = true;