Browse Source

处理ERP跳转问题

Administrator 7 years ago
parent
commit
fe73ad62b7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      plugins/mixin.js

+ 4 - 1
plugins/mixin.js

@@ -34,7 +34,10 @@ Vue.mixin({
     // 判断是否erp嵌入
     isInFrame () {
       if (this.$route.query.type === 'erp') {
-        this.$store.commit('option/ADD_COOKIES', 'type=erp;')
+        if (this.$store.state.option.cookies.indexOf('type=erp') > -1) {
+          return true
+        }
+        this.$store.commit('option/ADD_COOKIES', ';type=erp')
         return true
       } else {
         let cookies = this.$store.state.option.cookies