mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 20:36:43 +08:00
调整修改
This commit is contained in:
@@ -4,9 +4,16 @@ const userCodes=[
|
|||||||
'00004409'
|
'00004409'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const userCodesPro=[
|
||||||
|
'00004409'
|
||||||
|
]
|
||||||
|
|
||||||
/**是否是测试人员*/
|
/**是否是测试人员*/
|
||||||
const isTest=function(code){
|
const isTest=function(code){
|
||||||
var testUser=false;
|
var testUser=false;
|
||||||
|
var mode=process.env.NODE_ENV;
|
||||||
|
|
||||||
|
if(mode=='testing'){
|
||||||
userCodes.some(item=>{
|
userCodes.some(item=>{
|
||||||
if(item===code){
|
if(item===code){
|
||||||
testUser=true;
|
testUser=true;
|
||||||
@@ -15,6 +22,17 @@ const isTest=function(code){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else if(mode=='preview' || mode=='production' ){
|
||||||
|
userCodesPro.some(item=>{
|
||||||
|
if(item===code){
|
||||||
|
testUser=true;
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return testUser;
|
return testUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user