mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 05:16:43 +08:00
添加测试信息
This commit is contained in:
@@ -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>
|
||||||
<router-link to="/manager/index"><span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span></router-link>
|
<router-link :to="isTest? '/manage/learningpath':'/manager/index'"><span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span></router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,9 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="learning-info">
|
<div class="learning-info">
|
||||||
|
|
||||||
<div @click="jumrank" style="cursor: pointer;" class="ranking-link"> BOE 排行榜 >></div>
|
<div @click="jumrank" style="cursor: pointer;" class="ranking-link"> BOE 排行榜 >></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -92,6 +90,7 @@
|
|||||||
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import apiStart from '@/api/phase2/stat.js'
|
import apiStart from '@/api/phase2/stat.js'
|
||||||
|
import testUser from '@/utils/testUsers.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'UcHeader',
|
name: 'UcHeader',
|
||||||
computed:{
|
computed:{
|
||||||
@@ -103,6 +102,7 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||||
|
isTest:false,
|
||||||
statData:{
|
statData:{
|
||||||
evalue: 0,//经验值
|
evalue: 0,//经验值
|
||||||
level: "LV1",//级别
|
level: "LV1",//级别
|
||||||
@@ -129,8 +129,11 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
|
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
|
||||||
this.loadUserStat();
|
this.loadUserStat();
|
||||||
this.$bus.$on('u-Currency',(num)=>{
|
this.$bus.$on('u-Currency',(num)=>{
|
||||||
this.statData.uvalue = num;
|
this.statData.uvalue = num;
|
||||||
})
|
});
|
||||||
|
if(userTest.isTest(this.userInfo.code)){
|
||||||
|
this.isTest=true;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
|||||||
23
src/utils/testUsers.js
Normal file
23
src/utils/testUsers.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/**测试人员名单*/
|
||||||
|
|
||||||
|
const userCodes=[
|
||||||
|
'00004409'
|
||||||
|
]
|
||||||
|
|
||||||
|
/**是否是测试人员*/
|
||||||
|
const isTest=function(code){
|
||||||
|
var testUser=false;
|
||||||
|
userCodes.some(item=>{
|
||||||
|
if(item===code){
|
||||||
|
testUer=true;
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return testUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
isTest
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user