优化管理后台

This commit is contained in:
2023-03-24 18:03:04 +08:00
parent 37402b0ea4
commit 820eae2394
12 changed files with 922 additions and 30 deletions

View File

@@ -146,6 +146,34 @@ const custom = {
})
return data
},
getUserPosition(user_type) { // 获取用户身份
const position_arr = ['普通用户','助教','老师', '主管']; //普通用户,助教,老师,主管
const val_arr = []
for(let i = 0;i< position_arr.length;i++) {
if((user_type & 0b1) === 0b1 && i === 0) {
val_arr.push(0)
}
if((user_type & 0b10) === 0b10 && i === 1){
val_arr.push(1)
}
if((user_type & 0b100) === 0b100 && i === 2){
val_arr.push(2)
}
if((user_type & 0b1000) === 0b1000 && i === 3){
val_arr.push(3)
}
}
let str = ''
for(let i= 0;i<val_arr.length;i++) {
if(!str) {
str = position_arr[val_arr[i]]
}
else{
str =str+'&'+position_arr[val_arr[i]]
}
}
return str
},
getDealType() { // 获取交易类型
return [
{