price order, newshelve, api url
Showing
3 changed files
with
10 additions
and
4 deletions
@@ -45,7 +45,7 @@ const sortMap = dataMap.sort; | @@ -45,7 +45,7 @@ const sortMap = dataMap.sort; | ||
45 | 45 | ||
46 | const webSearchAsync = data => { | 46 | const webSearchAsync = data => { |
47 | return api.get('', Object.assign({ | 47 | return api.get('', Object.assign({ |
48 | - method: 'app.search.newProduct' | 48 | + method: 'web.search.newshelve' |
49 | }, data), {cache: true}); | 49 | }, data), {cache: true}); |
50 | }; | 50 | }; |
51 | 51 |
@@ -548,12 +548,18 @@ exports.handleFilterData = (origin, params, total) => { | @@ -548,12 +548,18 @@ exports.handleFilterData = (origin, params, total) => { | ||
548 | let price = { | 548 | let price = { |
549 | checked: params.price === key, | 549 | checked: params.price === key, |
550 | href: handleFilterUrl(params, {price: key}), | 550 | href: handleFilterUrl(params, {price: key}), |
551 | - name: value | 551 | + name: value, |
552 | + order: +key.split(",")[0] | ||
552 | }; | 553 | }; |
553 | 554 | ||
554 | dest.price.push(price); | 555 | dest.price.push(price); |
555 | }); | 556 | }); |
556 | 557 | ||
558 | + // 价格排序 | ||
559 | + dest.price = _.sortBy(dest.price, (item) => { | ||
560 | + return item.order; | ||
561 | + }); | ||
562 | + | ||
557 | dest.customPrice = { | 563 | dest.customPrice = { |
558 | min: customPrice[0], | 564 | min: customPrice[0], |
559 | max: customPrice[1] | 565 | max: customPrice[1] |
@@ -16,8 +16,8 @@ module.exports = { | @@ -16,8 +16,8 @@ module.exports = { | ||
16 | siteUrl: 'http://www.yohobuy.com', | 16 | siteUrl: 'http://www.yohobuy.com', |
17 | domains: { | 17 | domains: { |
18 | favApi: 'http://192.168.102.31:8092/brower', | 18 | favApi: 'http://192.168.102.31:8092/brower', |
19 | - api: 'http://api-test2.yohops.com:9999/', | ||
20 | - service: 'http://service-test2.yohops.com:9999/', | 19 | + api: 'http://api-test1.yohops.com:9999/', |
20 | + service: 'http://service-test1.yohops.com:9999/', | ||
21 | search: 'http://192.168.102.216:8080/yohosearch/' | 21 | search: 'http://192.168.102.216:8080/yohosearch/' |
22 | }, | 22 | }, |
23 | subDomains: { | 23 | subDomains: { |
-
Please register or login to post a comment