可信代码库-生产环境token覆盖问题解决
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<span>预警公告</span>
|
||||
</div>
|
||||
|
||||
<!-- <a v-if="accountInfo.access_token" class="devui-link" @click="checkMore"
|
||||
<!-- <a v-if="accountInfo.op_access_token" class="devui-link" @click="checkMore"
|
||||
>更多 <i class="icon icon-chevron-right-2"></i>
|
||||
</a>
|
||||
<span v-else class="text-blue-500">查看更多,请先登录</span> -->
|
||||
|
||||
@@ -83,10 +83,10 @@ const handleDelete = async (row) => {
|
||||
type: 'success',
|
||||
message: '成功删除'
|
||||
});
|
||||
let access_token = localStorage.getItem('access_token') || '';
|
||||
let refresh_token = localStorage.getItem('refresh_token') || '';
|
||||
let op_access_token = localStorage.getItem('op_access_token') || '';
|
||||
let op_refresh_token = localStorage.getItem('op_refresh_token') || '';
|
||||
// 如果是从blog跳转过来的判断是否登陆,如果登陆则写入storage
|
||||
await account.checkIsLogin(access_token,refresh_token);
|
||||
await account.checkIsLogin(op_access_token,op_refresh_token);
|
||||
queryInviteListData();
|
||||
} else {
|
||||
Message({
|
||||
|
||||
@@ -77,10 +77,10 @@ const handleAccept = async (row, type) => {
|
||||
groupId: row.groupId,
|
||||
status: type
|
||||
});
|
||||
let access_token = localStorage.getItem('access_token') || '';
|
||||
let refresh_token = localStorage.getItem('refresh_token') || '';
|
||||
let op_access_token = localStorage.getItem('op_access_token') || '';
|
||||
let op_refresh_token = localStorage.getItem('op_refresh_token') || '';
|
||||
// 如果是从blog跳转过来的判断是否登陆,如果登陆则写入storage
|
||||
await account.checkIsLogin(access_token,refresh_token);
|
||||
await account.checkIsLogin(op_access_token,op_refresh_token);
|
||||
if (data?.data?.data?.data) {
|
||||
if(type===1) {
|
||||
Message({
|
||||
|
||||
@@ -84,7 +84,7 @@ const getInfo = async () => {
|
||||
forms.userExt.emailAlertSwitch = user.userExt?.emailAlertSwitch || false;
|
||||
|
||||
if (userRes.data?.data) {
|
||||
localStorage.setItem('userInfo', JSON.stringify(userRes.data?.data));
|
||||
localStorage.setItem('opUserInfo', JSON.stringify(userRes.data?.data));
|
||||
useAccountStore().saveAccountInfo({
|
||||
...userRes.data?.data
|
||||
});
|
||||
|
||||
@@ -76,7 +76,9 @@ const goToGovernCenter = async () => {
|
||||
const res = await fetchCheckAuthenticate({});
|
||||
if(res.data.code!==200) return
|
||||
if (res.data.data) {
|
||||
window.location.href = VITE_GOVERNANCE_HOST;
|
||||
// 直接使用 window.open
|
||||
window.open(VITE_GOVERNANCE_HOST, '_blank');
|
||||
// window.location.href = VITE_GOVERNANCE_HOST;
|
||||
} else {
|
||||
Message.warning('请联系平台管理员,开通账号权限');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user