|
@@ -5,7 +5,15 @@
|
|
|
<div class="container d-f">
|
|
|
<div class="leftMenu">
|
|
|
<div class="mimg_box">
|
|
|
- <img src="../../assets/2.png" alt="" />
|
|
|
+ <img src="@/assets/su1.png" alt="" v-if="info.subject=='语文'" />
|
|
|
+ <img src="@/assets/su2.png" alt="" v-if="info.subject=='数学'" />
|
|
|
+ <img src="@/assets/su3.png" alt="" v-if="info.subject=='英语'" />
|
|
|
+ <img src="@/assets/su4.png" alt="" v-if="info.subject=='物理'" />
|
|
|
+ <img src="@/assets/su5.png" alt="" v-if="info.subject=='化学'" />
|
|
|
+ <img src="@/assets/su6.png" alt="" v-if="info.subject=='政治'" />
|
|
|
+ <img src="@/assets/su7.png" alt="" v-if="info.subject=='历史'" />
|
|
|
+ <img src="@/assets/su8.png" alt="" v-if="info.subject=='生物'" />
|
|
|
+ <img src="@/assets/su9.png" alt="" v-if="info.subject=='化学'" />
|
|
|
</div>
|
|
|
<div class="bg-white">
|
|
|
<div class="Menu_list d-f">
|
|
@@ -204,6 +212,7 @@ import {
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ info:{},
|
|
|
params: {
|
|
|
ctgid: "",
|
|
|
ctype: "work",
|
|
@@ -238,7 +247,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
localStorage.setItem("navKey", "1");
|
|
|
- // var time = parseInt(new Date().getTime()/1000)
|
|
|
+ // var time = parseInt(new Date().getTime()/1000)
|
|
|
// if(this.Common.timeLogin() ==2){
|
|
|
// localStorage.setItem('open_tiem',time)
|
|
|
// this.$router.go(0);
|
|
@@ -248,6 +257,26 @@ export default {
|
|
|
// localStorage.setItem('open_tiem',time)
|
|
|
// return
|
|
|
// }
|
|
|
+ if(localStorage.getItem("is_user") != 1){
|
|
|
+ this.info = JSON.parse(localStorage.getItem('user_info'))
|
|
|
+ }else{
|
|
|
+ // this.$router.go(0)
|
|
|
+ this.axios({
|
|
|
+ method:'get',
|
|
|
+ url:'/v1/api/account',
|
|
|
+ headers:{
|
|
|
+ Authorization : ' Bearer ' + localStorage.getItem('token')
|
|
|
+ },
|
|
|
+ data:{},
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.errcode==0){
|
|
|
+ localStorage.setItem('is_user',2)
|
|
|
+ localStorage.setItem('user_info', JSON.stringify(res.data.data))
|
|
|
+ this.info = JSON.parse(localStorage.getItem('user_info'))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
if (localStorage.getItem("is_login") == 1) {
|
|
|
localStorage.setItem("is_login", 2);
|
|
|
this.$router.go(0);
|
|
@@ -395,12 +424,12 @@ export default {
|
|
|
},
|
|
|
//获取列表
|
|
|
getList() {
|
|
|
- const load = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "Loading",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
- });
|
|
|
+ // const load = this.$loading({
|
|
|
+ // lock: true,
|
|
|
+ // text: "Loading",
|
|
|
+ // spinner: "el-icon-loading",
|
|
|
+ // background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ // });
|
|
|
var that = this;
|
|
|
var obj = JSON.parse(JSON.stringify(this.params));
|
|
|
for (let key in obj) {
|
|
@@ -417,7 +446,7 @@ export default {
|
|
|
that.total = 0;
|
|
|
that.$message.warning(res.mess)
|
|
|
}
|
|
|
- load.close();
|
|
|
+ // load.close();
|
|
|
});
|
|
|
},
|
|
|
//排序
|