Ver Fonte

申请店铺入口

yangc há 7 anos atrás
pai
commit
426e296675

+ 4 - 4
pages/mobile/user/enterpriseinfo.vue

@@ -371,10 +371,10 @@
         this.timeoutCount++
       },
       updateInfo() {
-        if (!this.isAdmin) {
-          this.setRemindText('您无该模块的编辑权限,请联系企业管理员进行编辑维护!')
-          return
-        }
+//        if (!this.isAdmin) {
+//          this.setRemindText('您无该模块的编辑权限,请联系企业管理员进行编辑维护!')
+//          return
+//        }
         this.storeState = 'update'
         this.Islook = true
         this.hidelook = true

+ 23 - 10
pages/mobile/user/index.vue

@@ -25,13 +25,20 @@
         <i class="iconfont icon-xiangyou"></i>
         <span class="l-right">{{currentEnName}}</span>
       </div>
-      <div class="line" @click="go('/mobile/user/storeinfo')">
+      <div class="line" @click="go('/mobile/user/storeinfo')" v-if="storeStatus.uuid">
         <div class="img-wrap">
           <img src="/images/mobile/user/icon_02.png" alt="">
         </div>
         <span>店铺信息</span>
         <i class="iconfont icon-xiangyou"></i>
       </div>
+      <div class="line" @click="go('/mobile/user/storeinfo')" v-else>
+        <div class="img-wrap">
+          <img src="/images/mobile/user/apply-store.png" alt="">
+        </div>
+        <span>开店申请</span>
+        <i class="iconfont icon-xiangyou"></i>
+      </div>
       <div class="line block-line" @click="go('/mobile/user/enterpriseinfo')">
         <div class="img-wrap">
           <img src="/images/mobile/user/icon_03.png" alt="">
@@ -108,11 +115,22 @@
     components: {
       RemindBox
     },
+    fetch ({store}) {
+      return Promise.all([
+        store.dispatch('loadStoreStatus', {op: 'check'})
+      ])
+    },
+    computed: {
+      storeStatus () {
+        return this.$store.state.option.storeStatus.data
+      }
+    },
     methods: {
       switchEnterprise(en) {
         this.$http.get(`/user/authentication/${en.uu || 0}`).then(() => {
           this.$store.dispatch('loadUserInfo').then(() => {
             this.showLogin = false
+            this.$store.dispatch('loadStoreStatus', {op: 'check'})
           })
         })
       },
@@ -130,16 +148,11 @@
       },
       go: function (url) {
         if (url === '/mobile/user/storeinfo') {
-          this.$http.get('/store-service/stores', {params: {op: 'check'}}).then(res => {
-            if (res.data.uuid) {
-              this.$router.push(url)
-            } else {
-              this.setRemindText('请先前往pc端申请开店')
-            }
-          }, err => {
-            console.log(err)
+          if (this.storeStatus.uuid) {
+            this.$router.push(url)
+          } else {
             this.setRemindText('请先前往pc端申请开店')
-          })
+          }
         } else if (!this.user.data.enterprise.uu || this.user.data.enterprise.isVendor !== 313) {
           this.setRemindText('请先前往pc端完善企业信息')
         } else {

+ 4 - 4
pages/mobile/user/storeinfo.vue

@@ -231,10 +231,10 @@
         this.timeoutCount++
       },
       updateInfo() {
-        if (!this.isAdmin) {
-          this.setRemindText('您无该模块的编辑权限,请联系企业管理员进行编辑维护!')
-          return
-        }
+//        if (!this.isAdmin) {
+//          this.setRemindText('您无该模块的编辑权限,请联系企业管理员进行编辑维护!')
+//          return
+//        }
         this.storeState = 'update'
         this.Islook = true
         this.hidelook = true

BIN
static/images/mobile/user/apply-store.png