|
|
@ -37,12 +37,6 @@ export const fetchPermissionListByUserId = async (userId) => {
|
|
|
|
return errcode !== 0 ? {} : result
|
|
|
|
return errcode !== 0 ? {} : result
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 取消令牌时间过期检测,待删除
|
|
|
|
|
|
|
|
async function fetchLastRequet() {
|
|
|
|
|
|
|
|
const { errcode, result } = await fetchJSON(`${HT_HOST}/service-CooperateSOA/GetLastReqDate`)
|
|
|
|
|
|
|
|
return errcode !== 0 ? {} : result
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const initialState = {
|
|
|
|
const initialState = {
|
|
|
|
tokenInterval: null,
|
|
|
|
tokenInterval: null,
|
|
|
|
loginStatus: 0,
|
|
|
|
loginStatus: 0,
|
|
|
@ -175,6 +169,16 @@ const useAuthStore = create(devtools((set, get) => ({
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据某项数据来判断是否有权限
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category])
|
|
|
|
|
|
|
|
// VALUES ('审核CH直销产品', '[125, 375]', 'data')
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// const PERM_PRODUCTS_AUDIT_CH = '[125, 375]'
|
|
|
|
|
|
|
|
isAllowed: (perm, data) => {
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}), { name: 'authStore' }))
|
|
|
|
}), { name: 'authStore' }))
|
|
|
|
|
|
|
|
|
|
|
|
export default useAuthStore
|
|
|
|
export default useAuthStore
|
|
|
|