Commit 7df936b9 by 李伟康

commit

1 parent adaf7352
...@@ -146,11 +146,14 @@ const actions = { ...@@ -146,11 +146,14 @@ const actions = {
} }
let dj_scrm_storage = { corpId: appid } let dj_scrm_storage = { corpId: appid }
let wxUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize' let wxUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize'
wxUrl = `${wxUrl}?appid=${appid}&redirect_uri=${encodeURIComponent(redirectUrl)}&response_type=code&scope=snsapi_privateinfo` let scope = ''
wxUrl = `${wxUrl}?appid=${appid}&redirect_uri=${encodeURIComponent(redirectUrl)}&response_type=code`
if (agentid) { if (agentid) {
wxUrl = `${wxUrl}&agentid=${agentid}` wxUrl = `${wxUrl}&scope=snsapi_privateinfo&agentid=${agentid}`
dj_scrm_storage.agentId = agentid dj_scrm_storage.agentId = agentid
} }
else wxUrl = `${wxUrl}&scope=snsapi_base`
util.setLocalStorage('dj_scrm_corpId', dj_scrm_storage) util.setLocalStorage('dj_scrm_corpId', dj_scrm_storage)
window.location.href = `${wxUrl}&state=STATE#wechat_redirect` window.location.href = `${wxUrl}&state=STATE#wechat_redirect`
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!