Commit 7d8629e4 by liimin

修改完善直接返回缓存配置的逻辑

1 parent 92cd9d9c
.i { display: inline-block; vertical-align: middle; background-image: url(./sprite.png) }
.i-activity-active { width: 20px; height: 20px; background-position: -61px -42px; }
.i-activity-active { width: 20px; height: 20px; background-position: -60px -104px; }
.i-activity { width: 20px; height: 20px; background-position: -90px -104px; }
.i-activityCenter-active { width: 20px; height: 21px; background-position: -42px 0px; }
.i-activityCenter { width: 20px; height: 20px; background-position: -120px -104px; }
.i-arrow-down { width: 20px; height: 20px; background-position: -162px 0px; }
.i-authorize-active { width: 20px; height: 20px; background-position: -162px -30px; }
.i-authorize { width: 20px; height: 20px; background-position: -162px -60px; }
.i-arrow-down { width: 20px; height: 20px; background-position: -163px 0px; }
.i-authorize-active { width: 20px; height: 20px; background-position: -163px -30px; }
.i-authorize { width: 20px; height: 20px; background-position: -163px -60px; }
.i-avatar { width: 32px; height: 32px; background-position: 0px 0px; }
.i-back { width: 10px; height: 10px; background-position: -130px -225px; }
.i-checked { width: 20px; height: 20px; background-position: -162px -90px; }
.i-checked { width: 20px; height: 20px; background-position: -163px -90px; }
.i-commodity-active { width: 20px; height: 21px; background-position: -72px 0px; }
.i-commodity { width: 20px; height: 21px; background-position: 0px -42px; }
.i-contact { width: 16px; height: 16px; background-position: -30px -225px; }
.i-content-active { width: 20px; height: 21px; background-position: -72px 0px; }
.i-content { width: 20px; height: 21px; background-position: 0px -42px; }
.i-content-active { width: 20px; height: 21px; background-position: -30px -42px; }
.i-content { width: 20px; height: 21px; background-position: -60px -42px; }
.i-custom-active { width: 20px; height: 20px; background-position: 0px -135px; }
.i-custom { width: 20px; height: 20px; background-position: -30px -135px; }
.i-dataview-active { width: 20px; height: 20px; background-position: -60px -135px; }
.i-dataview { width: 20px; height: 20px; background-position: -90px -135px; }
.i-discover-active { width: 20px; height: 20px; background-position: -120px -135px; }
.i-discover { width: 21px; height: 20px; background-position: -30px -42px; }
.i-discover { width: 21px; height: 20px; background-position: -102px 0px; }
.i-dot { width: 12px; height: 12px; background-position: -108px -225px; }
.i-drainage-active { width: 20px; height: 20px; background-position: -150px -135px; }
.i-drainage { width: 20px; height: 20px; background-position: -192px 0px; }
.i-edit-active { width: 20px; height: 20px; background-position: -192px -30px; }
.i-edit { width: 20px; height: 20px; background-position: -192px -60px; }
.i-equity-active { width: 20px; height: 20px; background-position: -192px -90px; }
.i-equity { width: 20px; height: 20px; background-position: -192px -120px; }
.i-drainage { width: 20px; height: 20px; background-position: -193px 0px; }
.i-edit-active { width: 20px; height: 20px; background-position: -193px -30px; }
.i-edit { width: 20px; height: 20px; background-position: -193px -60px; }
.i-equity-active { width: 20px; height: 20px; background-position: -193px -90px; }
.i-equity { width: 20px; height: 20px; background-position: -193px -120px; }
.i-exchange-active { width: 20px; height: 20px; background-position: 0px -165px; }
.i-exchange-disabled { width: 20px; height: 20px; background-position: -30px -165px; }
.i-exchange { width: 20px; height: 20px; background-position: -60px -165px; }
......@@ -32,41 +34,39 @@
.i-finance { width: 20px; height: 20px; background-position: -120px -165px; }
.i-home-active { width: 20px; height: 20px; background-position: -150px -165px; }
.i-home { width: 20px; height: 20px; background-position: -180px -165px; }
.i-inventory-active { width: 20px; height: 20px; background-position: -222px 0px; }
.i-inventory { width: 20px; height: 20px; background-position: -222px -30px; }
.i-inventory-active { width: 20px; height: 20px; background-position: -223px 0px; }
.i-inventory { width: 20px; height: 20px; background-position: -223px -30px; }
.i-left { width: 10px; height: 9px; background-position: -150px -225px; }
.i-link-active { width: 20px; height: 21px; background-position: -102px 0px; }
.i-link { width: 20px; height: 21px; background-position: -102px -31px; }
.i-live-active { width: 20px; height: 20px; background-position: -222px -60px; }
.i-live { width: 20px; height: 20px; background-position: -222px -90px; }
.i-logoff-active { width: 20px; height: 20px; background-position: -222px -120px; }
.i-logoff { width: 20px; height: 20px; background-position: -222px -150px; }
.i-link-active { width: 20px; height: 21px; background-position: -102px -30px; }
.i-link { width: 20px; height: 21px; background-position: 0px -73px; }
.i-live-active { width: 20px; height: 20px; background-position: -223px -60px; }
.i-live { width: 20px; height: 20px; background-position: -223px -90px; }
.i-logoff-active { width: 20px; height: 20px; background-position: -223px -120px; }
.i-logoff { width: 20px; height: 20px; background-position: -223px -150px; }
.i-mall-active { width: 20px; height: 20px; background-position: 0px -195px; }
.i-mall { width: 20px; height: 20px; background-position: -30px -195px; }
.i-mapping-active { width: 20px; height: 21px; background-position: 0px -73px; }
.i-mapping { width: 20px; height: 21px; background-position: -30px -73px; }
.i-mapping-active { width: 20px; height: 21px; background-position: -30px -73px; }
.i-mapping { width: 20px; height: 21px; background-position: -60px -73px; }
.i-marketing-active { width: 20px; height: 20px; background-position: -60px -195px; }
.i-marketing { width: 20px; height: 20px; background-position: -90px -195px; }
.i-message-active { width: 16px; height: 16px; background-position: -56px -225px; }
.i-message { width: 16px; height: 16px; background-position: -82px -225px; }
.i-outbound-active { width: 20px; height: 21px; background-position: -60px -73px; }
.i-ordermanage-active { width: 20px; height: 21px; background-position: -90px -73px; }
.i-ordermanage { width: 20px; height: 21px; background-position: -133px 0px; }
.i-outbound-active { width: 20px; height: 21px; background-position: -133px -31px; }
.i-outbound { width: 20px; height: 20px; background-position: -120px -195px; }
.i-password { width: 20px; height: 20px; background-position: -150px -195px; }
.i-provider-active { width: 20px; height: 21px; background-position: -90px -73px; }
.i-provider-active { width: 20px; height: 21px; background-position: -133px -62px; }
.i-provider { width: 20px; height: 20px; background-position: -180px -195px; }
.i-purchase-active { width: 20px; height: 20px; background-position: -210px -195px; }
.i-purchase { width: 20px; height: 20px; background-position: -252px 0px; }
.i-purchase { width: 20px; height: 20px; background-position: -253px 0px; }
.i-right { width: 8px; height: 8px; background-position: -170px -225px; }
.i-salepre-active { width: 20px; height: 20px; background-position: -252px -30px; }
.i-salepre { width: 20px; height: 20px; background-position: -252px -60px; }
.i-services-active { width: 20px; height: 20px; background-position: -252px -90px; }
.i-services { width: 20px; height: 20px; background-position: -252px -120px; }
.i-settings-active { width: 20px; height: 20px; background-position: -252px -150px; }
.i-settings { width: 20px; height: 20px; background-position: -252px -180px; }
.i-subscription-active { width: 20px; height: 21px; background-position: -132px 0px; }
.i-subscription { width: 20px; height: 21px; background-position: -132px -31px; }
.i-user { width: 20px; height: 20px; background-position: 0px -225px; }
.i-ordermanage { width: 20px; height: 21px; background-position: -132px -62px; }
.i-ordermanage-active { width: 20px; height: 21px; background-position: 0px -104px; }
.i-commodity-active { width: 20px; height: 21px; background-position: -30px -104px; }
.i-commodity { width: 20px; height: 21px; background-position: -60px -104px; }
\ No newline at end of file
.i-salepre-active { width: 20px; height: 20px; background-position: -253px -30px; }
.i-salepre { width: 20px; height: 20px; background-position: -253px -60px; }
.i-services-active { width: 20px; height: 20px; background-position: -253px -90px; }
.i-services { width: 20px; height: 20px; background-position: -253px -120px; }
.i-settings-active { width: 20px; height: 20px; background-position: -253px -150px; }
.i-settings { width: 20px; height: 20px; background-position: -253px -180px; }
.i-subscription-active { width: 20px; height: 21px; background-position: 0px -104px; }
.i-subscription { width: 20px; height: 21px; background-position: -30px -104px; }
.i-user { width: 20px; height: 20px; background-position: 0px -225px; }
\ No newline at end of file

