Administrator 4 years ago
parent
commit
2ac0dcaf23

+ 11 - 1
src/main/resources/static/js/product/instruement-list.js

@@ -146,7 +146,17 @@ var productList = new Vue({
     mounted:function () {
         var _self = this;
         this.bigTypeID = getUrlParam('bigTypeID');
-        this.params.id=this.bigTypeID;
+        this.smallTypeID = getUrlParam('smallTypeID');
+        this.tinyTypeID = getUrlParam('tinyTypeID');
+        console.log( this.smallTypeID)
+        console.log( this.tinyTypeID)
+        if (this.bigTypeID){
+            this.params.id=this.bigTypeID;
+        }else if( this.smallTypeID){
+            this.params.id=this.smallTypeID;
+        }else {
+            this.params.id=this.tinyTypeID;
+        }
         var typeSort =  getUrlParam('typeSort');
         PublicApi.GetProductClassify({typeSort:typeSort,source:'www'},function (res) {
                 if (res.code==0){

+ 5 - 5
src/main/resources/templates/components/header.html

@@ -142,7 +142,7 @@
                     <div class="tabItem" v-for="big in NavsList" style="display: none;">
                         <div class="tabItem_lift">
                             <template v-for="(nav,index) in big.list" :key="index" >
-                                <a :class="{'on':index==0}"  href="javascript:void(0);">
+                                <a :class="{'on':index==0}"  :href="'/product/instruelist.html?bigTypeID='+nav.bigTypeID+'&typeSort='+nav.typeSort+''">
                                     <img class="tabItem_lift_icon" v-if="isPC" :src="nav.wwwIcon ? nav.wwwIcon : ''" alt="">
                                     {{ nav.name }}
                                 </a>
@@ -152,20 +152,20 @@
                             <div class="tabItem_right_content" v-for="(nav,i) in big.list" :class="{'on':i==0}">
                                 <div class="line"  v-if="nav.smalltypeList.length>0" v-for="small in nav.smalltypeList">
                                     <div class="lft">
-                                        <a :href="'/product/list.html?category='+nav.bigTypeID+'-'+small.smallTypeID+'-0'" target="_blank">
+                                        <a :href="'/product/instruelist.html?bigTypeID='+nav.bigTypeID+'&smallTypeID='+small.smallTypeID+'&typeSort='+nav.typeSort+''" target="_blank">
                                             <span v-if="isPC"> > </span>
                                             <p>{{ small.name }}</p>
                                         </a>
                                     </div>
                                     <div class="rgt mfw" >
                                         <template v-if="small.tinytypeList!='' && small.tinytypeList!=null"  v-for="tiny in small.tinytypeList">
-                                            <a class="3" :href="'/product/list.html?category='+nav.bigTypeID+'-'+small.smallTypeID+'-'+tiny.tinyTypeID" target="_blank">
+                                            <a class="3" :href="'/product/instruelist.html?bigTypeID='+nav.bigTypeID+'&smallTypeID='+small.smallTypeID+'&tinyTypeID='+tiny.tinyTypeID+'&typeSort='+nav.typeSort+''" target="_blank">
                                                 <img v-if="!isPC" :src="tiny.crmIcon" alt="tiny.name">
                                                 <span v-text="tiny.name"></span>
                                             </a>
                                         </template>
                                         <template v-if="!small.tinytypeList">
-                                            <a class="none" :href="'/product/list.html?category='+nav.bigTypeID+'-'+small.smallTypeID+'-0'" target="_blank">
+                                            <a class="none" :href="'/product/instruelist.html?bigTypeID='+nav.bigTypeID+'&smallTypeID='+small.smallTypeID+'&typeSort='+nav.typeSort+''" target="_blank">
                                                 <img v-if="!isPC" :src="tiny.icon" alt="全部商品">
                                                 <p>全部商品</p>
                                             </a>
@@ -175,7 +175,7 @@
                             <template v-if="!nav.smalltypeList">
                                 <div class="line">
                                     <div class="lft none">
-                                        <a :href="'/product/list.html?category='+nav.bigTypeID+'-0'" target="_blank">
+                                        <a :href="'/product/instruelist.html?bigTypeID='+nav.bigTypeID+'&typeSort='+nav.typeSort+''" target="_blank">
                                             <span v-if="isPC"> > </span>
                                             <p>{{ nav.name }}</p>
                                         </a>