Authored by 郝肖肖

'地址管理代码检查'

1 'use strict'; 1 'use strict';
2 2
3 -const _ = require('lodash');  
4 // doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/个人中心/地址管理.md'; 3 // doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/个人中心/地址管理.md';
5 4
  5 +const _ = require('lodash');
  6 +
6 class AddressModel extends global.yoho.BaseModel { 7 class AddressModel extends global.yoho.BaseModel {
7 constructor(ctx) { 8 constructor(ctx) {
8 super(ctx); 9 super(ctx);
@@ -131,7 +131,7 @@ module.exports = class extends global.yoho.BaseModel { @@ -131,7 +131,7 @@ module.exports = class extends global.yoho.BaseModel {
131 return { 131 return {
132 address: camelCase(params.id ? editAddress : selfAddress), 132 address: camelCase(params.id ? editAddress : selfAddress),
133 addressList: camelCase(_.get(result, '[1].data', [])), 133 addressList: camelCase(_.get(result, '[1].data', [])),
134 - navTitle: params.id ? '编辑地址': '添加地址' 134 + navTitle: params.id ? '编辑地址' : '添加地址'
135 }; 135 };
136 }); 136 });
137 } 137 }