Authored by 郭成尧

address-style-handle

... ... @@ -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),
... ...
... ... @@ -3,21 +3,21 @@
<form class="edit-address">
<input type="hidden" name="id" value="{{address.addressId}}">
<label class="username">
件人姓名
货 人 :
<input type="text" name="consignee" maxlength="20" value="{{address.consignee}}">
</label>
<label class="mobile">
手机号码
联系电话:
<input type="text" name="mobile" value="{{address.mobile}}">
</label>
<label class="area">
省市区
所在地区:
<input type="hidden" name="area_code" value="{{address.areaCode}}">
<input type="text" name="area" value="{{address.area}}" readonly>
<span class="iconfont">&#xe604;</span>
</label>
<label class="address">
详细地址
详细地址:
<textarea name="address" maxlength="255">{{address.address}}</textarea>
</label>
... ...
... ... @@ -122,7 +122,7 @@
.my-edit-address-page {
width: 100%;
color: #d0d0d0;
color: #444;
background: #f0f0f0;
.edit-address {
... ...