提交 78c5083b 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

添加个人榜单、机构榜单未登录状态

上级 bc72f068
......@@ -31,7 +31,7 @@
<div class="content">
<div class="left">
<p class="score">我的机构勤奋分<span>{{personalData.hospitalDiligence}}</span></p>
<p class="rank" v-if="personalData.hospitalRank<=100&&personalData.hospitalRank">恭喜您的机构上榜排名<span>{{personalData.hospitalRank}}</span></p>
<p class="rank" v-if="personalData.hospitalRank<=100&&personalData.hospitalRank">恭喜您的机构上榜排名<span>{{personalData.hospitalRank}}</span></p>
<p class="rank" v-else>很遗憾,您的机构未上榜</p>
</div>
<div class="right" @click="share">分享排名</div>
......@@ -128,10 +128,24 @@
});
//微信分享初始化--end
if(!this.isWeb) {
this.getPersonScore();
this.getUserInfo();
};
window.__refresh = function(params) {
_this.getUserInfo(); // 判断是否登录
}
},
methods: {
getUserInfo() { // 判断是否登录
this.$rocNative.getUserInfo().then(res => {
if(res.userMobile){
setCookie('token', res.userToken)
this.getPersonScore();
this.isLogin = true;
} else {
this.isLogin = false;
}
})
},
getPersonScore() {
getPersonScore().then(res => {
this.personalData = res.data
......
......@@ -28,7 +28,7 @@
<span class="line"></span>
</div>
</div>
<div class="footer" v-if="!isWeb" :style="{height: `${50+homeIndicatorHeight}` + 'Px'}">
<div class="footer" v-if="!isWeb&&isLogin" :style="{height: `${50+homeIndicatorHeight}` + 'Px'}">
<div class="content">
<div class="left">
<p class="score">我的勤奋分<span>{{personalData.diligence}}</span></p>
......@@ -68,7 +68,8 @@
1: require('../../assets/img/stage3/rank-icon2.png'),
2: require('../../assets/img/stage3/rank-icon3.png'),
},
appCallUrl: ''
appCallUrl: '',
isLogin: true
}
},
async asyncData( {query} ) {
......@@ -112,10 +113,24 @@
});
//微信分享初始化--end
if(!this.isWeb) {
this.getPersonScore();
this.getUserInfo();
};
window.__refresh = function(params) {
_this.getUserInfo(); // 判断是否登录
}
},
methods: {
getUserInfo() { // 判断是否登录
this.$rocNative.getUserInfo().then(res => {
if(res.userMobile){
setCookie('token', res.userToken)
this.getPersonScore();
this.isLogin = true;
} else {
this.isLogin = false;
}
})
},
getPersonScore() {
getPersonScore().then(res => {
this.personalData = res.data
......
......@@ -42,7 +42,6 @@ export const getPersonScore = (params) => {
export const getPersonList = () => {
return request({
url: '/campaign/third/share/person/rank',
withCredentials: true
})
}
/*判断活动是否结束*/
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册