Authored by zhangxiaoru

个人中心首页调取潮流口令

... ... @@ -113,6 +113,16 @@ const _getRes = () => {
});
};
// 潮流口令
const _getCode = (uid) => {
return api.get('', {
method: 'app.invitecode.my',
uid: uid
}, {
code: 200
});
};
/**
* 个人中心首页
* @param params
... ... @@ -139,14 +149,17 @@ const index = (params) => {
_favoriteData(params),
_infoNum(params),
_getAddressData(params),
_getRes()
_getRes(),
_getCode(params.uid)
]).then(result => {
if (result[0] && result[0].data) {
Object.assign(finalResult, {
profileName: result[0].data.profile_name,
headIco: result[0].data.head_ico,
vipInfo: result[0].data.vip_info,
students: _.get(result[0].data, 'vip_info.is_student', 0) === 1
students: _.get(result[0].data, 'vip_info.is_student', 0) === 1,
trendWorld: _.get(result[6].data, 'trendWorld', false),
inviteCode: _.get(result[6].data, 'inviteCode', false)
});
}
... ...
... ... @@ -13,8 +13,17 @@
{{/if}}
<div class="invition">
<span class="code">88888888</span>
<span class="upgrade">升级</span>
<span class="code">
{{#if trendWorld}}
# {{trendWorld}} #
{{else}}
{{inviteCode}}
{{/if}}
</span>
<span class="code-set"></span>
{{#unless trendWorld}}
<span class="code-tip">潮流口令</span>
{{/unless}}
</div>
<div class="iconfont more-icon tap-hightlight">&#xe604;</div>
</a>
... ...
... ... @@ -94,7 +94,7 @@
}
.invition {
width: 300px;
max-width: 600px;
font-size: 24px;
position: absolute;
top: 95px;
... ... @@ -103,10 +103,34 @@
line-height: 46px;
overflow: hidden;
.upgrade {
margin-left: 15px;
text-decoration: underline;
color: #d0021b;
.code-set {
margin-left: 8px;
width: 33px;
height: 32px;
background: url("/home/index/code-set.png");
background-size: 100%;
background-repeat: no-repeat;
display: inline-block;
position: relative;
top: 6px;
}
.code-tip {
margin-left: 8px;
width: 112px;
height: 30px;
background: url("/home/index/code-tip.png");
background-size: 100%;
background-repeat: no-repeat;
display: block;
float: right;
font-size: 18px;
line-height: 28px;
text-align: center;
position: relative;
top: 8px;
padding-left: 13px;
border-radius: 5px;
}
}
}
... ...