提交 fa5d1b44 编写于 作者: huangwensu's avatar huangwensu

添加申请学分提示框

上级 71f0e77a
此差异已折叠。
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
</div> </div>
</div> </div>
<Loading v-show="showLoading" /> <Loading v-show="showLoading" />
<!-- 弹框 -->
<CommonDialog <CommonDialog
:isShowDialog="isShowDialog" :isShowDialog="isShowDialog"
:isSingle="isSingle" :isSingle="isSingle"
...@@ -113,6 +114,7 @@ import vueFilters from "@/utils/filter"; ...@@ -113,6 +114,7 @@ import vueFilters from "@/utils/filter";
export default { export default {
data() { data() {
return { return {
premissionFlag: false,
isSingle: false, isSingle: false,
dialogContent: "", // 弹框内容 dialogContent: "", // 弹框内容
confirmBtnText: "", // 弹框按钮 confirmBtnText: "", // 弹框按钮
...@@ -216,7 +218,6 @@ export default { ...@@ -216,7 +218,6 @@ export default {
// _this.getProjectParticularsV2(); // _this.getProjectParticularsV2();
_this.getUserInfo(); _this.getUserInfo();
}; };
_this.permission(); // 提示是否有机构和在申请范围内
}, },
mounted() { mounted() {
window.addEventListener("scroll", this.scrollFun); window.addEventListener("scroll", this.scrollFun);
...@@ -256,6 +257,26 @@ export default { ...@@ -256,6 +257,26 @@ export default {
this.tabFlag = true; this.tabFlag = true;
} }
}, },
// token是否失效校验
checkToken() {
let _this = this;
let param = {
token: _this.userInfo.userToken,
setEntry: true
};
this.GET("campaign/admin/task/checkToken", param).then(res => {
if (res.code !== "000000") {
//未登录 跳转登录页
console.log("跳登录");
rocNative.gotoLogin();
}else {
if(!_this.premissionFlag) {
_this.premissionFlag = true;
_this.permission(); // 提示是否有机构和在申请范围内
}
}
});
},
//(判断是否加入机构,是否为认证用户,是否在申请范围内) //(判断是否加入机构,是否为认证用户,是否在申请范围内)
permission() { permission() {
let _this = this; let _this = this;
...@@ -346,21 +367,6 @@ export default { ...@@ -346,21 +367,6 @@ export default {
this.isBlack = true; this.isBlack = true;
this.bgColor = "#fff"; this.bgColor = "#fff";
}, },
// token是否失效校验
checkToken() {
let _this = this;
let param = {
token: _this.userInfo.userToken,
setEntry: true
};
this.GET("campaign/admin/task/checkToken", param).then(res => {
if (res.code !== "000000") {
//未登录 跳转登录页
console.log("跳登录");
rocNative.gotoLogin();
}
});
},
// 获取项目详情 // 获取项目详情
getProjectParticularsV2() { getProjectParticularsV2() {
let _this = this; let _this = this;
...@@ -387,10 +393,10 @@ export default { ...@@ -387,10 +393,10 @@ export default {
_this.projectLeader = res.data.projectLeader; _this.projectLeader = res.data.projectLeader;
_this.doctorList = res.data.doctorList; _this.doctorList = res.data.doctorList;
if (_this.project.currentProgress == 2) { if (_this.project.currentProgress == 2) {
this.dialogContent = // this.dialogContent =
"恭喜您已经完成该项目学习及考试,快去申请学分吧"; // "恭喜您已经完成该项目学习及考试,快去申请学分吧";
this.confirmBtnText = "立即申请"; // this.confirmBtnText = "立即申请";
this.isShowDialog = true; // this.isShowDialog = true;
} }
//_this.projectStatus = res.data.projectStatus; //_this.projectStatus = res.data.projectStatus;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册