Browse Source

Merge branch 'productDetail_router_new'

yangc 7 years ago
parent
commit
71e8b6863b

+ 1 - 1
components/default/RightBar.vue

@@ -46,7 +46,7 @@
             <h3><a href="/user#/browsingHistory">浏览历史</a></h3>
             <h3><a href="/user#/browsingHistory">浏览历史</a></h3>
             <dl>
             <dl>
               <dd v-for="item in listMe(history)">
               <dd v-for="item in listMe(history)">
-                  <a :href="'/store/' + item.storeid + '/' + item.batchCode" target="_blank" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>
+                  <a :href="'/store/productDetail/' + item.batchCode" target="_blank" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>
                   <a :title="item.code" v-text="item.code" v-if="item.status== 0" disabled="disabled"></a>
                   <a :title="item.code" v-text="item.code" v-if="item.status== 0" disabled="disabled"></a>
                   <div class="hover-shows">
                   <div class="hover-shows">
                       <em :class="{ 'off' : item.status== 0}"></em>
                       <em :class="{ 'off' : item.status== 0}"></em>

+ 1 - 1
components/product/ComponentGoods.vue

@@ -25,7 +25,7 @@
         <td style="position: relative">
         <td style="position: relative">
           <img class="sellout-flag" v-if="compGoods.status === 602" src="/images/search/sellout-search.png" alt="">
           <img class="sellout-flag" v-if="compGoods.status === 602" src="/images/search/sellout-search.png" alt="">
           <!--store/{{compGoods.storeId}}#/batchInfo/{{compGoods.batchCode}}-->
           <!--store/{{compGoods.storeId}}#/batchInfo/{{compGoods.batchCode}}-->
-          <nuxt-link v-if="compGoods.batchCode" :to="`/store/${compGoods.storeId}/${compGoods.batchCode}`" target="_blank">
+          <nuxt-link v-if="compGoods.batchCode" :to="`/store/productDetail/${compGoods.batchCode}`" target="_blank">
             <img :src="compGoods.img?compGoods.img:compGoods.brand&&compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>
             <img :src="compGoods.img?compGoods.img:compGoods.brand&&compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>
           </nuxt-link>
           </nuxt-link>
             <img v-if="!compGoods.batchCode" :src="compGoods.img?compGoods.img:compGoods.brand&&compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>
             <img v-if="!compGoods.batchCode" :src="compGoods.img?compGoods.img:compGoods.brand&&compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>

+ 3 - 3
components/product/component/StoreInfo.vue

@@ -46,7 +46,7 @@
           </tr>
           </tr>
         </thead>
         </thead>
         <tbody class="text-center">
         <tbody class="text-center">
-          <tr style="cursor: pointer;" v-for="list in storeList.content" @click="goProductDetail(list.storeid, list.batchCode)">
+          <tr style="cursor: pointer;" v-for="list in storeList.content" @click="goProductDetail(list.batchCode)">
             <td style="position: relative">
             <td style="position: relative">
               <img class="sellout-flag" v-if="list.status === 602" src="/images/search/sellout-search.png" alt="">
               <img class="sellout-flag" v-if="list.status === 602" src="/images/search/sellout-search.png" alt="">
               <a v-if="list.code">{{list.code}}</a>
               <a v-if="list.code">{{list.code}}</a>
@@ -260,8 +260,8 @@
         }
         }
         this.$store.dispatch('loadComponentInformation', this.params)
         this.$store.dispatch('loadComponentInformation', this.params)
       },
       },
-      goProductDetail: function (storeid, batchcode) {
-        window.location.href = '/store/' + storeid + '/' + batchcode
+      goProductDetail: function (batchCode) {
+        window.location.href = '/store/productDetail/' + batchCode
       }
       }
     }
     }
   }
   }

+ 4 - 4
components/product/original/OriginalDetail.vue

@@ -9,7 +9,7 @@
         <div class="hot-center clearfix">
         <div class="hot-center clearfix">
           <div class="hot-center-1 clearfix">
           <div class="hot-center-1 clearfix">
             <div class="hot-pro" v-for="item in list1">
             <div class="hot-pro" v-for="item in list1">
-              <a :title="item.code" :href="'/store/' + item.storeid + '/' + item.batchCode" target="_blank">
+              <a :title="item.code" :href="'/store/productDetail/' + item.batchCode" target="_blank">
                 <p><img :src="item.img" alt=""></p>
                 <p><img :src="item.img" alt=""></p>
                 <span><em>{{item.code}}</em></span>
                 <span><em>{{item.code}}</em></span>
               </a>
               </a>
