Authored by zhangxiaoru

资料页

... ... @@ -211,42 +211,36 @@ const index = (params) => {
});
};
const _detailInfo = (uid) => {
return api.get('', {
method: 'app.passport.profile',
uid: uid
}, {
code: 200
});
};
/**
* 个人基本资料
* @param params
*/
const myDetails = (uid) => {
if (uid) {
return api.get('', {
method: 'app.passport.profile',
uid: uid
}, {
code: 200
}).then((result) => {
if (result.data) {
result.data.gender = (result.data.gender === '1' ? '男' : '女');
result.data.qrcodeLink = helpers.urlFormat('/home/user/qrcode', {
token: _.get(result, 'data.uid', null) ?
return api.all([_detailInfo(uid), _getCode(uid)]).then(result => {
if (result[0].data) {
result[0].data.gender = (result[0].data.gender === '1' ? '男' : '女');
result[0].data.qrcodeLink = helpers.urlFormat('/home/user/qrcode', {
token: _.get(result[0], 'data.uid', null) ?
crypto.encryption('yoho9646yoho9646', _.get(result, 'data.uid', null) + '') : '',
icon: _.get(result, 'data.head_ico', ''),
uname: _.get(result, 'data.nickname', ''),
vip: _.get(result, 'data.vip_info.cur_level')
icon: _.get(result[0], 'data.head_ico', ''),
uname: _.get(result[0], 'data.nickname', ''),
vip: _.get(result[0], 'data.vip_info.cur_level')
});
return result.data;
// {
// nickname: result.data.nickname,
// gender: result.data.gender,
// birthday: result.data.birthday,
// headIco: result.data.headIco,
// vipInfo: {
// curLevel: result.data.vipInfo.curLevel
// }
// }
result[0].data.trendWorld = _.get(result[1].data, 'trendWorld', false);
result[0].data.inviteCode = _.get(result[1].data, 'inviteCode', false);
}
// return finalResult;
return result[0].data;
});
} else {
return Promise.resolve({});
... ...
... ... @@ -15,22 +15,27 @@
</span>
</li>
<li>
<span>我的潮流口令</span>
<span>我的二维码</span>
<span>
<a href="" class="command">
<b></b>2222222222
<a href="{{qrcodeLink}}" class="grade">
<span class="iconfont">&#xe64d;</span>
<span class="iconfont">&#xe604;</span>
</a>
</span>
</li>
<!-- <li>
<span>我的二维码</span>
<li>
<span>我的潮流口令</span>
<span>
<a href="{{qrcodeLink}}" class="grade">
<span class="iconfont">&#xe64d;</span>
<a href="//m.yohobuy.com/home/tide-command" class="command">
{{#if trendWorld}}
{{trendWorld}}
{{else}}
{{inviteCode}}
{{/if}}
<span class="iconfont">&#xe604;</span>
</a>
</span>
</li> -->
<b class="tip">新玩法</b>
</li>
</ul>
</div>
... ...
... ... @@ -93,13 +93,24 @@
}
}
.tip {
background: url("/home/index/code-tip.png");
background-size: 100%;
background-repeat: no-repeat;
width: 85px;
height: 26px;
display: inline-block;
font-size: 14px;
color: #fff;
position: relative;
top: -58px;
left: 205px;
padding-left: 17px;
border-radius: 5px;
}
.command {
color: #b0b0b0;
b {
color: #d0021b;
margin-right: 5px;
}
}
&:last-of-type {
... ...