Commit ba7e65bf by 李伟康

兼容旧版企微

1 parent 7df936b9
.sprite-icon { background-image: url(../images/sprite.png);background-size: 139px 104px;} .sprite-icon { background-image: url(../images/sprite.png);background-size: 139px 104px;}
.icon-default-avatar { width: 44px; height: 44px; background-position: 0px 0px;} .icon-default-avatar { width: 44px; height: 44px; background-position: 0px 0px;}
.icon-down { width: 12px; height: 12px; background-position: -96px -63px;} .icon-down { width: 12px; height: 12px; background-position: -96px -63px;}
.icon-index-tips { width: 23px; height: 23px; background-position: -96px 0px;}
.icon-eye { width: 13px; height: 8px; background-position: 0px -96px;} .icon-eye { width: 13px; height: 8px; background-position: 0px -96px;}
.icon-file { width: 26px; height: 26px; background-position: -42px -54px;} .icon-file { width: 26px; height: 26px; background-position: -42px -54px;}
.icon-index-tips { width: 23px; height: 23px; background-position: -96px 0px;}
.icon-link { width: 32px; height: 32px; background-position: 0px -54px;} .icon-link { width: 32px; height: 32px; background-position: 0px -54px;}
.icon-pdf { width: 32px; height: 34px; background-position: -54px 0px;} .icon-pdf { width: 32px; height: 34px; background-position: -54px 0px;}
.icon-PYQ { width: 21px; height: 20px; background-position: -96px -33px;} .icon-PYQ { width: 21px; height: 20px; background-position: -96px -33px;}
......
...@@ -146,10 +146,8 @@ const actions = { ...@@ -146,10 +146,8 @@ 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'
let scope = ''
wxUrl = `${wxUrl}?appid=${appid}&redirect_uri=${encodeURIComponent(redirectUrl)}&response_type=code` wxUrl = `${wxUrl}?appid=${appid}&redirect_uri=${encodeURIComponent(redirectUrl)}&response_type=code`
if (agentid) { if (agentid && agentid != 'undefined') {
wxUrl = `${wxUrl}&scope=snsapi_privateinfo&agentid=${agentid}` wxUrl = `${wxUrl}&scope=snsapi_privateinfo&agentid=${agentid}`
dj_scrm_storage.agentId = agentid dj_scrm_storage.agentId = agentid
} }
...@@ -159,12 +157,16 @@ const actions = { ...@@ -159,12 +157,16 @@ const actions = {
} }
}, },
navigation ({ dispatch }, to) { navigation ({ dispatch }, to) {
let { redirect_uri, corpId } = getParams() let { redirect_uri, corpId, agentId } = getParams()
let userInfo = util.getLocalStorage('dj_scrm_userInfo') let userInfo = util.getLocalStorage('dj_scrm_userInfo')
let loginList = util.getLocalStorage('dj_scrm_accountList') let loginList = util.getLocalStorage('dj_scrm_accountList')
if (corpId) util.setLocalStorage('dj_scrm_corpId', { corpId }) let dj_scrm_storage = {}
if (corpId) dj_scrm_storage.corpId = corpId
if (agentId && agentId != 'undefined') dj_scrm_storage.agentId = agentId
util.setLocalStorage('dj_scrm_corpId', dj_scrm_storage)
if (redirect_uri) util.setLocalStorage('dj_scrm_redirect_uri', redirect_uri) if (redirect_uri) util.setLocalStorage('dj_scrm_redirect_uri', redirect_uri)
let dj_scrm = util.getLocalStorage('dj_scrm_corpId') let dj_scrm = util.getLocalStorage('dj_scrm_corpId')
console.log(redirect_uri, corpId, agentId)
if (dj_scrm && userInfo) { if (dj_scrm && userInfo) {
if (dj_scrm.corpId != userInfo.entmicroId) { if (dj_scrm.corpId != userInfo.entmicroId) {
util.showLoading() util.showLoading()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!