Commit b33b3322 authored by chenfenglei's avatar chenfenglei

教师页面跳转

parent 563f92e4
...@@ -62,7 +62,8 @@ ...@@ -62,7 +62,8 @@
}; };
loginApi(json).then(res=>{ loginApi(json).then(res=>{
if(res.teacher_info){ if(res.teacher_info){
localStorage.setItem("phoneNum",res.teacher_info) let data=JSON.stringify(res.teacher_info)
localStorage.setItem("phoneNum",data)
}else{ }else{
localStorage.setItem("phoneNum","") localStorage.setItem("phoneNum","")
} }
......
...@@ -130,9 +130,10 @@ ...@@ -130,9 +130,10 @@
}, },
mounted(){ mounted(){
let data= localStorage.getItem("phoneNum") let data= localStorage.getItem("phoneNum")
data=JSON.parse(data)
if(data){ if(data){
console.log(data) console.log(data.id)
this.$router.push('/teacher/'+ data); this.$router.push('/teacher/'+ data.id);
}else{ }else{
this.getUser() this.getUser()
......
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover <el-popover
placement="top" placement="top"
width="400"> width="200">
<div style="text-align: center"> <div style="text-align: center">
<el-button <el-button
@click="editComment(scope.row.id, scope.row.desc)" @click="editComment(scope.row.id, scope.row.desc)"
......
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