|
@@ -7,6 +7,7 @@ |
|
@@ -7,6 +7,7 @@ |
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 Images = require('../../../utils/images');
|
10
|
const headerModel = require('../../../doraemon/models/header');
|
11
|
const headerModel = require('../../../doraemon/models/header');
|
11
|
|
12
|
|
12
|
const configData = {
|
13
|
const configData = {
|
|
@@ -71,18 +72,18 @@ const configData = { |
|
@@ -71,18 +72,18 @@ const configData = { |
71
|
value: '1',
|
72
|
value: '1',
|
72
|
text: '目的型购物'
|
73
|
text: '目的型购物'
|
73
|
},
|
74
|
},
|
74
|
- {
|
|
|
75
|
- type: 'radio',
|
|
|
76
|
- key: 'shopping',
|
|
|
77
|
- value: '2',
|
|
|
78
|
- text: '冲动型购物'
|
|
|
79
|
- },
|
|
|
80
|
- {
|
|
|
81
|
- type: 'radio',
|
|
|
82
|
- key: 'shopping',
|
|
|
83
|
- value: '3',
|
|
|
84
|
- text: '保守型购物'
|
|
|
85
|
- }],
|
75
|
+ {
|
|
|
76
|
+ type: 'radio',
|
|
|
77
|
+ key: 'shopping',
|
|
|
78
|
+ value: '2',
|
|
|
79
|
+ text: '冲动型购物'
|
|
|
80
|
+ },
|
|
|
81
|
+ {
|
|
|
82
|
+ type: 'radio',
|
|
|
83
|
+ key: 'shopping',
|
|
|
84
|
+ value: '3',
|
|
|
85
|
+ text: '保守型购物'
|
|
|
86
|
+ }],
|
86
|
|
87
|
|
87
|
// 着装习惯
|
88
|
// 着装习惯
|
88
|
dressHabits: [{
|
89
|
dressHabits: [{
|
|
@@ -92,48 +93,50 @@ const configData = { |
|
@@ -92,48 +93,50 @@ const configData = { |
92
|
value: '1',
|
93
|
value: '1',
|
93
|
text: '正装'
|
94
|
text: '正装'
|
94
|
},
|
95
|
},
|
95
|
- {
|
|
|
96
|
- type: 'checkbox',
|
|
|
97
|
- key: 'dress[]',
|
|
|
98
|
- index: 'dress-2',
|
|
|
99
|
- value: '2',
|
|
|
100
|
- text: '商务'
|
|
|
101
|
- },
|
|
|
102
|
- {
|
|
|
103
|
- type: 'checkbox',
|
|
|
104
|
- key: 'dress[]',
|
|
|
105
|
- index: 'dress-3',
|
|
|
106
|
- value: '3',
|
|
|
107
|
- text: '街头流行'
|
|
|
108
|
- },
|
|
|
109
|
- {
|
|
|
110
|
- type: 'checkbox',
|
|
|
111
|
- key: 'dress[]',
|
|
|
112
|
- index: 'dress-4',
|
|
|
113
|
- value: '4',
|
|
|
114
|
- text: '运动休闲'
|
|
|
115
|
- },
|
|
|
116
|
- {
|
|
|
117
|
- type: 'checkbox',
|
|
|
118
|
- key: 'dress[]',
|
|
|
119
|
- index: 'dress-5',
|
|
|
120
|
- value: '5',
|
|
|
121
|
- text: '文艺气质'
|
|
|
122
|
- },
|
|
|
123
|
- {
|
|
|
124
|
- type: 'checkbox',
|
|
|
125
|
- key: 'dress[]',
|
|
|
126
|
- index: 'dress-6',
|
|
|
127
|
- value: '6',
|
|
|
128
|
- text: '甜美可爱'
|
|
|
129
|
- },
|
|
|
130
|
- {
|
|
|
131
|
- type: 'checkbox',
|
|
|
132
|
- key: 'dress[]',
|
|
|
133
|
- index: 'dress-7',
|
|
|
134
|
- value: '7',
|
|
|
135
|
- text: '另类'
|
|
|
136
|
- }]
|
96
|
+ {
|
|
|
97
|
+ type: 'checkbox',
|
|
|
98
|
+ key: 'dress[]',
|
|
|
99
|
+ index: 'dress-2',
|
|
|
100
|
+ value: '2',
|
|
|
101
|
+ text: '商务'
|
|
|
102
|
+ },
|
|
|
103
|
+ {
|
|
|
104
|
+ type: 'checkbox',
|
|
|
105
|
+ key: 'dress[]',
|
|
|
106
|
+ index: 'dress-3',
|
|
|
107
|
+ value: '3',
|
|
|
108
|
+ text: '街头流行'
|
|
|
109
|
+ },
|
|
|
110
|
+ {
|
|
|
111
|
+ type: 'checkbox',
|
|
|
112
|
+ key: 'dress[]',
|
|
|
113
|
+ index: 'dress-4',
|
|
|
114
|
+ value: '4',
|
|
|
115
|
+ text: '运动休闲'
|
|
|
116
|
+ },
|
|
|
117
|
+ {
|
|
|
118
|
+ type: 'checkbox',
|
|
|
119
|
+ key: 'dress[]',
|
|
|
120
|
+ index: 'dress-5',
|
|
|
121
|
+ value: '5',
|
|
|
122
|
+ text: '文艺气质'
|
|
|
123
|
+ },
|
|
|
124
|
+ {
|
|
|
125
|
+ type: 'checkbox',
|
|
|
126
|
+ key: 'dress[]',
|
|
|
127
|
+ index: 'dress-6',
|
|
|
128
|
+ value: '6',
|
|
|
129
|
+ text: '甜美可爱'
|
|
|
130
|
+ },
|
|
|
131
|
+ {
|
|
|
132
|
+ type: 'checkbox',
|
|
|
133
|
+ key: 'dress[]',
|
|
|
134
|
+ index: 'dress-7',
|
|
|
135
|
+ value: '7',
|
|
|
136
|
+ text: '另类'
|
|
|
137
|
+ }],
|
|
|
138
|
+ headDefaultImgIcon: '//img10.static.yhbimg.com/headimg/' +
|
|
|
139
|
+ '2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'
|
137
|
};
|
140
|
};
|
138
|
|
141
|
|
139
|
const getDays = (year, month) => {
|
142
|
const getDays = (year, month) => {
|
|
@@ -260,6 +263,9 @@ const getUserInfo = (channel, uid) => { |
|
@@ -260,6 +263,9 @@ const getUserInfo = (channel, uid) => { |
260
|
|
263
|
|
261
|
userInfo = result[1].data || {};
|
264
|
userInfo = result[1].data || {};
|
262
|
|
265
|
|
|
|
266
|
+ finalResult.userThumb = userInfo.head_ico === '' ?
|
|
|
267
|
+ configData.headDefaultImgIcon : Images.getImageUrl(userInfo.head_ico, 100, 100, 2);
|
|
|
268
|
+
|
263
|
if (userInfo) {
|
269
|
if (userInfo) {
|
264
|
gender = userInfo.gender || 3;
|
270
|
gender = userInfo.gender || 3;
|
265
|
birthday = userInfo.birthday || '';
|
271
|
birthday = userInfo.birthday || '';
|
|
@@ -477,6 +483,21 @@ const getUserInfo = (channel, uid) => { |
|
@@ -477,6 +483,21 @@ const getUserInfo = (channel, uid) => { |
477
|
});
|
483
|
});
|
478
|
};
|
484
|
};
|
479
|
|
485
|
|
|
|
486
|
+const editUserInfo = (req, uid) => {
|
|
|
487
|
+ console.info(req.body);
|
|
|
488
|
+ console.info(req.body.nickname);
|
|
|
489
|
+ console.info(req.body.username);
|
|
|
490
|
+ console.info(req.body.gender);
|
|
|
491
|
+ console.info(req.body.year);
|
|
|
492
|
+ console.info(req.body.month);
|
|
|
493
|
+ console.info(req.body.day);
|
|
|
494
|
+ console.info(req.body.profession);
|
|
|
495
|
+ console.info(req.body.income);
|
|
|
496
|
+
|
|
|
497
|
+ return '';
|
|
|
498
|
+};
|
|
|
499
|
+
|
480
|
module.exports = {
|
500
|
module.exports = {
|
481
|
- getUserInfo
|
501
|
+ getUserInfo,
|
|
|
502
|
+ editUserInfo
|
482
|
}; |
503
|
}; |