From b9c14d6d0fc6979e70ddfb086b4354e82fe2bb1b Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Mon, 25 Apr 2022 10:01:47 +0800 Subject: [PATCH] 跳转链接 --- pages/goods/categoryList/categoryList.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index 71daaa0..fd7fe56 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -99,8 +99,8 @@ Page({ //-- user_id代过来免登录 -- getApp().globalData.first_leader=first_leader; } - - + + if(tt.type) this.data.type= parseInt(tt.type); that.get_brand(); clearInterval(that.data.timer); @@ -267,14 +267,16 @@ Page({ else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); } else if (that.data.is_show_xm) {that.setData({ currentTab: 3 });that.getServiceCategory(); } + + var t_type=this.data.type; //----求传参过来的控制----- - if (getApp().globalData.cat_type == 1 && that.data.is_show_gb ) { + if (t_type == 1 && that.data.is_show_gb ) { that.setData({ currentTab: 1 }); that.get_nation(); - } else if (getApp().globalData.cat_type == 2 && that.data.is_show_pp ) { + } else if (t_type == 2 && that.data.is_show_pp ) { that.setData({ currentTab: 2 }); that.get_brand(); - } else if (getApp().globalData.cat_type == 3 && that.data.is_show_xm ) { + } else if (t_type == 3 && that.data.is_show_xm ) { that.setData({ currentTab: 3 }); that.getServiceCategory(); } else if (that.data.is_show_pl) { -- libgit2 0.21.4