From 2ae322a84e64fb92ab06aa3ff92a626eb346231a Mon Sep 17 00:00:00 2001 From: daihh Date: Sun, 11 Dec 2022 20:31:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UcHeader/Index.vue | 13 ++++++++----- src/utils/testUsers.js | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 src/utils/testUsers.js diff --git a/src/components/UcHeader/Index.vue b/src/components/UcHeader/Index.vue index dce50813..957b64de 100644 --- a/src/components/UcHeader/Index.vue +++ b/src/components/UcHeader/Index.vue @@ -48,7 +48,7 @@
学员 教师 - 管理员 + 管理员
@@ -78,9 +78,7 @@
- -
@@ -92,6 +90,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 +102,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",//级别 @@ -129,8 +129,11 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js"; this.orgInfo=cutFullName(this.userInfo.departFullName,1); this.loadUserStat(); this.$bus.$on('u-Currency',(num)=>{ - this.statData.uvalue = num; - }) + this.statData.uvalue = num; + }); + if(userTest.isTest(this.userInfo.code)){ + this.isTest=true; + } }, methods:{ diff --git a/src/utils/testUsers.js b/src/utils/testUsers.js new file mode 100644 index 00000000..5a152b28 --- /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){ + testUer=true; + return true; + }else{ + return false; + } + }) + return testUser; +} + +export default { + isTest +}