Browse Source

商家入驻

huangb 7 years ago
parent
commit
7184e40609
2 changed files with 32 additions and 1 deletions
  1. 32 1
      components/mobile/Home.vue
  2. BIN
      static/images/mobile/@2x/home/store-into.png

+ 32 - 1
components/mobile/Home.vue

@@ -69,6 +69,12 @@
             <span>品牌墙</span>
           </nuxt-link>
         </li>
+        <li>
+          <a @click="goOpenStoreApply">
+            <img src="/images/mobile/@2x/home/store-into.png" alt="">
+            <span>商家入驻</span>
+          </a>
+        </li>
       </ul>
 
       <div class="display_card">
@@ -300,6 +306,31 @@
         this.page++
         this.isSearchSearchingMore = true
         this.reloadData()
+      },
+      // 商家入驻
+      goOpenStoreApply: function () {
+        if (this.user.logged) {
+          if (this.user.data.enterprise.uu) {
+            if (this.user.data.enterprise.isVendor === 313) {
+              this.$http.get('/basic/vendor/transactionInfo').then(response => {
+                if (response.data.isOpenStore) {
+                  window.location.href = '/mobile/user/storeinfo'
+                } else {
+                  window.location.href = '/mobile/store'
+                }
+              }, err => {
+                this.$message.error('获取开店信息失败')
+                console.log(err)
+              })
+            } else {
+              this.$router.push('/mobile/store')
+            }
+          } else {
+            this.$router.push('/mobile/store/register')
+          }
+        } else {
+          this.login()
+        }
       }
     },
     mounted() {
@@ -449,7 +480,7 @@
       li {
         position: relative;
         display: inline-block;
-        width: 25%;
+        width: 20%;
         text-align: center;
         float: left;
         height: 1.56rem;

BIN
static/images/mobile/@2x/home/store-into.png