修复异常

This commit is contained in:
aixianling
2022-06-13 18:58:17 +08:00
parent bd9c04d619
commit b05d70a24e

View File

@@ -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({