...
|
...
|
@@ -105,13 +105,21 @@ const address = (params) => { |
|
|
|
|
|
/* 如果有 ID 是地址编辑页面 */
|
|
|
if (params.id) {
|
|
|
return {
|
|
|
let returnResult = {
|
|
|
address: camelCase(_.find(selfAddress.data, o => {
|
|
|
return decodeURIComponent(o.address_id) === params.id;
|
|
|
})),
|
|
|
addressList: camelCase(result[1] ? result[1].data : []),
|
|
|
navTitle: '编辑地址'
|
|
|
};
|
|
|
|
|
|
let area = _.get(returnResult, 'address.area', '');
|
|
|
|
|
|
if (area.length > 11) {
|
|
|
returnResult.address.area = area.substr(0, 5) + '...' + area.substr(-5);
|
|
|
}
|
|
|
|
|
|
return returnResult;
|
|
|
} else {
|
|
|
return {
|
|
|
address: camelCase(selfAddress.data),
|
...
|
...
|
|