Authored by xuqi

address

... ... @@ -50,15 +50,15 @@ const index = (req, res, next) => {
}).catch(next);
};
const getAddressList = (req, res) => {
addressModel.getAddressDataAsync('7566245', 20).then(result => {
const getAddressList = (req, res, next) => {
addressModel.getAddressDataAsync(req.user.uid, 20).then(result => {
if (result.data) {
let defaultAd = _.find(result.data, o => o.is_default === 'Y');
defaultAd && (defaultAd.focus = true);
}
res.send(result);
});
}).catch(next);
};
/**
... ...
... ... @@ -42,7 +42,7 @@ const index = uid => {
// format goods link
theGoods.link = helper.urlFormat(
`/product/pro_${theGoods.product_id}_${theGoods.goods_id}_${theGoods.cn_alphabet}.html`);
`/product/pro_${theGoods.product_id}_${theGoods.goods_id}/${theGoods.cn_alphabet}.html`);
theGoods.last_price = parseFloat(theGoods.last_price, 10).toFixed(2);
... ...
... ... @@ -257,9 +257,7 @@ function initAddressContent($el, areaCode) {
function newAddress(isInit) {
var address;
address = addressDialogFactory({
init: isInit
});
address = addressDialogFactory();
if (isInit) {
address.$el.addClass('is-init');
... ...