Procházet zdrojové kódy

商品详情配套商品显示控制

zhengjinyi před 3 roky
rodič
revize
118f175827

+ 5 - 1
src/main/resources/static/js/product/product-supporting.js

@@ -257,7 +257,11 @@ var supporting = new Vue({
     mounted: function () {
         this.listQuery.productId = getUrlParam("productId") ? getUrlParam("productId")*1 : "";
         this.userId = this.listQuery.userId = GLOBAL_USER_ID;
-        this.getCommodityCombinationList();
+        if(isPC){
+            window.location.href = '/product-'+this.listQuery.productId+'.html';
+        }else{
+            this.getCommodityCombinationList();
+        }
         // $('.productInfo').slide({
         //     mainCell:".tabCon"
         //     ,titCell:".tabTit span"

+ 4 - 2
src/main/resources/templates/product/product-supporting.html

@@ -32,10 +32,12 @@
                     <span v-else class="coll-checked" :class="[pros.isChecked ? 'checked': '']"></span>
                 </div>
                 <div class="list-image">
-                    <img :src="pros.image" :alt="pros.name">
+                    <a :href="'/product-'+pros.productId+'.html'">
+                        <img :src="pros.image" :alt="pros.name">
+                    </a>
                 </div>
                 <div class="list-info">
-                    <div class="list-name">{{ pros.name }}</div>
+                    <div class="list-name"><a :href="'/product-'+pros.productId+'.html'">{{ pros.name }}</a></div>
                     <div class="list-unit">规格:{{ pros.unit }}</div>
                     <div class="list-price">
                         <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">