From 9806175443680309e85f1e34c2e4e37bf0fa5805 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 15 Jun 2022 15:10:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/modules.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/modules.js b/src/common/modules.js index 3b788873..1ab93bd8 100644 --- a/src/common/modules.js +++ b/src/common/modules.js @@ -26,6 +26,8 @@ export const config = { if (!!params?.action) { action = params.action delete params.action + } else if (!!params.suiteId) { + action = "/app/wxcptp/portal/agentSign" } return http.post(action, null, { withoutToken: true, @@ -68,7 +70,7 @@ export const config = { .replace(/SCOPE/g, scope) location.replace(oauthURL) } else if (!tryAgentSign) { - dispatch("agentSign").then(() => dispatch("getCode", true)).then(() => resolve()) + dispatch("agentSign", {corpId, suiteId}).then(() => dispatch("getCode", true)).then(() => resolve()) } else reject("URL缺少必要参数(corpId)") }) }, @@ -242,7 +244,8 @@ export const wxwork = { }, 500) }) return new Promise((resolve, reject) => { - dispatch("agentSign").then(config => { + let {config: {corpId, suiteId}} = rootState + dispatch("agentSign", {corpId, suiteId}).then(config => { if (typeof ops == "object") { ops?.map(api => { if (!apiList?.includes(api)) apiList.push(api)