From ed4b2921c589d6a48ef5f53c6311d4ff7e032d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Thu, 24 Oct 2024 11:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/common.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/common.ts b/utils/common.ts index 352f1fd..f8f8a91 100644 --- a/utils/common.ts +++ b/utils/common.ts @@ -109,7 +109,7 @@ export function openSpmUrl(p: string, d?: any, id = 0, isOpen?: boolean, isToken const path = ref(''); const spm = ref(''); const model = ref('c'); - const tid = d?.tenantId || 0; + const tid = d?.tenantId || localStorage.getItem('TID_ADMIN'); const mid = config.value.loginUser?.merchantId || 0; const pid = d?.parentId || 0; const cid = d?.categoryId || 0; @@ -176,7 +176,8 @@ export function loginAdminByToken(): void { export function loginDeveloperCenterByToken(): void { const user = useUser(); const uid = user.value?.userId; - openSpmUrl(`https://developer.websoft.top/token-login`,undefined, uid, true,true) + const tenantId = Number(user.value?.tenantId); + openSpmUrl(`https://developer.websoft.top/token-login`,undefined, tenantId, true,true) } export function getSpmUrl(path: string, d?: any, id = 0): string {