mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
修改管理端跳转地址
管理端接口调用,401,不再跳转登录,不过打印错误信息
This commit is contained in:
@@ -53,9 +53,11 @@ const formRequest=axios.create({
|
|||||||
return res.data
|
return res.data
|
||||||
}else{
|
}else{
|
||||||
if(code === 401){
|
if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
// store.dispatch('LogOut').then(() => {
|
||||||
location.href = this.webBaseUrl + ReLoginUrl;
|
// location.href = this.webBaseUrl + ReLoginUrl;
|
||||||
})
|
// })
|
||||||
|
console.error('',res.data);
|
||||||
|
return Promise.reject(new Error('接口返回未登录'))
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
Message({message: msg, type: 'error'});
|
Message({message: msg, type: 'error'});
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item><router-link to="/index">学员</router-link></el-dropdown-item>
|
<el-dropdown-item><router-link to="/index">学员</router-link></el-dropdown-item>
|
||||||
<el-dropdown-item v-if="identity == 2 || identity == 5" @click.native="setCurIdentity(2)"><router-link to="/need/waitaudit">教师</router-link></el-dropdown-item>
|
<el-dropdown-item v-if="identity == 2 || identity == 5" @click.native="setCurIdentity(2)"><router-link to="/need/waitaudit">教师</router-link></el-dropdown-item>
|
||||||
<el-dropdown-item v-if="identity == 3 || identity == 5" @click.native="setCurIdentity(3)"><router-link to="/course/manage">管理员</router-link></el-dropdown-item>
|
<el-dropdown-item v-if="identity == 3 || identity == 5" @click.native="setCurIdentity(3)"><router-link :to="`${webBaseUrl}`/manage">管理员</router-link></el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<div style="margin-top:10px">
|
<div style="margin-top:10px">
|
||||||
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
||||||
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
|
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
|
||||||
<span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span>
|
<router-link :to="`${webBaseUrl}`/manage"><span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" >管理员</span></router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user