Browse Source

产品详情路径修改

yangc 7 years ago
parent
commit
0ea36d87df

+ 1 - 1
components/provider/HotCommodity.vue

@@ -3,7 +3,7 @@
     <div class="title">热销器件</div>
     <ul class="list-unstyled list-inline">
       <li class="hot-commodity-box" v-for="(component, index) in hotComponents" :class="{ 'border-right' : index % 5 == 4 }">
-        <a :href="'/store/' + component.storeid + '/' + component.batchCode" target="_blank">
+        <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
           <img :src="component.img || '/images/store/common/default.png'"/>
           <span>{{component.code}}</span>
         </a>

+ 1 - 1
components/search/GoodList.vue

@@ -294,7 +294,7 @@
         this.$emit('filterPriceEvent', this.filter)
       },
       goUnstandardDetail: function (comp) {
-        if (!comp.brand && comp.brandEn) {
+        if (!comp.uuid) {
           this.$router.push('/store/productDetail/' + comp.batchCode)
         }
       }

+ 3 - 3
components/store/CommodityList.vue

@@ -44,7 +44,7 @@
           </tr>
           </thead>
           <tbody id="goodslist-content">
-          <tr v-for="commodity in commodities.content" @click="goBatchDetail(storeInfo.uuid, commodity.batchCode)">
+          <tr v-for="commodity in commodities.content" @click="goBatchDetail(commodity.batchCode)">
             <td class="brand-code">
               <img class="sellout-store-commodity" v-if="commodity.status === 602" src="/images/search/sellout-search.png" alt="">
               <div class="brand" v-if="commodity.brandNameEn || commodity.brandEn">
@@ -267,8 +267,8 @@ export default {
       this.pageParams.page = page
       this.pageCommodity(this.pageParams, this.ids, this.searchCode)
     },
-    goBatchDetail (storeId, batchCode) {
-      window.open('/store/' + storeId + '/' + batchCode)
+    goBatchDetail (batchCode) {
+      window.open('/store/productDetail/' + batchCode)
     },
     goBrandDetail (url, event) {
       event.stopPropagation()

+ 2 - 2
components/store/RecommendProduct.vue

@@ -14,8 +14,8 @@
             <p class="price" v-if="commodity.minPriceRMB">¥ {{commodity.minPriceRMB | currency}}</p>
             <p class="price" v-if="!commodity.minPriceRMB">$ {{commodity.minPriceUSD | currency}}</p>
           </div>
-          <div class="hover-show" :href="commodity.batchCode ? '/store/' + storeInfo.uuid + '/' + commodity.batchCode : '#'">
-            <a :href="commodity.batchCode ? '/store/' + storeInfo.uuid + '/' + commodity.batchCode : '#'" class="href">
+          <div class="hover-show" :href="commodity.batchCode ? '/store/productDetail/'  + commodity.batchCode : ''">
+            <a :href="commodity.batchCode ? '/store/productDetail/' + commodity.batchCode : ''" class="href">
               <div class="title" v-text="commodity.comCode">MRFE6S9045NF001</div>
               <div class="type" v-text="commodity.brandNameCn">PANFAEFQ</div>
               <div class="hr"><span>抢购价</span></div>

+ 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://10.10.100.107:8081/platform-b2c/' : 'http://192.168.253.60:9090/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://10.1.51.90:8080/platform-b2c/')
 
 module.exports = {
   router: {