...
|
...
|
@@ -7,7 +7,8 @@ |
|
|
const mcHandler = require('../models/menu-crumb-handler');
|
|
|
const addressModel = require('../models/address');
|
|
|
const crypto = global.yoho.crypto;
|
|
|
const config = global.yoho.config;
|
|
|
const config = global.yoho.config
|
|
|
const logger = global.yoho.logger;
|
|
|
|
|
|
const _ = require('lodash');
|
|
|
|
...
|
...
|
@@ -95,6 +96,8 @@ const addAddressData = (req, res, next) => { |
|
|
* 修改地址
|
|
|
*/
|
|
|
const updateAddressData = (req, res, next) => {
|
|
|
logger.info(`address update, address_id decrypt. address_id = ${req.body.id}`);
|
|
|
|
|
|
let id = crypto.decrypt(config.crypto.common, req.body.id);
|
|
|
let uid = req.user.uid;
|
|
|
let address = req.body.address;
|
...
|
...
|
@@ -112,6 +115,8 @@ const updateAddressData = (req, res, next) => { |
|
|
* 删除地址
|
|
|
*/
|
|
|
const delAddressData = (req, res, next) => {
|
|
|
logger.info(`address delete, address_id decrypt. address_id = ${req.body.id}`);
|
|
|
|
|
|
let id = crypto.decrypt(config.crypto.common, req.body.id);
|
|
|
let uid = req.user.uid;
|
|
|
|
...
|
...
|
@@ -124,6 +129,8 @@ const delAddressData = (req, res, next) => { |
|
|
* 设置默认地址
|
|
|
*/
|
|
|
const setDefaultAddress = (req, res) => {
|
|
|
logger.info(`address set default, address_id decrypt. address_id = ${req.body.id}`);
|
|
|
|
|
|
let id = crypto.decrypt(config.crypto.common, req.body.id);
|
|
|
let uid = req.user.uid;
|
|
|
|
...
|
...
|
|