浏览代码

1.在未登录的情况下,点击立即入驻,进入前端登录代理页面,而不是跳转到后端登录。
2.店铺页面店铺信息模块,地址的显示正式、测试环境兼容。

yangc 8 年之前
父节点
当前提交
b4ac082aff
共有 3 个文件被更改,包括 22 次插入6 次删除
  1. 17 1
      components/provider/NewStore.vue
  2. 4 4
      components/store/common/StoreHeader.vue
  3. 1 1
      nuxt.config.js

+ 17 - 1
components/provider/NewStore.vue

@@ -31,7 +31,7 @@
           已入驻商家<span>{{storeCount}}</span>家
         </div>
         <div>
-          <a href="/vendor#/store-apply"><button>立即入驻</button></a>
+          <a @click="goStoreApply()"><button>立即入驻</button></a>
         </div>
       </div>
     </div>
@@ -42,12 +42,28 @@
 export default {
   name: 'new-store',
   computed: {
+    user () {
+      return this.$store.state.option.user
+    },
     stores () {
       return this.$store.state.provider.storeCms.newStores.data ? this.$store.state.provider.storeCms.newStores.data.content : []
     },
     storeCount () {
       return this.$store.state.provider.storeCms.storeCount.data
     }
+  },
+  methods: {
+    goStoreApply: function () {
+      if (!this.user.logged) {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+          if (response.data) {
+            this.$router.push('/auth/login')
+          }
+        })
+      } else {
+        window.location.href = '/vendor#/store-apply'
+      }
+    }
   }
 }
 </script>

+ 4 - 4
components/store/common/StoreHeader.vue

@@ -27,14 +27,14 @@
             </div>
             <div style="background: #FFFFFF;" v-if="isOpen">
               <ul class = "shop-contact list-unstyled" style="padding: 15px 0; margin-bottom: 0; border-top: #e8e8e8 1px solid; margin-top: 20px;">
-                <li v-if="storeInfo.enterprise.enTel&&storeInfo.enterprise.enTel.length > 0">
+                <li v-if="storeInfo.enterprise.enTel">
                   <span>电话:</span><span v-text="storeInfo.enterprise.enTel"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.enFax&&storeInfo.enterprise.enFax.length > 0">
+                <li v-if="storeInfo.enterprise.enFax">
                   <span>传真:</span><span v-text="storeInfo.enterprise.enFax"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.address&&storeInfo.enterprise.address.length > 0">
-                  <span>地址:</span><span v-text="storeInfo.enterprise.address"></span>
+                <li v-if="storeInfo.enterprise.address || storeInfo.enterprise.enAddress">
+                  <span>地址:</span><span v-text="storeInfo.enterprise.address || storeInfo.enterprise.enAddress"></span>
                 </li>
                 <li class="text-right">
                   <nuxt-link :to="{ name: 'store-uuid-description', params: { uuid: storeInfo.uuid } }">了解更多&gt;</nuxt-link>

+ 1 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://www.usoftmall.com/' : 'http://192.168.253.60:9090/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://192.168.253.60:9090/platform-b2c/')
 
 module.exports = {
   router: {