补充数据库数据,修改分类栏内容
This commit is contained in:
@@ -25,8 +25,7 @@ const DELIVERY_HOME_PATH = '/pages/mall/delivery/home/index'
|
||||
const DELIVERY_USER_KEY = 'delivery_user_info'
|
||||
const DELIVERY_INFO_KEY = 'delivery_info'
|
||||
const DELIVERY_TOKEN_KEY = 'delivery_token'
|
||||
const DELIVERY_ROLE = 'delivery'
|
||||
const DELIVERY_ROLE_ALIAS = 'Deliverer'
|
||||
const DELIVERY_ROLE_LIST = ['delivery', 'Deliverer', 'deliverer', 'service_staff', 'care_worker'] as Array<string>
|
||||
|
||||
let redirectingToDeliveryLogin = false
|
||||
|
||||
@@ -169,7 +168,12 @@ export function isDelivererRole(userInfo: UserProfile | null): boolean {
|
||||
return false
|
||||
}
|
||||
const role = userInfo.role != null ? userInfo.role : ''
|
||||
return role == DELIVERY_ROLE || role == DELIVERY_ROLE_ALIAS
|
||||
for (let i = 0; i < DELIVERY_ROLE_LIST.length; i++) {
|
||||
if (role == DELIVERY_ROLE_LIST[i]) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export async function checkDeliveryAccount(userInfo: UserProfile): Promise<DeliveryInfoType | null> {
|
||||
|
||||
Reference in New Issue
Block a user