提交 0dbf3c27 编写于 作者: tao.wu's avatar tao.wu

修改未登录下按钮的问题

上级 5c99b715
......@@ -18,12 +18,12 @@
</div>
</div>
</div>
<div class="btn-appoint btn-app-share" id="imgHeight3">
<img v-if="showRemindBtn()" @click="setRemind" src="../assets/img/btn_appoint.png" />
<template v-if="remindStatus">
<div v-show="loaded || isWeb" class="btn-appoint btn-app-share" id="imgHeight3">
<img v-if="showRemindBtn" @click="setRemind" src="../assets/img/btn_appoint.png" />
<div v-else>
<img src="../assets/img/btn_appointed.png">
<div class="appoint-time">12月16号我们会提示你参加活动</div>
</template>
</div>
</div>
<div>
<img src="../assets/img/img6.png" />
......@@ -59,7 +59,7 @@
<div class="abs-btn">
<img @click="ruleLink" src="../assets/img/btn_rules.png">
</div>
<div v-if="showFixed && showRemindBtn()" @click="setRemind" class="fix-btn">
<div v-if="showFixed && showRemindBtn" @click="setRemind" class="fix-btn">
<div>开赛时提醒我</div>
</div>
</section>
......@@ -90,8 +90,10 @@ export default {
scrollVal: 0,
isWeb: false,
remindStatus: false,
canClick: false,
shareObj: {}
isLogin: false,
loaded: false,
shareObj: {},
}
},
created() {
......@@ -104,7 +106,6 @@ export default {
},
mounted() {
const _seft = this;
this.$rocNative.appInit();
window.__refresh = function() {
alert('准备自动触发预约')
......@@ -118,16 +119,20 @@ export default {
}
this.isWeb = this.$rocNative.isWeb;
// this.isWeb = false;
// this.remindStatus = false;
// this.canClick = true;
// this.isLogin = true;
// this.loaded = true;
// this.remindStatus = true;
// 通过获取token,初始化数据
this.$rocNative.getToken().then(res => {
const { userToken } = res;
getRemindStatus(userToken).then(res => {
if(res.code=='000000'){
this.isLogin = true;
this.remindStatus = res.data;
}else if(res.code=='200006'){
this.isLogin = false;
}
this.canClick = true;
this.loaded = true;
});
});
// 滚动交互
......@@ -159,20 +164,22 @@ export default {
});
})
},
methods: {
computed: {
showRemindBtn(){
let flag;
if(this.isWeb){
flag = true;
let flag = false;
if(this.isLogin){
if(this.remindStatus){
flag = false;
}else{
if(this.canClick && !this.remindStatus){
flag = true;
}else{
flag = false;
}
}else{
flag = true;
}
return flag;
},
},
methods: {
// 处理滚动按钮悬浮事件
scrollHandle() {
const _self = this;
......@@ -214,8 +221,7 @@ export default {
window.location.href = 'https://android.myapp.com/myapp/detail.htm?apkName=com.picahealth.yunque&ADTAG=mobile';
});
} else {
alert('canClick==='+this.canClick)
if(!this.canClick && !flag){
if(!flag){
return;
}
this.$rocNative.getToken().then(data => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册