mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 21:36:42 +08:00
调整修改
This commit is contained in:
@@ -4,17 +4,35 @@ const userCodes=[
|
|||||||
'00004409'
|
'00004409'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const userCodesPro=[
|
||||||
|
'00004409'
|
||||||
|
]
|
||||||
|
|
||||||
/**是否是测试人员*/
|
/**是否是测试人员*/
|
||||||
const isTest=function(code){
|
const isTest=function(code){
|
||||||
var testUser=false;
|
var testUser=false;
|
||||||
userCodes.some(item=>{
|
var mode=process.env.NODE_ENV;
|
||||||
if(item===code){
|
|
||||||
testUser=true;
|
if(mode=='testing'){
|
||||||
return true;
|
userCodes.some(item=>{
|
||||||
}else{
|
if(item===code){
|
||||||
return false;
|
testUser=true;
|
||||||
}
|
return true;
|
||||||
})
|
}else{
|
||||||
|
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