Browse Source

联合丽格V1.0.2

zhengjinyi 1 year ago
parent
commit
51bcc5a37f
1 changed files with 15 additions and 12 deletions
  1. 15 12
      src/main/resources/static/js/product/list.js

+ 15 - 12
src/main/resources/static/js/product/list.js

@@ -344,18 +344,21 @@ var productList = new Vue({
         // 获取对应品牌列表
         this.getCommoditySearchQUeryBrand();
         // 设置选中的品牌
-        if(this.hrefBrandId){
-            const brandIdsArray = this.hrefBrandId.split(',')
-            this.params.brandIds = this.hrefBrandId +',';
-            this.isChoiceBrandText = true
-            const names = brandIdsArray.map(function (item) {
-                const find = _self.defaultBrandLists.find(el => el.id === item*1)
-                return find && find.name
-            })
-            this.choiceBrandText = names.join(',').slice(0,15)
-        }
-        // 获取列表数据
-        this.getListByKeyword();
+        setTimeout(()=>{
+            if(this.hrefBrandId){
+                const brandIdsArray = this.hrefBrandId.split(',')
+                this.params.brandIds = this.hrefBrandId +',';
+                this.isChoiceBrandText = true
+                const names = brandIdsArray.map(function (item) {
+                    const find = _self.defaultBrandLists.find(el => el.id === item*1)
+                    return find && find.name
+                })
+                this.choiceBrandText = names.join(',').slice(0,15)
+            }
+            // 获取列表数据
+            this.getListByKeyword();
+        },500)
+
     },
     mounted: function () {
         var _self = this;