Commit b33b3322 authored by chenfenglei's avatar chenfenglei

教师页面跳转

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