32 KB | W: | H:

31.8 KB | W: | H:

src/assets/images/sprite/sprite.png
src/assets/images/sprite/sprite.png
src/assets/images/sprite/sprite.png
src/assets/images/sprite/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -4,24 +4,29 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2023-04-18 18:37:49
* @LastEditTime: 2023-05-04 15:12:41
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let cfg = require('./conf.js')
import { Http } from 'glsx-common'
import { utils } from 'glsx-common'
import { constants } from '@/common'
import router from '../router'
const sw = !!+process.env.VUE_APP_CONFIG_SWITCH_LOCAL
export const fetchConfig = (isEnv = sw) => {
if (isEnv) {
return Promise.resolve(cfg)
}
const _config = utils.storage.getSession(constants.SCRM_BASE_CONFIG)
const _session = utils.storage.getSession(constants.SCRM_BASE_SESSION)
const _pathname = location.pathname
if (_config && _pathname !== '/') {
const _login_path = _session?.loginpath
const _constRoutes = router.constantRoutes.map(({ path }) => path)
// 如果存在配置缓存,并且当前路径不是用以区分不同产品的路由(oss:运营版,login:基础版,sp:服务商版).说明是刷新页面,则直接返回缓存的配置.另外如果当前路由与登录时缓存的路由一致,也直接返回缓存配置.
if ((_config && !_constRoutes.includes(_pathname)) || _pathname === _login_path || (_pathname === '/' && _login_path === '/login')) {
return Promise.resolve(_config)
}
return new Http({ headers: { refererurl: _pathname }, request: { timeout: 30000 } }).get('https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base/config')
return new Http({ headers: { refererurl: _pathname }, request: { timeout: 30000 } }).get('https://oss-config.dev.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base/config')
}
export const config = {
install(vue, cfg) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!