|
@@ -19,13 +19,16 @@ router.beforeEach(async(to, from, next) => {
|
|
|
const hasToken = store.getters.id
|
|
const hasToken = store.getters.id
|
|
|
|
|
|
|
|
if (to.query.courseid !== '' && to.query.courseid !== undefined) {
|
|
if (to.query.courseid !== '' && to.query.courseid !== undefined) {
|
|
|
- console.log(to.query.courseid);
|
|
|
|
|
|
|
+ console.log(to.query.courseid)
|
|
|
await store.commit('SET_COURSEID', to.query.courseid)
|
|
await store.commit('SET_COURSEID', to.query.courseid)
|
|
|
}
|
|
}
|
|
|
if (to.query.testid !== '' && to.query.testid !== undefined) {
|
|
if (to.query.testid !== '' && to.query.testid !== undefined) {
|
|
|
await store.commit('SET_TESTID', to.query.testid)
|
|
await store.commit('SET_TESTID', to.query.testid)
|
|
|
}
|
|
}
|
|
|
- let shareCourseId = window.location.href.indexOf("?shareCourseId=")!=-1?window.location.href.split("?shareCourseId=")[1].toString():''
|
|
|
|
|
|
|
+ const shareCourseId =
|
|
|
|
|
+ window.location.href.indexOf('?shareCourseId=') != -1
|
|
|
|
|
+ ? window.location.href.split('?shareCourseId=')[1].toString()
|
|
|
|
|
+ : ''
|
|
|
if (shareCourseId) {
|
|
if (shareCourseId) {
|
|
|
await store.commit('SET_SHARECOURSEID', shareCourseId)
|
|
await store.commit('SET_SHARECOURSEID', shareCourseId)
|
|
|
}
|
|
}
|