补充数据库数据,修改分类栏内容

This commit is contained in:
2026-05-21 11:50:32 +08:00
parent b8b0b453e0
commit 7ba3d313be
32 changed files with 6657 additions and 1684 deletions

View File

@@ -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> {