fix(user): 优化实名认证审核流程并修复权限控制问题
- 重构 onPass 和 onReject 方法,添加异常处理和 Promise 确保操作顺序 - 修复实名认证状态显示问题,当 statusText 为空时显示默认状态文本 - 更新权限检查逻辑,将固定存储检查改为角色权限动态验证 - 修复组织机构筛选逻辑,区分站点角色和商户角色的数据权限范围 - 添加商户角色的多组织机构查询支持,完善数据隔离机制
This commit is contained in:
@@ -33,7 +33,7 @@ const List = () => {
|
||||
|
||||
const loadList = async (pageNum: number, isRefresh = false) => {
|
||||
if (loading) return;
|
||||
|
||||
|
||||
setLoading(true)
|
||||
// 搜索条件
|
||||
const where = {status: 1, deleted: 0, keywords, page: pageNum, limit: 10}
|
||||
@@ -47,7 +47,7 @@ const List = () => {
|
||||
// @ts-ignore
|
||||
where.driverId = user.userId;
|
||||
}
|
||||
if(roleCode == 'zhandian'){
|
||||
if(roleCode == 'zhandian' && user.merchants == null){
|
||||
// @ts-ignore
|
||||
where.organizationId = user.organizationId;
|
||||
}
|
||||
@@ -59,6 +59,10 @@ const List = () => {
|
||||
// @ts-ignore
|
||||
where.installerId = user.userId;
|
||||
}
|
||||
if(user.merchants != null){
|
||||
// @ts-ignore
|
||||
where.organizationIds = user.merchants;
|
||||
}
|
||||
if(roleCode == 'user'){
|
||||
setLoading(false)
|
||||
return false;
|
||||
@@ -152,4 +156,4 @@ const List = () => {
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default List
|
||||
export default List
|
||||
|
||||
Reference in New Issue
Block a user