Browse Source

新增相关页面错误提示

shenjj 7 years ago
parent
commit
be5b71ef98

+ 7 - 1
components/error/error.vue

@@ -33,7 +33,7 @@
         <div class="infotext" v-else-if="title==='产品'">您可以逛逛:
           <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
           <span>|</span>
-          <nuxt-link :to="{ path: '/product/home'}">代理销</nuxt-link>
+          <nuxt-link :to="{ path: '/product/home'}">代理销</nuxt-link>
           <span>|</span>
           <nuxt-link :to="{ name: 'store-uuid', params: { uuid: '33069557578d44e69bd91ad12d28a8d4' }}">库存寄售</nuxt-link>
         </div>
@@ -82,6 +82,12 @@ export default {
         span {
           margin: 0 6px;
         }
+        a {
+          color: #5078CB
+        }
+        a:hover {
+          color: #fd7022
+        }
       }
     }
   }

+ 1 - 1
components/store/BaseInfo.vue

@@ -32,7 +32,7 @@
         <div ng-if="storeInfo.enterprise">
           <div class="contact-text">
             <div v-text="storeInfo.enterprise.enName || '-'"></div>
-            <div><span class="public">地址:</span><span v-text="storeInfo.enterprise.enAddress || '-'"></span></div>
+            <div><span class="public">地址:</span><span v-text="storeInfo.enterprise.address || '-'"></span></div>
             <div><span class="public">电话:</span><span v-text="storeInfo.enterprise.enTel || '-'"></span></div>
             <div><span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax || '-'"></span></div>
             <div><span class="public">官网地址:</span><a :href=storeInfo.enterprise.enUrl target="_blank">{{storeInfo.enterprise.enUrl || '-'}}</a></div>

+ 6 - 2
layouts/shop.vue

@@ -133,8 +133,12 @@
         return this.$route.path.indexOf('/store/productDetail/') !== -1
       },
       isShowShopHeader () {
-        if (this.isInDetail && this.$store.state.shop.storeInfo.commodity.data) {
-          return true
+        if (this.isInDetail) {
+          if (this.$store.state.shop.storeInfo.commodity.data.id) {
+            return true
+          } else {
+            return false
+          }
         } else if (this.storeInfo.id) {
           return true
         } else {

+ 32 - 7
pages/mobile/share/purChase/_uuid.vue

@@ -205,16 +205,41 @@ export default {
     },
     goSayPrice(id) {
       if (this.user.logged) {
-        this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
-          itemId: id,
-          enuu: this.$store.state.option.user.data.enterprise
-            ? this.$store.state.option.user.data.enterprise.uu
-            : null
-        })
-        this.showSayPriceBox = true
+        if (this.user.data.enterprise.uu) {
+          if (
+            this.user.data.enterprise.isVendor &&
+            this.user.data.enterprise.isVendor !== '1690'
+          ) {
+            this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
+              itemId: id,
+              enuu: this.$store.state.option.user.data.enterprise
+                ? this.$store.state.option.user.data.enterprise.uu
+                : null
+            })
+            this.showSayPriceBox = true
+            // this.activeIndex = index
+          } else {
+            this.onRemind('抱歉,您需开通卖家功能才可报价')
+          }
+        } else {
+          this.onRemind('个人账户暂不可报价')
+        }
       } else {
         this.showLoginBox = true
       }
+      return false
+
+      // if (this.user.logged) {
+      //   this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
+      //     itemId: id,
+      //     enuu: this.$store.state.option.user.data.enterprise
+      //       ? this.$store.state.option.user.data.enterprise.uu
+      //       : null
+      //   })
+      //   this.showSayPriceBox = true
+      // } else {
+      //   this.showLoginBox = true
+      // }
     },
     sendApplyPurchase() {
       console.log(this.user)