Authored by ccbikai(👎🏻🍜)

Merge remote-tracking branch 'origin/hotfix/editAddress' into qCloud

... ... @@ -42,7 +42,7 @@ exports.address = (req, res, next) => {
*/
exports.addressAct = (req, res, next) => {
addressModel.address({
id: decodeURIComponent(req.params.id),
id: decodeURIComponent(req.query.id),
uid: req.user.uid
}).then(result => {
let responseData = {
... ...
... ... @@ -100,14 +100,14 @@ const address = (params) => {
/* 加密地址 ID */
_.forEach(selfAddress.data, (value, key) => {
selfAddress.data[key].address_id = crypto.encryption(null, selfAddress.data[key].address_id);
selfAddress.data[key].address_id = encodeURIComponent(crypto.encryption(null, selfAddress.data[key].address_id));
});
/* 如果有 ID 是地址编辑页面 */
if (params.id) {
return {
address: camelCase(_.find(selfAddress.data, o => {
return o.address_id === params.id;
return decodeURIComponent(o.address_id) === params.id;
})),
addressList: camelCase(result[1] ? result[1].data : []),
navTitle: '编辑地址'
... ...
... ... @@ -6,7 +6,7 @@
<span class="tel">{{mobile}}</span>
<p class="address-info">{{area}} {{address}}</p>
<div class="action iconfont">
<a class="edit" href="/home/addressAct/{{addressId}}">&#xe61e;</a>
<a class="edit" href="/home/addressAct?id={{addressId}}">&#xe61e;</a>
<span class="del" data-id="{{addressId}}">&#xe621;</span>
</div>
</div>
... ...