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

修改未登录下按钮的问题

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