Commit 1b93a9ae0c1b2ef1f701cacdc76e3c18425b29a7
1 parent
2c271d81
分类
Showing
2 changed files
with
15 additions
and
5 deletions
pages/goods/goodsList/goodsList.js
@@ -497,9 +497,9 @@ Page({ | @@ -497,9 +497,9 @@ Page({ | ||
497 | }, | 497 | }, |
498 | 498 | ||
499 | go_url:function (e) { | 499 | go_url:function (e) { |
500 | - var url = e.currentTarget.dataset.url+'&cat_id='+this.data.cat_id; | ||
501 | - //var rq_data = JSON.stringify(this.data.rq_data); | ||
502 | - //url += `&o=${rq_data}`; | 500 | + var url = e.currentTarget.dataset.url; |
501 | + var rq_data = JSON.stringify(this.data.rq_data); | ||
502 | + url += `&o=${rq_data}`; | ||
503 | // console.log('url!!!=======<<<<', url); | 503 | // console.log('url!!!=======<<<<', url); |
504 | getApp().goto(url); | 504 | getApp().goto(url); |
505 | }, | 505 | }, |
pages/goods/search/search.js
@@ -44,11 +44,21 @@ Page({ | @@ -44,11 +44,21 @@ Page({ | ||
44 | 44 | ||
45 | onLoad: function (t) { | 45 | onLoad: function (t) { |
46 | this.data.rq_data = t; | 46 | this.data.rq_data = t; |
47 | + | ||
47 | if (t.o) { | 48 | if (t.o) { |
48 | this.data.rq_data.o = JSON.parse(t.o); | 49 | this.data.rq_data.o = JSON.parse(t.o); |
49 | }; | 50 | }; |
50 | - if(t.cat_id){ | ||
51 | - var baseUrl= "/api/weshop/goods/page?isnewwhere=1&cat_id="+t.cat_id | 51 | + var req = t.o; |
52 | + if(req.cat_id){ | ||
53 | + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&cat_id="+req.cat_id | ||
54 | + this.setData({ baseUrl: baseUrl }); | ||
55 | + } | ||
56 | + if(req.nation_id){ | ||
57 | + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&nation_id="+req.nation_id | ||
58 | + this.setData({ baseUrl: baseUrl }); | ||
59 | + } | ||
60 | + if(req.brand_id){ | ||
61 | + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&brand_id="+req.brand_id | ||
52 | this.setData({ baseUrl: baseUrl }); | 62 | this.setData({ baseUrl: baseUrl }); |
53 | } | 63 | } |
54 | 64 |