From 2a3fb66b2d580293b9ea55f173e4290b38ed8c3f Mon Sep 17 00:00:00 2001 From: taiyuan Date: Tue, 20 Apr 2021 16:41:14 +0800 Subject: [PATCH] 服务卡项分享-tab点击激活样式修改 --- packageA/pages/service_share/service_share.js | 21 ++++++++++++++++++--- packageA/pages/service_share/service_share.wxml | 8 ++++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packageA/pages/service_share/service_share.js b/packageA/pages/service_share/service_share.js index 0c7f8c5..e595611 100644 --- a/packageA/pages/service_share/service_share.js +++ b/packageA/pages/service_share/service_share.js @@ -24,7 +24,9 @@ Page({ dis_switch:0, //-- 分销开关 -- pattern:0, //-- 分成的方式 -- share_hidden:1, //-- 分享的按钮隐藏 -- - share_good:null //--- 要分享的商品 --- + share_good:null ,//--- 要分享的商品 --- + + isSale: true, }, /** * 生命周期函数--监听页面加载 @@ -162,9 +164,15 @@ Page({ // 点击价格排序 sort1() { + this.setData({ + isSale: false, + isPrice: true, + isNew: false, + }); if(this.data.active2) { this.setData({ - active2: !this.data.active2 + active2: !this.data.active2, + }); }; if(this.data.orderField!="money"){ @@ -178,6 +186,7 @@ Page({ orderType:ty,is_no_data:0,is_no_more:0,list:[], }); } + this.data.is_load=0; this.data.currentPage=1; this.requestGoodsList(); @@ -218,6 +227,9 @@ Page({ if(this.data.orderField!="sales_sum"){ this.setData({ active1: 0,active2:0,orderType:'desc',is_no_data:0,is_no_more:0,orderField:'sales_sum',list:[], + isSale: true, + isPrice: false, + isNew: false, }); this.data.is_load=0; this.data.currentPage=1; @@ -229,7 +241,10 @@ Page({ new_sort:function(){ if(this.data.orderField!="is_new"){ this.setData({ - active1: 0,active2:0,orderType:'desc',is_no_data:0,is_no_more:0,orderField:'is_new',list:[], + active1: 0,active2:0,orderType:'desc',is_no_data:0,is_no_more:0,list:[], + isSale: false, + isPrice:false, + isNew: true, }); this.data.is_load=0; this.data.currentPage=1; diff --git a/packageA/pages/service_share/service_share.wxml b/packageA/pages/service_share/service_share.wxml index b1319a4..d55e18f 100644 --- a/packageA/pages/service_share/service_share.wxml +++ b/packageA/pages/service_share/service_share.wxml @@ -10,13 +10,13 @@ - 销量 + 销量 - 价格 + 价格 - 价格 + 价格 - 最新 + 最新