兼容上架版

This commit is contained in:
aixianling
2022-06-13 22:27:25 +08:00
parent ea56f95246
commit b529624728

View File

@@ -53,9 +53,12 @@ export const config = {
}
},
getCode({state, dispatch}, tryAgentSign = false) {
let {corpid: corpId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_base"
let {corpid: corpId, suiteId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_base"
if (/\/AppForm\//.test(location.search)) {
scope = "snsapi_userinfo"
} else if (suiteId) {
corpId = suiteId
scope = "snsapi_privateinfo"
}
return new Promise((resolve, reject) => {
if (corpId && scope) {