From b05d70a24e80f90f23ad20111c3e88665850f6ed Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 13 Jun 2022 18:58:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/modules.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/modules.js b/src/common/modules.js index 520a88a1..674e0d6c 100644 --- a/src/common/modules.js +++ b/src/common/modules.js @@ -59,7 +59,7 @@ export const config = { } }, getCode({state, dispatch}, tryAgentSign = false) { - let {corpId} = state.config, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_base" + let {corpId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_base" if (/\/AppForm\//.test(location.search)) { scope = "snsapi_userinfo" } @@ -228,8 +228,8 @@ export const user = { let apiList = [] export const wxwork = { actions: { - injectJWeixin({commit, dispatch, state}, ops) { - const inject = (jsApiList, config = state.config) => new Promise((resolve, reject) => { + injectJWeixin({commit, dispatch, rootState}, ops) { + const inject = (jsApiList, config = rootState.config) => new Promise((resolve, reject) => { setTimeout(() => { let sdk = wx?.agentConfig ? wx : jWeixin sdk?.agentConfig({