ui fixes
This commit is contained in:
parent
cc755f6204
commit
cbb7c7ff23
@ -38,12 +38,11 @@ export default {
|
|||||||
name: "CourseCard",
|
name: "CourseCard",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLogin: lms.store.isLogin,
|
|
||||||
courseMeta: {}
|
courseMeta: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if(this.isLogin) this.getCourseMeta().then(data => this.courseMeta = data)
|
this.getCourseMeta().then(data => this.courseMeta = data)
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AButton
|
AButton
|
||||||
@ -65,6 +64,9 @@ export default {
|
|||||||
else {
|
else {
|
||||||
return " hidden"
|
return " hidden"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
isLogin() {
|
||||||
|
return lms.store.checkLogin()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -12,7 +12,12 @@ const routes = [
|
|||||||
component: ContentPage,
|
component: ContentPage,
|
||||||
props: true,
|
props: true,
|
||||||
beforeEnter: (to, from, next) => {
|
beforeEnter: (to, from, next) => {
|
||||||
if(!lms.store.isLogin) next({name: 'home'})
|
if(!lms.store.isLogin){
|
||||||
|
next({name: 'home'})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
next()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user