Authored by wenjiekong

添加修改购物习惯接口

@@ -7,7 +7,8 @@ @@ -7,7 +7,8 @@
7 'use strict'; 7 'use strict';
8 const api = global.yoho.API; 8 const api = global.yoho.API;
9 const userApi = require('./user-api'); 9 const userApi = require('./user-api');
10 -const searchApi = global.yoho.SearchAPI; 10 +
  11 +// const searchApi = global.yoho.SearchAPI;
11 const Images = require('../../../utils/images'); 12 const Images = require('../../../utils/images');
12 const headerModel = require('../../../doraemon/models/header'); 13 const headerModel = require('../../../doraemon/models/header');
13 14
@@ -249,12 +250,11 @@ const getUserInfo = (channel, uid) => { @@ -249,12 +250,11 @@ const getUserInfo = (channel, uid) => {
249 ]).then(result => { 250 ]).then(result => {
250 let finalResult = {}, 251 let finalResult = {},
251 headerData = {}, 252 headerData = {},
252 - userInfo = {},  
253 - brandList; 253 + userInfo = {};
254 254
255 - brandList = searchApi.get('/brand/list.json', {is_hot: 'Y'}, {  
256 - cache: true  
257 - }); 255 + // brandList = searchApi.get('/brand/list.json', {is_hot: 'Y'}, {
  256 + // cache: true
  257 + // });
258 258
259 if (result[0].code === 200) { 259 if (result[0].code === 200) {
260 headerData = result[0]; 260 headerData = result[0];
@@ -481,6 +481,7 @@ const getUserInfo = (channel, uid) => { @@ -481,6 +481,7 @@ const getUserInfo = (channel, uid) => {
481 finalResult.favorite = { 481 finalResult.favorite = {
482 subTitle: '喜爱品牌', 482 subTitle: '喜爱品牌',
483 submitId: 'favorite-brand' 483 submitId: 'favorite-brand'
  484 +
484 // likebrand: (substr($userLikeBrandInfo['likeBrandStr'], 0, 1) == ',') ? 485 // likebrand: (substr($userLikeBrandInfo['likeBrandStr'], 0, 1) == ',') ?
485 // $userLikeBrandInfo['likeBrandStr'] : ',' . $userLikeBrandInfo['likeBrandStr'], 486 // $userLikeBrandInfo['likeBrandStr'] : ',' . $userLikeBrandInfo['likeBrandStr'],
486 // favoriteBrands: $userLikeBrandInfo['favBrands'], 487 // favoriteBrands: $userLikeBrandInfo['favBrands'],
@@ -530,7 +531,7 @@ const editUserHabitsInfo = (req, uid) => { @@ -530,7 +531,7 @@ const editUserHabitsInfo = (req, uid) => {
530 if (req.body.dress) { 531 if (req.body.dress) {
531 dressArr = req.body.dress; 532 dressArr = req.body.dress;
532 habitsInfo.dress = dressArr.join(','); 533 habitsInfo.dress = dressArr.join(',');
533 - }else { 534 + } else {
534 habitsInfo.dress = ''; 535 habitsInfo.dress = '';
535 } 536 }
536 537