diff --git a/pages/goods/search/search.js b/pages/goods/search/search.js index 27e59dd..1bfc900 100644 --- a/pages/goods/search/search.js +++ b/pages/goods/search/search.js @@ -44,23 +44,29 @@ Page({ onLoad: function (t) { this.data.rq_data = t; - + if (t.o) { this.data.rq_data.o = JSON.parse(t.o); }; - var req = t.o; - if(req.cat_id){ - var baseUrl= "/api/weshop/goods/page?isnewwhere=1&cat_id="+req.cat_id - this.setData({ baseUrl: baseUrl }); - } - if(req.nation_id){ - var baseUrl= "/api/weshop/goods/page?isnewwhere=1&nation_id="+req.nation_id - this.setData({ baseUrl: baseUrl }); - } - if(req.brand_id){ - var baseUrl= "/api/weshop/goods/page?isnewwhere=1&brand_id="+req.brand_id + if(t.o) { + var req = t.o; + if(req.cat_id){ + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&cat_id="+req.cat_id + this.setData({ baseUrl: baseUrl }); + } + if(req.nation_id){ + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&nation_id="+req.nation_id + this.setData({ baseUrl: baseUrl }); + } + if(req.brand_id){ + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&brand_id="+req.brand_id + this.setData({ baseUrl: baseUrl }); + } + }else{ + var baseUrl= "/api/weshop/goods/page?isnewwhere=1" this.setData({ baseUrl: baseUrl }); } + //接受有没有导购的参数 diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js index 0fffe61..2f40cb7 100644 --- a/pages/user/plus/plus.js +++ b/pages/user/plus/plus.js @@ -93,14 +93,7 @@ Page({ }) } - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({ - url: '/packageE/pages/togoin/togoin?first_leader=' + fir_leader, - }) - return false; - } + //-----------商家配置信息----- 等级卡规则,是否又开邀请码,营业员------------ getApp().request.get("/api/weshop/storeconfig/get/" + store_id, { success: function (res) { @@ -116,6 +109,16 @@ Page({ }); } }); + + //--先判断会员状态-- + var user_info = getApp().globalData.userInfo; + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { + wx.navigateTo({ + url: '/packageE/pages/togoin/togoin?first_leader=' + fir_leader, + }) + return false; + } + }, /**