优化模块
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user