From 666b1f696a8ec83630c97b951b72d55a1e2d95fb Mon Sep 17 00:00:00 2001 From: santaner Date: Tue, 19 Dec 2023 15:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E5=8D=95=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=90=9C=E7=B4=A2=E6=8E=92=E5=BA=8F=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/columnGoods/goods_area_list/index.vue | 97 +++++++++++---------- 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/pages/columnGoods/goods_area_list/index.vue b/pages/columnGoods/goods_area_list/index.vue index 275e6b8..f81ebd8 100644 --- a/pages/columnGoods/goods_area_list/index.vue +++ b/pages/columnGoods/goods_area_list/index.vue @@ -15,13 +15,11 @@ - - {{downMenu[downKey].title}} - - - - 销量 + 上架 + + + 价格 @@ -29,11 +27,6 @@ - - - 筛选 - - @@ -173,10 +166,13 @@ // price_off: '', // brand_id: '', // keyword:'', + priceSort:'', + timeSort:'', page:1, limit:10 }, price: 0, + time: 0, stock: 0, nows: false, loadend: false, @@ -289,38 +285,38 @@ this.storeMerchantList() }, // 右侧切换 - bindRight(){ - this.price = 0; - this.firstKey = 4 - this.getBrandlist() + // bindRight(){ + // this.price = 0; + // this.firstKey = 4 + // this.getBrandlist() - }, + // }, // 品牌列表 - getBrandlist(){ - let temp = [] - getBrandlist({ - // cate_pid:this.where.cate_pid, - keyword:this.where.keyword - }).then(res=>{ - temp = res.data.list.map(item=>{ - return { - ...item, - check:false - } - }) - if(this.where.brand_id.length>0){ - this.where.brand_id.forEach((ids,index)=>{ - temp.forEach(el=>{ - if(ids == el.brand_id){ - el.check = true - } - }) - }) - } - this.brandList = temp - this.rightBox = true - }) - }, + // getBrandlist(){ + // let temp = [] + // getBrandlist({ + // // cate_pid:this.where.cate_pid, + // keyword:this.where.keyword + // }).then(res=>{ + // temp = res.data.list.map(item=>{ + // return { + // ...item, + // check:false + // } + // }) + // if(this.where.brand_id.length>0){ + // this.where.brand_id.forEach((ids,index)=>{ + // temp.forEach(el=>{ + // if(ids == el.brand_id){ + // el.check = true + // } + // }) + // }) + // } + // this.brandList = temp + // this.rightBox = true + // }) + // }, // 去详情页 godDetail(item) { goShopDetail(item, this.uid).then(res => { @@ -429,13 +425,13 @@ this.firstKey = e if (this.price == 0){ this.price = 1; - this.where.order = 'price_asc' + this.where.priceSort = 1; }else if (this.price == 1){ this.price = 2; - this.where.order = 'price_desc' + this.where.priceSort = 2; }else if (this.price == 2){ this.price = 0; - this.where.order = '' + this.where.priceSort = '' } this.$set(this.where, 'page', 1) this.get_product_list(true); @@ -443,10 +439,19 @@ case 3: this.price = 0; this.loadend = false; - this.$set(this.where, 'order', 'sales') + + if (this.time == 0){ + this.time = 1; + this.where.timeSort = 1; + }else if (this.time == 1){ + this.time = 2; + this.where.timeSort = 2; + }else if (this.time == 2){ + this.time = 0; + this.where.timeSort = '' + } this.$set(this.where, 'page', 1) this.get_product_list(true); - this.firstKey = e break; } this.loadend = false;