可信代码库-查询用户是否认证接口对接

This commit is contained in:
付民康
2025-07-02 17:05:19 +08:00
parent 8094a6598d
commit 93341d483b
2 changed files with 17 additions and 4 deletions

View File

@@ -490,3 +490,11 @@ export function loginAccess() {
} }
}); });
} }
// 查询用户是否认证
export function fetchCheckAuthenticate(data) {
return request({
url: `/api/v1/user/checkAuthenticate`,
method: 'post',
data: data,
});
}

View File

@@ -49,6 +49,7 @@ import SubscribeList from './Detail/SubscribeList.vue';
import PersonalSettings from './Detail/PersonalSettings.vue'; import PersonalSettings from './Detail/PersonalSettings.vue';
import { useAccount } from '@/utils/hooks/useAccount'; import { useAccount } from '@/utils/hooks/useAccount';
import { Message } from 'vue-devui/message'; import { Message } from 'vue-devui/message';
import { fetchCheckAuthenticate } from '@/api/jyh';
const { namespace } = getOrgInfo(); const { namespace } = getOrgInfo();
const avatarUrl = '/src/assets/imgs/avatar/male.png'; const avatarUrl = '/src/assets/imgs/avatar/male.png';
@@ -71,10 +72,14 @@ const openDelete = (row: any) => {
const router = useRouter(); const router = useRouter();
// 前往治理中心按钮点击事件 // 前往治理中心按钮点击事件
const goToGovernCenter = () => { const goToGovernCenter = async () => {
// Message.warning('请联系平台管理员,开通账号权限'); const res = await fetchCheckAuthenticate({});
// 可以在此添加跳转逻辑,当前无权限时不实际跳转 if(res.data.code!==200) return
if (res.data.data) {
window.location.href = VITE_GOVERNANCE_HOST; window.location.href = VITE_GOVERNANCE_HOST;
} else {
Message.warning('请联系平台管理员,开通账号权限');
}
}; };
// 分页 // 分页