判断错误调整
This commit is contained in:
@@ -56,7 +56,7 @@ export const config = {
|
|||||||
},
|
},
|
||||||
getCode({state, dispatch}, tryAgentSign = false) {
|
getCode({state, dispatch}, tryAgentSign = false) {
|
||||||
let {corpid: corpId, suiteId, agentid: agentId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_privateinfo"
|
let {corpid: corpId, suiteId, agentid: agentId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_privateinfo"
|
||||||
if (/\/AppForm\//.test(location.search)) {
|
if (/\/AppForm\//.test(location.pathname)) {
|
||||||
scope = "snsapi_base"
|
scope = "snsapi_base"
|
||||||
} else if (suiteId) {
|
} else if (suiteId) {
|
||||||
corpId = suiteId
|
corpId = suiteId
|
||||||
@@ -230,6 +230,22 @@ export const user = {
|
|||||||
*/
|
*/
|
||||||
let apiList = []
|
let apiList = []
|
||||||
export const wxwork = {
|
export const wxwork = {
|
||||||
|
state: () => ({
|
||||||
|
agentSignURL: "",
|
||||||
|
apiList: [],
|
||||||
|
config: {}
|
||||||
|
}),
|
||||||
|
mutations: {
|
||||||
|
setConfig(state, config) {
|
||||||
|
state.config = config
|
||||||
|
},
|
||||||
|
setAgentSignURL(state, url) {
|
||||||
|
state.agentSignURL = url
|
||||||
|
},
|
||||||
|
setApiList(state, list) {
|
||||||
|
state.apiList = list
|
||||||
|
},
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
injectJWeixin({commit, dispatch, rootState}, ops) {
|
injectJWeixin({commit, dispatch, rootState}, ops) {
|
||||||
const inject = (jsApiList, config = rootState.config) => new Promise((resolve, reject) => {
|
const inject = (jsApiList, config = rootState.config) => new Promise((resolve, reject) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user