From 6b52b7d147704a6a7613d5888470c210ef4e9f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BE=E8=B4=A4=E5=87=8C?= Date: Tue, 18 Jan 2022 18:42:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=AF=E9=80=89=E8=87=AA=E5=B7=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 57cd43b5..a84ac1f9 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -63,11 +63,11 @@ const store = new Vuex.Store({ }, redirectCode(state, url = location.href) { let REDIRECT_URI = encodeURIComponent(url), - corpid = state.corpId + corpid = state.corpId const redirectTo = cid => { location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base#wechat_redirect' - .replace(/CORPID/g, cid) - .replace(/REDIRECT_URI/g, REDIRECT_URI) + .replace(/CORPID/g, cid) + .replace(/REDIRECT_URI/g, REDIRECT_URI) } if (corpid) { redirectTo(corpid) @@ -227,16 +227,16 @@ const store = new Vuex.Store({ }) } else { return http.post("/app/wxcp/wxuser/getUserInfoByToken") - .then(res => { - if (res?.code == 0) { - state.commit("setOpenUser", res.data) - } - }) + .then(res => { + if (res?.code == 0) { + state.commit("setOpenUser", res.data) + } + }) } }, agentSign(state, params) { let url = window.location.href, - {corpId, suiteId} = state.state.config + {corpId, suiteId} = state.state.config if (agentSignURL == url) { return Promise.resolve() } else { @@ -358,6 +358,7 @@ const store = new Vuex.Store({ let sdk = typeof wx?.invoke == 'function' ? wx : jWeixin sdk?.invoke("selectEnterpriseContact", { fromDepartmentId: -1, + selectedContextContact: 1, mode: "multi", ...params }, res => {