Kaynağa Gözat

Merge pull request #162 from John-Hong/John/release-2.11.0/KIP-10689

未登录优化
Tron 2 yıl önce
ebeveyn
işleme
73a3fe32ab

+ 6 - 0
src/pages/parkingFee/mixins/vehicleManagement.js

@@ -33,6 +33,9 @@ export default {
       mallid: (state) => state.mallId,
       mobile: (state) => state.mobile,
     }),
+    isNoLogin() {
+      return JSON.stringify(this.member) === '{}'
+    }
   },
   data() {
     return {
@@ -114,10 +117,12 @@ export default {
   methods: {
     // 添加车牌号
     toAdd() {
+      if(this.isNoLogin) return
       this.$router.push({ path: 'vehicleAddOrEdit' });
     },
     // 跳转支付页面
     toPay(carno) {
+      if(this.isNoLogin) return
       this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
         name: 'parkingFeeDetail',
       });
@@ -193,6 +198,7 @@ export default {
     },
     // 编辑
     toEdit(item) {
+      if(this.isNoLogin) return
       if (!item) {
         return;
       }