修复筛选字典数据加载竞态
This commit is contained in:
@@ -847,6 +847,28 @@ onUnmounted(() => {
|
||||
uni.$off('citySelected');
|
||||
});
|
||||
|
||||
const isFourLevelLinkagePurview = ref(false);
|
||||
const getIsFourLevelLinkagePurview = () => {
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if (userInfo) {
|
||||
$api.myRequest(
|
||||
'/auth/login2/ks',
|
||||
{ userid: userInfo.dwUserid, idcardno: userInfo.idCard },
|
||||
'POST',
|
||||
9100,
|
||||
{}
|
||||
).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync('fourLevelLinkage-token', res.data.access_token);
|
||||
let roleIdList = ['103', '106', '107'];
|
||||
if (res.data.roleIdList.some((item) => roleIdList.includes(item))) {
|
||||
isFourLevelLinkagePurview.value = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onShow(() => {
|
||||
// 页面显示时获取最新的企业信息
|
||||
getCompanyInfo();
|
||||
@@ -1458,27 +1480,6 @@ const toggleJobStatus = (job) => {
|
||||
$api.msg(isCurrentlyUp ? '下架失败,请重试' : '上架失败,请重试');
|
||||
});
|
||||
};
|
||||
const isFourLevelLinkagePurview = ref(false);
|
||||
const getIsFourLevelLinkagePurview = () => {
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if (userInfo) {
|
||||
$api.myRequest(
|
||||
'/auth/login2/ks',
|
||||
{ userid: userInfo.dwUserid, idcardno: userInfo.idCard },
|
||||
'POST',
|
||||
9100,
|
||||
{}
|
||||
).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync('fourLevelLinkage-token', res.data.access_token);
|
||||
let roleIdList = ['103', '106', '107'];
|
||||
if (res.data.roleIdList.some((item) => roleIdList.includes(item))) {
|
||||
isFourLevelLinkagePurview.value = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
function dataToImg(data) {
|
||||
const result = data.map((item) => ({
|
||||
...item,
|
||||
|
||||
Reference in New Issue
Block a user