推送看课

parent 8aae6476
...@@ -323,8 +323,9 @@ ...@@ -323,8 +323,9 @@
// 从微信推送进入 // 从微信推送进入
getCourseInfoApi(this.$route.query.periods_id).then(res =>{ getCourseInfoApi(this.$route.query.periods_id).then(res =>{
localStorage.setItem('userCourse',''); localStorage.setItem('userCourse','');
this.userCourse = Object.assign({},res) // this.$commom.deepCopy(res)
localStorage.setItem('userCourse',JSON.stringify(this.userCourse)); this.userCourse = this.$common.deepCopy(res)
localStorage.setItem('userCourse',JSON.stringify(res));
this.setCourse() this.setCourse()
}) })
}else{ }else{
...@@ -334,8 +335,8 @@ ...@@ -334,8 +335,8 @@
}else{ }else{
getCourseInfoApi().then(res =>{ getCourseInfoApi().then(res =>{
localStorage.setItem('userCourse',''); localStorage.setItem('userCourse','');
this.userCourse = Object.assign({},res) this.userCourse = this.$common.deepCopy(res)
localStorage.setItem('userCourse',JSON.stringify(this.userCourse)); localStorage.setItem('userCourse',JSON.stringify(res));
this.setCourse() this.setCourse()
}) })
} }
......
...@@ -37,12 +37,11 @@ const errorHandler = (error, vm)=>{ ...@@ -37,12 +37,11 @@ const errorHandler = (error, vm)=>{
} }
Vue.config.errorHandler = errorHandler; Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = (error)=> errorHandler(error,this); Vue.prototype.$throw = (error)=> errorHandler(error,this);
Vue.prototype.$common = common Vue.prototype.$common = common
//VConsole关闭屏蔽代码 //VConsole关闭屏蔽代码
if (process.env.NODE_ENV != 'production') { // if (process.env.NODE_ENV != 'production') {
new VConsole(); // new VConsole();
} // }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
next() next()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment