Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0
Showing
6 changed files
with
11 additions
and
10 deletions
@@ -50,15 +50,15 @@ const index = (req, res, next) => { | @@ -50,15 +50,15 @@ const index = (req, res, next) => { | ||
50 | }).catch(next); | 50 | }).catch(next); |
51 | }; | 51 | }; |
52 | 52 | ||
53 | -const getAddressList = (req, res) => { | ||
54 | - addressModel.getAddressDataAsync('7566245', 20).then(result => { | 53 | +const getAddressList = (req, res, next) => { |
54 | + addressModel.getAddressDataAsync(req.user.uid, 20).then(result => { | ||
55 | if (result.data) { | 55 | if (result.data) { |
56 | let defaultAd = _.find(result.data, o => o.is_default === 'Y'); | 56 | let defaultAd = _.find(result.data, o => o.is_default === 'Y'); |
57 | 57 | ||
58 | defaultAd && (defaultAd.focus = true); | 58 | defaultAd && (defaultAd.focus = true); |
59 | } | 59 | } |
60 | res.send(result); | 60 | res.send(result); |
61 | - }); | 61 | + }).catch(next); |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /** | 64 | /** |
@@ -211,11 +211,11 @@ const helpers = { | @@ -211,11 +211,11 @@ const helpers = { | ||
211 | goodsId = goodsList[0].goodsId; | 211 | goodsId = goodsList[0].goodsId; |
212 | 212 | ||
213 | goodsList.forEach(o => { | 213 | goodsList.forEach(o => { |
214 | - o.url = `${config.siteUrl}/product/item/${g.productId}_${o.goodsId}.html`; | 214 | + o.url = `${config.siteUrl}/product/pro_${g.productId}_${o.goodsId}/${o.cnAlphabet}.html`; |
215 | }); | 215 | }); |
216 | } | 216 | } |
217 | 217 | ||
218 | - g.url = `${config.siteUrl}/product/item/${g.productId}_${goodsId}.html`; | 218 | + g.url = `${config.siteUrl}/product/pro_${g.productId}_${goodsId}/${g.cnAlphabet}.html`; |
219 | }); | 219 | }); |
220 | } | 220 | } |
221 | return list; | 221 | return list; |
@@ -42,7 +42,7 @@ const index = uid => { | @@ -42,7 +42,7 @@ const index = uid => { | ||
42 | 42 | ||
43 | // format goods link | 43 | // format goods link |
44 | theGoods.link = helper.urlFormat( | 44 | theGoods.link = helper.urlFormat( |
45 | - `/product/pro_${theGoods.product_id}_${theGoods.goods_id}_${theGoods.cn_alphabet}.html`); | 45 | + `/product/pro_${theGoods.product_id}_${theGoods.goods_id}/${theGoods.cn_alphabet}.html`); |
46 | 46 | ||
47 | theGoods.last_price = parseFloat(theGoods.last_price, 10).toFixed(2); | 47 | theGoods.last_price = parseFloat(theGoods.last_price, 10).toFixed(2); |
48 | 48 |
@@ -4,6 +4,7 @@ var common = require('../../common'); | @@ -4,6 +4,7 @@ var common = require('../../common'); | ||
4 | 4 | ||
5 | var query = common.queryString(); | 5 | var query = common.queryString(); |
6 | 6 | ||
7 | + | ||
7 | var YohoListPage = { | 8 | var YohoListPage = { |
8 | rootDoc: $('.yoho-product-list'), | 9 | rootDoc: $('.yoho-product-list'), |
9 | brandsDoc: $('.yoho-product-list .brand-list'), | 10 | brandsDoc: $('.yoho-product-list .brand-list'), |
@@ -16,7 +17,7 @@ var YohoListPage = { | @@ -16,7 +17,7 @@ var YohoListPage = { | ||
16 | require('yoho-jquery-nanoscroller'); | 17 | require('yoho-jquery-nanoscroller'); |
17 | require('../../plugins/check'); | 18 | require('../../plugins/check'); |
18 | require('../../common/return-top'); | 19 | require('../../common/return-top'); |
19 | - | 20 | + require('../../common/header'); |
20 | lazyload(); | 21 | lazyload(); |
21 | $('.nano').nanoScroller(); | 22 | $('.nano').nanoScroller(); |
22 | $('.yoho-ui-accordion', this.rootDoc).each(function() { | 23 | $('.yoho-ui-accordion', this.rootDoc).each(function() { |
@@ -257,9 +257,7 @@ function initAddressContent($el, areaCode) { | @@ -257,9 +257,7 @@ function initAddressContent($el, areaCode) { | ||
257 | function newAddress(isInit) { | 257 | function newAddress(isInit) { |
258 | var address; | 258 | var address; |
259 | 259 | ||
260 | - address = addressDialogFactory({ | ||
261 | - init: isInit | ||
262 | - }); | 260 | + address = addressDialogFactory(); |
263 | 261 | ||
264 | if (isInit) { | 262 | if (isInit) { |
265 | address.$el.addClass('is-init'); | 263 | address.$el.addClass('is-init'); |
-
Please register or login to post a comment