diff --git a/src/components/UcHeader/Index.vue b/src/components/UcHeader/Index.vue
index dce50813..2a5aad72 100644
--- a/src/components/UcHeader/Index.vue
+++ b/src/components/UcHeader/Index.vue
@@ -48,7 +48,7 @@
学员
教师
- 管理员
+ 管理员
@@ -78,9 +78,9 @@
@@ -92,6 +92,7 @@
import {userAvatarText,cutFullName} from "@/utils/tools.js";
import { mapGetters } from 'vuex'
import apiStart from '@/api/phase2/stat.js'
+ import testUser from '@/utils/testUsers.js'
export default {
name: 'UcHeader',
computed:{
@@ -103,6 +104,7 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
data(){
return {
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
+ isTest:false,
statData:{
evalue: 0,//经验值
level: "LV1",//级别
@@ -130,8 +132,11 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
this.loadUserStat();
this.$bus.$on('u-Currency',(num)=>{
this.statData.uvalue = num;
- })
-
+ })
+ //console.log(this.userInfo.loginName,'this.userInfo.loginName')
+ if(testUser.isTest(this.userInfo.loginName)){
+ this.isTest=true;
+ }
},
methods:{
loadUserStat(){//获取经验值和等级
@@ -157,6 +162,13 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden);
+
+ if(this.isTest){
+ //this.$router.push('/manage/learningpath');
+ location.href=process.env.BASE_URL+'manage/learningpath';
+ }else{
+ this.$router.push('/manager/index');
+ }
},
jumrank(){
this.$router.push('/user/ranking');
diff --git a/src/utils/testUsers.js b/src/utils/testUsers.js
new file mode 100644
index 00000000..6942a9cd
--- /dev/null
+++ b/src/utils/testUsers.js
@@ -0,0 +1,23 @@
+/**测试人员名单*/
+
+const userCodes=[
+ '00004409'
+]
+
+/**是否是测试人员*/
+const isTest=function(code){
+ var testUser=false;
+ userCodes.some(item=>{
+ if(item===code){
+ testUser=true;
+ return true;
+ }else{
+ return false;
+ }
+ })
+ return testUser;
+}
+
+export default {
+ isTest
+}