提交 82aa77cb 编写于 作者: tao.wu's avatar tao.wu

增加登录的校验

上级 993bb958
...@@ -221,61 +221,65 @@ export default { ...@@ -221,61 +221,65 @@ 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 {
if(!flag){ if(!flag && !this.loaded){
return; return;
} }
this.$rocNative.getToken().then(data => { this.$rocNative.getToken().then(data => {
const { userToken } = data; const { userToken } = data;
checkHospitalStatus(userToken).then(res => { checkHospitalStatus(userToken).then(res => {
const status = res.data.status; if(res.code=='200006'){
if (status == 1) { // 机构状态正常 this.$rocNative.gotoLogin();
remind({ token: userToken }).then(resD => { }else{
if (resD.code == '000000') { const status = res.data.status;
this.$dialog.alert({ if (status == 1) { // 机构状态正常
title: '设置提醒成功', remind({ token: userToken }).then(resD => {
message: '云鹊奖活动正式时间:12月16日 10:00开始,我们将会以APP消息提醒和短信形式提醒道您,请记得及时参与活动', if (resD.code == '000000') {
confirmButtonText: '我知道了', this.$dialog.alert({
className: 'remind-success' title: '设置提醒成功',
}); message: '云鹊奖活动正式时间:12月16日 10:00开始,我们将会以APP消息提醒和短信形式提醒道您,请记得及时参与活动',
this.remindStatus = true; confirmButtonText: '我知道了',
} else { className: 'remind-success'
this.$toast(resD.message) });
} this.remindStatus = true;
}) } else {
} else if (status == 15) { // 15创建机构审核中 this.$toast(resD.message)
let hospital = '默认机构名称';
if (res.data && res.data.hospital) {
hospital = res.data.hospital
}
this.$dialog.confirm({
title: '提醒',
message: `抱歉,您创建的机构【${hospital}】正在审核中,审核通过后可参与活动<br/><br/>如有疑问可联系客:<span>400-920-8877</span><br/>(周一至周五9:00-18:00)`,
confirmButtonText: '查看进度',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
this.checkVersion(()=>{
if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
}
this.$rocNative.gotoInstitutionalReview({ url: window.location.href });
});
});
} else { // 除了1都是未加入机构
this.$dialog.confirm({
title: '提醒',
message: '抱歉,您暂未加入机构,需加入机构才可参与活动',
confirmButtonText: '加入机构',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
this.checkVersion(()=>{
if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
} }
this.$rocNative.gotoActivityHospital({ url: window.location.href });
}) })
}); } else if (status == 15) { // 15创建机构审核中
let hospital = '默认机构名称';
if (res.data && res.data.hospital) {
hospital = res.data.hospital
}
this.$dialog.confirm({
title: '提醒',
message: `抱歉,您创建的机构【${hospital}】正在审核中,审核通过后可参与活动<br/><br/>如有疑问可联系客:<span>400-920-8877</span><br/>(周一至周五9:00-18:00)`,
confirmButtonText: '查看进度',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
this.checkVersion(()=>{
if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
}
this.$rocNative.gotoInstitutionalReview({ url: window.location.href });
});
});
} else { // 除了1都是未加入机构
this.$dialog.confirm({
title: '提醒',
message: '抱歉,您暂未加入机构,需加入机构才可参与活动',
confirmButtonText: '加入机构',
cancelButtonText: '我知道了',
className: 'remind-success',
}).then(() => {
this.checkVersion(()=>{
if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
}
this.$rocNative.gotoActivityHospital({ url: window.location.href });
})
});
}
} }
}) })
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册