Administrator 4 years ago
parent
commit
3b4f4c72b6
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/main/resources/static/js/product/produce-list.js

+ 5 - 4
src/main/resources/static/js/product/produce-list.js

@@ -161,15 +161,16 @@ var productList = new Vue({
         this.tinyTypeID = getUrlParam('tinyTypeID');
         console.log( this.smallTypeID)
         console.log( this.tinyTypeID)
-        if (this.tinyTypeID==null){
-            this.params.id=this.smallTypeID;
-        }else if( this.smallTypeID==null){
+        if(this.tinyTypeID==null &&  this.smallTypeID==null){
             this.params.id=this.bigTypeID;
-        }else if (this.tinyTypeID==null &&  this.smallTypeID==null){
+        }else if(this.tinyTypeID==null){
+            this.params.id=this.smallTypeID;
+        }else if(this.smallTypeID==null){
             this.params.id=this.bigTypeID;
         }else {
             this.params.id=this.tinyTypeID;
         }
+
         var typeSort =  getUrlParam('typeSort');
         PublicApi.GetProductClassify({typeSort:typeSort,source:'www'},function (res) {
                 if (res.code==0){