Browse Source

Merge branch 'lin_增值服务' of ssh://gogs.zfire.top:2222/zfire-front/zfire-newmall-admin into develop

linwenxin 1 year ago
parent
commit
aaaf876ccb
1 changed files with 10 additions and 10 deletions
  1. 10 10
      src/layout/components/AppMain.vue

+ 10 - 10
src/layout/components/AppMain.vue

@@ -17,7 +17,7 @@ export default {
   data() {
     return {
       key: 0,
-      nameKey:""
+      nameKey: ""
     }
   },
   computed: {
@@ -31,21 +31,21 @@ export default {
       this.setNameKey()
     },
   },
-  created(){
+  created() {
     this.setNameKey()
   },
-  methods:{
-    setNameKey(){
-      var { name,params } = this.$route
-      var {pageType,pageCode,pagePam} =params
+  methods: {
+    setNameKey() {
+      var { name, params } = this.$route
+      var { pageType, pageCode, pagePam } = params
       var item = this.$store.state.tagsView.visitedViews.find(item => {
         return !!~item?.nameKey.indexOf(`${name}_${pageType}_${pageCode}_${pagePam}`)
       })
-      if(!item){
-        setTimeout(()=>{
+      if (!item) {
+        setTimeout(() => {
           this.setNameKey()
-        },50)
-      }else{
+        }, 50)
+      } else {
         this.nameKey = item.nameKey
       }
     }