@@ -18,7 +18,7 @@
           <div class="hot-center-2 clearfix">
           <div class="hot-center-2 clearfix">
             <ul>
             <ul>
               <li v-for="item in list2">
               <li v-for="item in list2">
-                <a :title="item.code" :href="'/store/' + item.storeid + '/' + item.batchCode" target="_blank">
+                <a :title="item.code" :href="'/store/productDetail/' + item.batchCode" target="_blank">
                   <p><img :src="item.img" alt=""></p>
                   <p><img :src="item.img" alt=""></p>
                   <span><em>{{item.code}}</em></span>
                   <span><em>{{item.code}}</em></span>
                 </a>
                 </a>
@@ -29,7 +29,7 @@
           <div class="hot-center clearfix pad-b10">
           <div class="hot-center clearfix pad-b10">
             <div class="hot-center-1 clearfix">
             <div class="hot-center-1 clearfix">
               <div class="hot-pro" v-for="item in list3">
               <div class="hot-pro" v-for="item in list3">
-                <a title="" :title="item.code" :href="'/store/' + item.storeid + '/' + item.batchCode" target="_blank">
+                <a title="" :title="item.code" :href="'/store/productDetail/' + item.batchCode" target="_blank">
                   <p><img :src="item.img" alt=""></p>
                   <p><img :src="item.img" alt=""></p>
                   <span><em>{{item.code}}</em></span>
                   <span><em>{{item.code}}</em></span>
                 </a>
                 </a>
@@ -38,7 +38,7 @@
             <div class="hot-center-2 clearfix">
             <div class="hot-center-2 clearfix">
               <ul>
               <ul>
                 <li v-for="item in list4">
                 <li v-for="item in list4">
-                  <nuxt-link title="" :to="'/store/' + item.storeid + '/' + item.batchCode" target="_blank">
+                  <nuxt-link title="" :to="'/store/productDetail/' + item.batchCode" target="_blank">
                     <p><img :src="item.img" alt=""></p>
                     <p><img :src="item.img" alt=""></p>
                     <span><em>{{item.code}}</em></span>
                     <span><em>{{item.code}}</em></span>
                   </nuxt-link>
                   </nuxt-link>

+ 1 - 1
components/provider/HotCommodity.vue

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

+ 2 - 2
components/search/GoodList.vue

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

+ 1 - 1
components/searchStore/StoreContent.vue

@@ -125,7 +125,7 @@
         this.$emit('pageAction', page)
         this.$emit('pageAction', page)
       },
       },
       goStore: function (index, compIndex) {
       goStore: function (index, compIndex) {
-        window.open('/store/' + this.componentData[index].content[compIndex].storeid + '/' + this.componentData[index].content[compIndex].batchCode)
+        window.open('/store/productDetail/' + this.componentData[index].content[compIndex].batchCode)
       }
       }
     }
     }
   }
   }

+ 3 - 3
components/store/CommodityList.vue

@@ -44,7 +44,7 @@
           </tr>
           </tr>
           </thead>
           </thead>
           <tbody id="goodslist-content">
           <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">
             <td class="brand-code">
               <img class="sellout-store-commodity" v-if="commodity.status === 602" src="/images/search/sellout-search.png" alt="">
               <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">
               <div class="brand" v-if="commodity.brandNameEn || commodity.brandEn">
@@ -267,8 +267,8 @@ export default {
       this.pageParams.page = page
       this.pageParams.page = page
       this.pageCommodity(this.pageParams, this.ids, this.searchCode)
       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) {
     goBrandDetail (url, event) {
       event.stopPropagation()
       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.minPriceRMB | currency}}</p>
             <p class="price" v-if="!commodity.minPriceRMB">$ {{commodity.minPriceUSD | currency}}</p>
             <p class="price" v-if="!commodity.minPriceRMB">$ {{commodity.minPriceUSD | currency}}</p>
           </div>
           </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="title" v-text="commodity.comCode">MRFE6S9045NF001</div>
               <div class="type" v-text="commodity.brandNameCn">PANFAEFQ</div>
               <div class="type" v-text="commodity.brandNameCn">PANFAEFQ</div>
               <div class="hr"><span>抢购价</span></div>
               <div class="hr"><span>抢购价</span></div>

+ 0 - 0
pages/store/_uuid/_batchCode.vue → pages/store/productDetail/_batchCode.vue