Authored by 郭成尧

'uercenter-bug-fix'

... ... @@ -80,10 +80,14 @@ const _infoNum = (params) => {
* @param params
*/
const _getAddressData = (params) => {
if (params.uid) {
return api.get('', {
method: 'app.address.gethidden',
uid: params.uid
}, {code: 200});
} else {
return false;
}
};
/**
... ... @@ -102,7 +106,8 @@ const index = (params) => {
cartUrl: helpers.urlFormat('/cart/index/index'),
signinUrl: helpers.urlFormat('/signin.html', {
refer: helpers.urlFormat('/home')
})
}),
verifyUrl: helpers.urlFormat('/activity/student/register')
};
return api.all([
... ... @@ -116,7 +121,8 @@ const index = (params) => {
Object.assign(finalResult, {
profileName: result[0].data.profile_name,
headIco: result[0].data.head_ico,
vipInfo: result[0].data.vip_info
vipInfo: result[0].data.vip_info,
students: _.get(result[0].data, 'vip_info.is_student', 0) === 1
});
}
... ...
... ... @@ -7,14 +7,21 @@
{{#vipInfo}}
<span class="vip-icon vip-{{cur_level}}"></span>
{{/vipInfo}}
{{#if students}}
<span class="vip-icon students"></span>
{{/if}}
<div class="iconfont more-icon tap-hightlight">&#xe604;</div>
</a>
{{/isLogin}}
{{^isLogin}}
{{#unless students}}
<a class="students-entry" href="{{verifyUrl}}">学生认证</a>
{{/unless}}
{{^}}
<div class="user-info">
<a class="login-btn" href="{{signinUrl}}">
登录/注册
</a>
<a class="students-entry" href="{{verifyUrl}}">学生认证</a>
</div>
{{/isLogin}}
</div>
... ...
... ... @@ -6,6 +6,26 @@
color: #444;
}
.my-header {
position: relative;
.students-entry {
display: block;
width: 120px;
height: 40px;
line-height: 40px;
border-top-left-radius: 40px;
border-bottom-left-radius: 40px;
background: #d0021b;
color: #fff;
padding-left: 20px;
position: absolute;
top: 20px;
right: 0;
font-size: 24px;
}
}
.user-info {
display: block;
position: relative;
... ... @@ -67,7 +87,7 @@
text-align: center;
&.highlight {
background: rgba(200, 200, 200, 0.1)!important;
background: rgba(200, 200, 200, 0.1) !important;
}
}
}
... ... @@ -107,13 +127,13 @@
}
&:after {
content: '';
content: "";
position: absolute;
right: 0;
top: 24px;
width: 0;
height: 44px;
border-right: 1px solid #fff;
border-right: 4px solid #fff;
}
&:last-of-type:after {
... ... @@ -250,7 +270,7 @@
}
&:after {
content: '';
content: "";
position: absolute;
right: 0;
bottom: 0;
... ...