提交 aca9f4aa authored 作者: lihuihui's avatar lihuihui

updata

上级 6b63a15e
...@@ -96,6 +96,10 @@ export default { ...@@ -96,6 +96,10 @@ export default {
} }
}, },
mounted() { mounted() {
const userRole = parseInt(this.$store.state.user.student_info.role)
if (userRole !== 0) {
this.roleChange = userRole
}
if (window.localStorage.isExamEnd === 'true' || window.localStorage.isExamEnd === true) { if (window.localStorage.isExamEnd === 'true' || window.localStorage.isExamEnd === true) {
this.abilityExam() this.abilityExam()
} }
...@@ -129,13 +133,12 @@ export default { ...@@ -129,13 +133,12 @@ export default {
const param = { const param = {
type: 2 type: 2
} }
api.setRole({ role: this.roleChange }).then(res => {
if (res.code === 0) {
api.getExamStatus(param).then(res => { api.getExamStatus(param).then(res => {
if (res.status === '0' || res.status === '3') { if (res.status === '0' || res.status === 0 || res.status === '3' || res.status === 3) {
this.isExamPop = true this.isExamPop = true
} else { } else {
api.setRole({ role: this.roleChange }).then(res => {
console.log(res.code)
if (res.code === 0) {
this.goAbilityExam(1) this.goAbilityExam(1)
} }
}) })
......
...@@ -128,6 +128,7 @@ export default { ...@@ -128,6 +128,7 @@ export default {
font-size: 0.3rem; font-size: 0.3rem;
color: #222; color: #222;
word-wrap: break-word; word-wrap: break-word;
font-weight: bold;
} }
} }
.deti { .deti {
...@@ -141,6 +142,7 @@ export default { ...@@ -141,6 +142,7 @@ export default {
font-size: 0.26rem; font-size: 0.26rem;
color: #222; color: #222;
margin-left: auto; margin-left: auto;
font-weight: bold;
} }
.invo{ .invo{
font-size: .3rem; font-size: .3rem;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论