panhui 4 лет назад
Родитель
Сommit
fb16f1dc38
2 измененных файлов с 13 добавлено и 9 удалено
  1. 10 7
      src/views/account/Waiting.vue
  2. 3 2
      src/views/asset/Detail.vue

+ 10 - 7
src/views/account/Waiting.vue

@@ -6,7 +6,7 @@
             {{ statusInfo.sub }}
             {{ statusInfo.sub }}
         </div>
         </div>
 
 
-        <div class="btn" v-if="authStatus === '认证失败'">
+        <div class="btn" v-if="statusInfo.showBtn">
             <van-button type="primary" block plain round @click="$router.replace('/Authentication')">
             <van-button type="primary" block plain round @click="$router.replace('/Authentication')">
                 重新申请
                 重新申请
             </van-button>
             </van-button>
@@ -20,12 +20,11 @@ export default {
     computed: {
     computed: {
         ...mapState(['userInfo']),
         ...mapState(['userInfo']),
         statusInfo() {
         statusInfo() {
-            if (this.userInfo.authStatus) {
+            if (this.userInfo && this.userInfo.authStatus) {
                 return { ...this.info }[this.userInfo.authStatus];
                 return { ...this.info }[this.userInfo.authStatus];
             } else {
             } else {
                 return this.info.PENDING;
                 return this.info.PENDING;
             }
             }
-            // return this.info.PENDING;
         }
         }
     },
     },
     data() {
     data() {
@@ -34,18 +33,22 @@ export default {
                 PENDING: {
                 PENDING: {
                     img: require('@assets/shenqing_shenhezhong.png'),
                     img: require('@assets/shenqing_shenhezhong.png'),
                     title: '资料审核中',
                     title: '资料审核中',
-                    sub: '平台将于3日内完成资料审核,平台内通知审核结果'
+                    sub: '平台将于3日内完成资料审核,平台内通知审核结果',
+                    showBtn: false
                 },
                 },
                 FAIL: {
                 FAIL: {
                     img: require('@assets/shenqing_weitongguo.png'),
                     img: require('@assets/shenqing_weitongguo.png'),
                     title: '资料审核失败',
                     title: '资料审核失败',
-                    sub: '很遗憾,您的资料审核失败,请检查您填写的资料是否正确以及上传照片是否清晰'
+                    sub: '很遗憾,您的资料审核失败,请检查您填写的资料是否正确以及上传照片是否清晰',
+                    showBtn: true
                 }
                 }
             }
             }
         };
         };
     },
     },
-    mounted() {
-        this.$store.dispatch('getUserInfo');
+    beforeRouteEnter(to, from, next) {
+        next(vm => {
+            vm.$store.dispatch('getUserInfo');
+        });
     }
     }
 };
 };
 </script>
 </script>

+ 3 - 2
src/views/asset/Detail.vue

@@ -438,7 +438,7 @@ export default {
             }
             }
         },
         },
         Whisper() {
         Whisper() {
-            if (!this.init2.once) {
+            if (!this.init2.once || (this.init2.once && !this.init2.opened)) {
                 this.show2 = true;
                 this.show2 = true;
                 this.$http
                 this.$http
                     .post('/asset/usePrivilege', {
                     .post('/asset/usePrivilege', {
@@ -446,6 +446,7 @@ export default {
                         privilegeId: this.init2.id
                         privilegeId: this.init2.id
                     })
                     })
                     .then(res => {
                     .then(res => {
+                        this.init2.opened = true;
                         console.log(res);
                         console.log(res);
                     });
                     });
             }
             }
@@ -1064,7 +1065,7 @@ export default {
         }
         }
 
 
         &.opened {
         &.opened {
-            background: @bg;
+            background: @bgProductDetail;
             border: 1px solid #303133;
             border: 1px solid #303133;
             .prive2 {
             .prive2 {
                 color: @text3;
                 color: @text3;