...
|
...
|
@@ -55,7 +55,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
return this.get({
|
|
|
data: {
|
|
|
method: params.id ? 'app.address.update' : 'app.address.add',
|
|
|
id: params.id,
|
|
|
id: _.parseInt(params.id),
|
|
|
address: params.address,
|
|
|
area_code: params.area_code,
|
|
|
consignee: params.consignee,
|
...
|
...
|
@@ -77,7 +77,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
data: {
|
|
|
method: 'app.address.setdefault',
|
|
|
uid: params.id,
|
|
|
id: params.id
|
|
|
id: _.parseInt(params.id)
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -91,7 +91,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
return this.get({
|
|
|
data: {
|
|
|
method: 'app.address.del',
|
|
|
id: params.id,
|
|
|
id: _.parseInt(params.id),
|
|
|
uid: params.uid
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -161,7 +161,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
*/
|
|
|
saveAddress(params) {
|
|
|
if (params.id) {
|
|
|
params.id = crypto.decrypt(null, decodeURIComponent(params.id));
|
|
|
params.id = _.parseInt(crypto.decrypt(null, decodeURIComponent(params.id)));
|
|
|
}
|
|
|
|
|
|
return this._saveAddressData(params).then(result => {
|
...
|
...
|
@@ -175,7 +175,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
*/
|
|
|
setDefaultAddress(params) {
|
|
|
if (params.id) {
|
|
|
params.id = crypto.encryption(null, params.id);
|
|
|
params.id = _.parseInt(crypto.encryption(null, params.id));
|
|
|
}
|
|
|
return this._setDefaultAddress(params).then(result => {
|
|
|
return result;
|
...
|
...
|
@@ -188,7 +188,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
*/
|
|
|
delAddress(params) {
|
|
|
if (params.id) {
|
|
|
params.id = crypto.decrypt(null, params.id);
|
|
|
params.id = _.parseInt(crypto.decrypt(null, params.id));
|
|
|
}
|
|
|
return this._delAddressData(params).then(result => {
|
|
|
return result;
|
...
|
...
|
@@ -216,7 +216,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
return this.get({
|
|
|
data: {
|
|
|
method: 'app.address.provinces',
|
|
|
id: params.id || '0'
|
|
|
id: _.parseInt(params.id) || 0
|
|
|
},
|
|
|
param: {code: 200, cache: true}
|
|
|
}).then(result => {
|
...
|
...
|
@@ -234,7 +234,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
method: 'app.SpaceOrders.updateDeliveryAddress',
|
|
|
uid: uid,
|
|
|
order_code: orderCode,
|
|
|
address_id: crypto.decrypt(null, addressId)
|
|
|
address_id: _.parseInt(crypto.decrypt(null, addressId))
|
|
|
}
|
|
|
}).then((result) => {
|
|
|
return result;
|
...
|
...
|
|