Commit 18f1945f by 李敏

Merge branch 'v3.16.0' into 'master'

V3.16.0

See merge request !5
2 parents de5c2177 7d435bf0
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"glsx-common": "^2.1.0", "glsx-common": "^2.1.0",
"glsx-common-sdk": "^0.3.0",
"gltracker": "^0.1.3", "gltracker": "^0.1.3",
"md5": "^2.3.0", "md5": "^2.3.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
...@@ -8244,6 +8245,11 @@ ...@@ -8244,6 +8245,11 @@
"sha1": "^1.1.1" "sha1": "^1.1.1"
} }
}, },
"node_modules/glsx-common-sdk": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.3.0.tgz",
"integrity": "sha512-hoTtZ2SEFzoJkW8aIYyb8ZOsaMqivCDOvPH6wvTLPXwFdMgZsls6E4nsTpOyC8WmPN5GmCB1QFyFCqTYsYE8Hg=="
},
"node_modules/glsx-common/node_modules/qs": { "node_modules/glsx-common/node_modules/qs": {
"version": "6.11.1", "version": "6.11.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz",
...@@ -26296,6 +26302,11 @@ ...@@ -26296,6 +26302,11 @@
} }
} }
}, },
"glsx-common-sdk": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.3.0.tgz",
"integrity": "sha512-hoTtZ2SEFzoJkW8aIYyb8ZOsaMqivCDOvPH6wvTLPXwFdMgZsls6E4nsTpOyC8WmPN5GmCB1QFyFCqTYsYE8Hg=="
},
"gltracker": { "gltracker": {
"version": "0.1.3", "version": "0.1.3",
"resolved": "https://registry.npmjs.org/gltracker/-/gltracker-0.1.3.tgz", "resolved": "https://registry.npmjs.org/gltracker/-/gltracker-0.1.3.tgz",
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"glsx-common": "^2.1.0", "glsx-common": "^2.1.0",
"glsx-common-sdk": "^0.3.0",
"gltracker": "^0.1.3", "gltracker": "^0.1.3",
"md5": "^2.3.0", "md5": "^2.3.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
.i-authorize-active { width: 20px; height: 20px; background-position: -163px -30px; } .i-authorize-active { width: 20px; height: 20px; background-position: -163px -30px; }
.i-authorize { width: 20px; height: 20px; background-position: -163px -60px; } .i-authorize { width: 20px; height: 20px; background-position: -163px -60px; }
.i-avatar { width: 32px; height: 32px; background-position: 0px 0px; } .i-avatar { width: 32px; height: 32px; background-position: 0px 0px; }
.i-back { width: 10px; height: 10px; background-position: -190px -225px; } .i-back { width: 10px; height: 10px; background-position: -100px -255px; }
.i-checked { width: 20px; height: 20px; background-position: -163px -90px; } .i-checked { width: 20px; height: 20px; background-position: -163px -90px; }
.i-commodity-active { width: 20px; height: 21px; background-position: -72px 0px; } .i-commodity-active { width: 20px; height: 21px; background-position: -72px 0px; }
.i-commodity { width: 20px; height: 21px; background-position: 0px -42px; } .i-commodity { width: 20px; height: 21px; background-position: 0px -42px; }
.i-contact { width: 16px; height: 16px; background-position: -90px -225px; } .i-contact { width: 16px; height: 16px; background-position: 0px -255px; }
.i-content-active { width: 20px; height: 21px; background-position: -30px -42px; } .i-content-active { width: 20px; height: 21px; background-position: -30px -42px; }
.i-content { width: 20px; height: 21px; background-position: -60px -42px; } .i-content { width: 20px; height: 21px; background-position: -60px -42px; }
.i-coupon-active { width: 20px; height: 20px; background-position: 0px -135px; } .i-coupon-active { width: 20px; height: 20px; background-position: 0px -135px; }
...@@ -20,55 +20,61 @@ ...@@ -20,55 +20,61 @@
.i-custom { width: 20px; height: 20px; background-position: -90px -135px; } .i-custom { width: 20px; height: 20px; background-position: -90px -135px; }
.i-dataview-active { width: 20px; height: 20px; background-position: -120px -135px; } .i-dataview-active { width: 20px; height: 20px; background-position: -120px -135px; }
.i-dataview { width: 20px; height: 20px; background-position: -150px -135px; } .i-dataview { width: 20px; height: 20px; background-position: -150px -135px; }
.i-discover-active { width: 20px; height: 20px; background-position: -193px 0px; } .i-default-active { width: 20px; height: 20px; background-position: -193px 0px; }
.i-default { width: 20px; height: 20px; background-position: -193px -30px; }
.i-discover-active { width: 20px; height: 20px; background-position: -193px -60px; }
.i-discover { width: 21px; height: 20px; background-position: -102px 0px; } .i-discover { width: 21px; height: 20px; background-position: -102px 0px; }
.i-dot { width: 12px; height: 12px; background-position: -168px -225px; } .i-dot { width: 12px; height: 12px; background-position: -78px -255px; }
.i-drainage-active { width: 20px; height: 20px; background-position: -193px -30px; } .i-drainage-active { width: 20px; height: 20px; background-position: -193px -90px; }
.i-drainage { width: 20px; height: 20px; background-position: -193px -60px; } .i-drainage { width: 20px; height: 20px; background-position: -193px -120px; }
.i-edit-active { width: 20px; height: 20px; background-position: -193px -90px; } .i-edit-active { width: 20px; height: 20px; background-position: 0px -165px; }
.i-edit { width: 20px; height: 20px; background-position: -193px -120px; } .i-edit { width: 20px; height: 20px; background-position: -30px -165px; }
.i-equity-active { width: 20px; height: 20px; background-position: 0px -165px; } .i-equity-active { width: 20px; height: 20px; background-position: -60px -165px; }
.i-equity { width: 20px; height: 20px; background-position: -30px -165px; } .i-equity { width: 20px; height: 20px; background-position: -90px -165px; }
.i-exchange-active { width: 20px; height: 20px; background-position: -60px -165px; } .i-exchange-active { width: 20px; height: 20px; background-position: -120px -165px; }
.i-exchange-disabled { width: 20px; height: 20px; background-position: -90px -165px; } .i-exchange-disabled { width: 20px; height: 20px; background-position: -150px -165px; }
.i-exchange { width: 20px; height: 20px; background-position: -120px -165px; } .i-exchange { width: 20px; height: 20px; background-position: -180px -165px; }
.i-finance-active { width: 20px; height: 20px; background-position: -150px -165px; } .i-finance-active { width: 20px; height: 20px; background-position: -223px 0px; }
.i-finance { width: 20px; height: 20px; background-position: -180px -165px; } .i-finance { width: 20px; height: 20px; background-position: -223px -30px; }
.i-home-active { width: 20px; height: 20px; background-position: -223px 0px; } .i-home-active { width: 20px; height: 20px; background-position: -223px -60px; }
.i-home { width: 20px; height: 20px; background-position: -223px -30px; } .i-home { width: 20px; height: 20px; background-position: -223px -90px; }
.i-inventory-active { width: 20px; height: 20px; background-position: -223px -60px; } .i-inventory-active { width: 20px; height: 20px; background-position: -223px -120px; }
.i-inventory { width: 20px; height: 20px; background-position: -223px -90px; } .i-inventory { width: 20px; height: 20px; background-position: -223px -150px; }
.i-left { width: 10px; height: 9px; background-position: -210px -225px; } .i-left { width: 10px; height: 9px; background-position: -120px -255px; }
.i-link-active { width: 20px; height: 21px; background-position: -102px -30px; } .i-link-active { width: 20px; height: 21px; background-position: -102px -30px; }
.i-link { width: 20px; height: 21px; background-position: 0px -73px; } .i-link { width: 20px; height: 21px; background-position: 0px -73px; }
.i-live-active { width: 20px; height: 20px; background-position: -223px -120px; } .i-live-active { width: 20px; height: 20px; background-position: 0px -195px; }
.i-live { width: 20px; height: 20px; background-position: -223px -150px; } .i-live { width: 20px; height: 20px; background-position: -30px -195px; }
.i-logoff-active { width: 20px; height: 20px; background-position: 0px -195px; } .i-logoff-active { width: 20px; height: 20px; background-position: -60px -195px; }
.i-logoff { width: 20px; height: 20px; background-position: -30px -195px; } .i-logoff { width: 20px; height: 20px; background-position: -90px -195px; }
.i-mall-active { width: 20px; height: 20px; background-position: -60px -195px; } .i-mall-active { width: 20px; height: 20px; background-position: -120px -195px; }
.i-mall { width: 20px; height: 20px; background-position: -90px -195px; } .i-mall { width: 20px; height: 20px; background-position: -150px -195px; }
.i-mapping-active { 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-mapping { width: 20px; height: 21px; background-position: -60px -73px; }
.i-marketing-active { width: 20px; height: 20px; background-position: -120px -195px; } .i-marketing-active { width: 20px; height: 20px; background-position: -180px -195px; }
.i-marketing { width: 20px; height: 20px; background-position: -150px -195px; } .i-marketing { width: 20px; height: 20px; background-position: -210px -195px; }
.i-message-active { width: 16px; height: 16px; background-position: -116px -225px; } .i-message-active { width: 16px; height: 16px; background-position: -26px -255px; }
.i-message { width: 16px; height: 16px; background-position: -142px -225px; } .i-message { width: 16px; height: 16px; background-position: -52px -255px; }
.i-ordermanage-active { width: 20px; height: 21px; background-position: -90px -73px; } .i-ordermanage-active { width: 20px; height: 21px; background-position: -90px -73px; }
.i-ordermanage { width: 20px; height: 21px; background-position: -133px 0px; } .i-ordermanage { width: 20px; height: 21px; background-position: -133px 0px; }
.i-outbound-active { width: 20px; height: 21px; background-position: -133px -31px; } .i-outbound-active { width: 20px; height: 21px; background-position: -133px -31px; }
.i-outbound { width: 20px; height: 20px; background-position: -180px -195px; } .i-outbound { width: 20px; height: 20px; background-position: -253px 0px; }
.i-password { width: 20px; height: 20px; background-position: -210px -195px; } .i-password { width: 20px; height: 20px; background-position: -253px -30px; }
.i-points-active { width: 20px; height: 20px; background-position: -253px -60px; }
.i-points { width: 20px; height: 20px; background-position: -253px -90px; }
.i-provider-active { width: 20px; height: 21px; background-position: -133px -62px; } .i-provider-active { width: 20px; height: 21px; background-position: -133px -62px; }
.i-provider { width: 20px; height: 20px; background-position: -253px 0px; } .i-provider { width: 20px; height: 20px; background-position: -253px -120px; }
.i-purchase-active { width: 20px; height: 20px; background-position: -253px -30px; } .i-purchase-active { width: 20px; height: 20px; background-position: -253px -150px; }
.i-purchase { width: 20px; height: 20px; background-position: -253px -60px; } .i-purchase { width: 20px; height: 20px; background-position: -253px -180px; }
.i-right { width: 8px; height: 8px; background-position: -230px -225px; } .i-right { width: 8px; height: 8px; background-position: -140px -255px; }
.i-salepre-active { width: 20px; height: 20px; background-position: -253px -90px; } .i-salepre-active { width: 20px; height: 20px; background-position: 0px -225px; }
.i-salepre { width: 20px; height: 20px; background-position: -253px -120px; } .i-salepre { width: 20px; height: 20px; background-position: -30px -225px; }
.i-services-active { width: 20px; height: 20px; background-position: -253px -150px; } .i-services-active { width: 20px; height: 20px; background-position: -60px -225px; }
.i-services { width: 20px; height: 20px; background-position: -253px -180px; } .i-services { width: 20px; height: 20px; background-position: -90px -225px; }
.i-settings-active { width: 20px; height: 20px; background-position: 0px -225px; } .i-settings-active { width: 20px; height: 20px; background-position: -120px -225px; }
.i-settings { width: 20px; height: 20px; background-position: -30px -225px; } .i-settings { width: 20px; height: 20px; background-position: -150px -225px; }
.i-shop-active { width: 20px; height: 20px; background-position: -180px -225px; }
.i-shop { width: 20px; height: 20px; background-position: -210px -225px; }
.i-subscription-active { width: 20px; height: 21px; background-position: 0px -104px; } .i-subscription-active { width: 20px; height: 21px; background-position: 0px -104px; }
.i-subscription { width: 20px; height: 21px; background-position: -30px -104px; } .i-subscription { width: 20px; height: 21px; background-position: -30px -104px; }
.i-user { width: 20px; height: 20px; background-position: -60px -225px; }
\ No newline at end of file \ No newline at end of file
.i-user { width: 20px; height: 20px; background-position: -240px -225px; }
\ No newline at end of file \ No newline at end of file

32.3 KB | W: | H:

34.4 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
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
display: none; display: none;
} }
} }
&.is-opened { // &.is-opened {
margin-bottom: $menu-item-mb; // margin-bottom: $menu-item-mb;
} // }
} }
.el-menu-item { .el-menu-item {
&.is-menu { &.is-menu {
......
...@@ -3,7 +3,7 @@ $header-height: 48px; ...@@ -3,7 +3,7 @@ $header-height: 48px;
$header-background: #a3b6c6; $header-background: #a3b6c6;
$header-color: #fff; $header-color: #fff;
$header-padding: 15px; $header-padding: 15px;
$logo-height: 133px; $logo-height: 124px;
// 左侧菜单样式变量 // 左侧菜单样式变量
$menu-background: #2a3f54; $menu-background: #2a3f54;
$menu-color: #fff; $menu-color: #fff;
......
...@@ -22,7 +22,7 @@ module.exports = { ...@@ -22,7 +22,7 @@ module.exports = {
header_background: '#a3b6c6', header_background: '#a3b6c6',
header_color: '#fff', header_color: '#fff',
header_padding: '15px', header_padding: '15px',
logo_height: '133px', logo_height: '124px',
// 左侧菜单样式变量 // 左侧菜单样式变量
menu_background: '#2a3f54', menu_background: '#2a3f54',
menu_color: '#fff', menu_color: '#fff',
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-09-18 09:35:02 * @Date: 2021-09-18 09:35:02
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2023-04-20 16:53:09 * @LastEditTime: 2023-08-24 10:43:02
* @FilePath: \scrm-base\src\common\constants.js * @FilePath: \scrm-base\src\common\constants.js
*/ */
export default { export default {
...@@ -30,5 +30,6 @@ export default { ...@@ -30,5 +30,6 @@ export default {
const iconFiles = require.context('../assets/images/icons', true, /\.png$/) const iconFiles = require.context('../assets/images/icons', true, /\.png$/)
return iconFiles.keys().map(iconPath => iconPath.replace(/^\.\/(.*)\.\w+$/, '$1')) return iconFiles.keys().map(iconPath => iconPath.replace(/^\.\/(.*)\.\w+$/, '$1'))
})(), })(),
DEFAULT_ICON_NAME: 'dataview' DEFAULT_ICON_NAME: 'default'
// SCRM_BASE_UPDATE_LOG_VERSION: 'SCRM_BASE_UPDATE_LOG_CONFIG'
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2023-05-31 16:06:51 * @LastEditTime: 2023-08-28 09:52:02
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
let cfg = require('./conf.js') let cfg = require('./conf.js')
...@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => { ...@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => {
if ((_config && !_constRoutes.includes(_pathname)) || _pathname === _login_path || (_pathname === '/' && _login_path === '/login')) { if ((_config && !_constRoutes.includes(_pathname)) || _pathname === _login_path || (_pathname === '/' && _login_path === '/login')) {
return Promise.resolve(_config) 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 = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -26,14 +26,20 @@ ...@@ -26,14 +26,20 @@
<i class="i i-contact" /> <i class="i i-contact" />
</el-badge> </el-badge>
</span> </span>
<span class="nav-text"> <div class="nav-text">
<el-popover placement="bottom" width="228" height="316" trigger="click"> <el-popover placement="bottom" width="228" height="316" trigger="click">
<NavContact></NavContact> <NavContact></NavContact>
<a href="javascript:void(0);" slot="reference">联系我们</a> <a href="javascript:void(0);" slot="reference">联系我们</a>
</el-popover> </el-popover>
| <span class="sprator">|</span>
<a href="https://www.yuque.com/docs/share/ad640d83-50d9-49cc-a92c-0a5230fedd17" target="blank">营销学院</a> <!-- <a href="https://www.yuque.com/docs/share/ad640d83-50d9-49cc-a92c-0a5230fedd17" target="blank">营销学院</a> -->
</span> <NavUpdateLog />
</div>
</div>
</template>
<template v-else>
<div class="nav-text" style="margin-right: 12px">
<NavUpdateLog />
</div> </div>
</template> </template>
<div class="flex-row flex-items-center"> <div class="flex-row flex-items-center">
...@@ -119,7 +125,7 @@ export default { ...@@ -119,7 +125,7 @@ export default {
this.setCurrent() this.setCurrent()
}, },
methods: { methods: {
...mapActions('app', ['logout', 'formatSave']), ...mapActions('app', ['logout', 'formatSave', 'setLoading']),
...mapActions('auth', ['permission', 'saveSession']), ...mapActions('auth', ['permission', 'saveSession']),
async handleCommand(command) { async handleCommand(command) {
if (typeof command === 'string') { if (typeof command === 'string') {
...@@ -151,8 +157,7 @@ export default { ...@@ -151,8 +157,7 @@ export default {
async edit() { async edit() {
this.dialogVisible = true this.dialogVisible = true
}, },
async logoff() { logoff() {
this.$router.replace('/login')
this.logout() this.logout()
}, },
dropdownVisibleChange(isShow) { dropdownVisibleChange(isShow) {
...@@ -242,14 +247,19 @@ $tip-color: #666 !important; ...@@ -242,14 +247,19 @@ $tip-color: #666 !important;
height: $header-height; height: $header-height;
background-color: #fff; background-color: #fff;
@include leftpadding; @include leftpadding;
.nav-text, /deep/.nav-text {
.nav-text a { display: flex;
margin-left: 2px;
&,
a,
.sprator {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #3b457f; color: #3b457f;
} }
.nav-text { .sprator {
margin-left: 2px; margin: 0 4px;
}
&-avatar { &-avatar {
margin-left: 8px; margin-left: 8px;
overflow: hidden; overflow: hidden;
......
<template>
<div class="com-up-log">
<a :href="v.link" target="blank" @click="clickHandler()" :class="{ isNew: v.isNew }">更新日志</a>
</div>
</template>
<script>
import { Version } from 'glsx-common-sdk'
import { mapGetters } from 'vuex'
const version = new Version({
request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
isSign: false
}
})
export default {
name: 'NavUpdateLog',
data() {
return {
v: {}
}
},
mounted() {
this.getUpdateLogCofig()
},
computed: {
...mapGetters(['auth'])
},
methods: {
async getUpdateLogCofig() {
const loginpath = this.auth?.session?.loginpath
if (loginpath) {
const product = loginpath === '/login' ? 'md' : loginpath.slice(1)
this.v = await version.get({ moduleUrl: `scrm-${product}`, env: 'update' })
}
},
clickHandler() {
this.v = version.set()
}
}
}
</script>
<style lang="scss" scoped>
.com-up-log {
position: relative;
margin-right: 6px;
.isNew:after {
content: 'New';
position: absolute;
width: 30px;
height: 16px;
line-height: 16px;
background: #eb4e4e;
border-radius: 4px 4px 4px 0;
top: -12px;
right: -22px;
color: #fff;
font-size: 12px;
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-08-19 11:16:08 * @Date: 2021-08-19 11:16:08
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2022-11-07 21:30:55 * @LastEditTime: 2023-08-22 16:07:37
* @Description: * @Description:
--> -->
<template> <template>
...@@ -152,7 +152,6 @@ export default { ...@@ -152,7 +152,6 @@ export default {
this.$refs['passwordForm'].resetFields() this.$refs['passwordForm'].resetFields()
}, },
logoff() { logoff() {
this.$router.push('/login')
this.logout() this.logout()
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</div> </div>
</div> </div>
<!-- 有二级菜单的一级菜单 --> <!-- 有二级菜单的一级菜单 -->
<el-submenu v-else :index="item.id" @mouseenter.native.stop="mouseenter(item)" @mouseleave.native.stop="mouseleave" popper-class="el-submenu-popper-base"> <el-submenu v-else :index="item.id" @mouseenter.native.stop="mouseenter(item)" @mouseleave.native.stop="mouseleave" popper-class="el-submenu-popper-base" hide-timeout="0" show-timeout="0">
<template slot="title"> <template slot="title">
<i class="i" :class="genClass(item)"></i> <i class="i" :class="genClass(item)"></i>
<span slot="title">{{ item.title }}</span> <span slot="title">{{ item.title }}</span>
...@@ -74,16 +74,21 @@ export default { ...@@ -74,16 +74,21 @@ export default {
.scrm-base-submenu { .scrm-base-submenu {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
/deep/.el-submenu { .i {
&:not(.is-opened) { min-width: 20px;
margin-bottom: $menu-item-mb; min-height: 20px;
} }
/deep/.el-submenu {
// &:not(.is-opened) {
// margin-bottom: $menu-item-mb;
// }
&__title { &__title {
height: 40px; height: 60px;
line-height: 40px; line-height: 60px;
background-color: transparent !important; background-color: transparent !important;
border-radius: 4px; border-radius: 4px;
padding-left: 28px !important; padding-left: 28px !important;
// margin: 10px 0;
&:hover { &:hover {
background-color: #fff !important; background-color: #fff !important;
span { span {
...@@ -116,6 +121,9 @@ export default { ...@@ -116,6 +121,9 @@ export default {
} }
} }
} }
.el-menu {
transform: translate3d(0, -5px, 0);
}
} }
} }
</style> </style>
...@@ -9,7 +9,7 @@ import '@/common/reg-prototype.js' ...@@ -9,7 +9,7 @@ import '@/common/reg-prototype.js'
import '@/common/error-handler.js' import '@/common/error-handler.js'
import { fetchConfig, config } from '@/config/index' import { fetchConfig, config } from '@/config/index'
import '@/assets/style/index.scss' import '@/assets/style/index.scss'
// import '@/assets/images/sprite/sprite.css' import '@/assets/images/sprite/sprite.css'
import './components' import './components'
import './filters' import './filters'
import { Message } from './plugins/element.js' import { Message } from './plugins/element.js'
......
...@@ -40,9 +40,13 @@ const app = { ...@@ -40,9 +40,13 @@ const app = {
await dispatch('persisted', menuFormat) await dispatch('persisted', menuFormat)
return { defaultPath } return { defaultPath }
}, },
async logout({ dispatch }) { async logout({ dispatch, commit }) {
commit('SET_LOADING', true)
await dispatch('auth/logout', null, { root: true }) await dispatch('auth/logout', null, { root: true })
await dispatch('init/reset', null, { root: true }) setTimeout(() => {
dispatch('init/reset', null, { root: true })
router.replace('/login')
}, 300)
}, },
/* eslint-disable */ /* eslint-disable */
async formatSave({ dispatch }, menus) { async formatSave({ dispatch }, menus) {
......
...@@ -31,8 +31,7 @@ const auth = { ...@@ -31,8 +31,7 @@ const auth = {
async logout({ commit }) { async logout({ commit }) {
await commit('LOGOUT') await commit('LOGOUT')
}, },
/* eslint-disable */ async permission({}, merchant) {
async permission({ dispatch }, merchant) {
const { response, productCode } = This('$config') const { response, productCode } = This('$config')
/* eslint-disable */ /* eslint-disable */
const { sessionId, permissionMerchantIds, uuid, loginList, ...merchantItems } = merchant const { sessionId, permissionMerchantIds, uuid, loginList, ...merchantItems } = merchant
......
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import { constants } from '@/common' import { constants } from '@/common'
const modulesFiles = require.context('.', true, /^(?!.*\/init\.js$).*\.js$/) // eslint-disable-next-line prettier/prettier
const modules = require.context('.', true, /^(?!.*\/init\.js$).*\.js$/).keys().map(fileName => fileName.replace(/^\.\/(.*)\.\w+$/, '$1'))
const init = { const init = {
namespaced: true, namespaced: true,
actions: { actions: {
...@@ -13,10 +14,7 @@ const init = { ...@@ -13,10 +14,7 @@ const init = {
await dispatch('track/setTracker', sessionInfo, { root: true }) await dispatch('track/setTracker', sessionInfo, { root: true })
}, },
reset({ dispatch }) { reset({ dispatch }) {
modulesFiles.forEach(modulePath => { modules.forEach(module => dispatch(`${module}/clear`, null, { root: true }))
const module = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
dispatch(`${module}/clear`, null, { root: true })
})
} }
} }
} }
......
...@@ -237,12 +237,12 @@ export default { ...@@ -237,12 +237,12 @@ export default {
* 1.获取选择的商户信息 * 1.获取选择的商户信息
* 2.获取菜单信息并登录 * 2.获取菜单信息并登录
*/ */
async loginChoose(merchantId) { loginChoose: utils.debounce(async function (merchantId) {
const { response, loginSource } = this.$config const { response, loginSource } = this.$config
const { userName: loginAccount, loginToken } = this.loginForm const { userName: loginAccount, loginToken } = this.loginForm
const { code, message, data } = await api.app.choose({ merchantId, loginAccount, loginToken, loginSource }) const { code, message, data } = await api.app.choose({ merchantId, loginAccount, loginToken, loginSource })
~[() => this.error(message), () => this._permission(data)][+(code === response.code_success_value)].call() ~[() => this.error(message), () => this._permission(data)][+(code === response.code_success_value)].call()
}, }, 2000),
async getCode() { async getCode() {
this.loginForm.code = '' this.loginForm.code = ''
sessionStorage.clear() sessionStorage.clear()
......
...@@ -4,7 +4,7 @@ const resolve = dir => path.join(__dirname, dir) ...@@ -4,7 +4,7 @@ const resolve = dir => path.join(__dirname, dir)
const SpritesmithPlugin = require('webpack-spritesmith') const SpritesmithPlugin = require('webpack-spritesmith')
const CDN_DOMAIN = 'https://img02.glsx.com.cn/ajax/libs' const CDN_DOMAIN = 'https://img02.glsx.com.cn/ajax/libs'
const cdn = { const cdn = {
css: [`${CDN_DOMAIN}/element-ui/2.11.1/theme-chalk/index.css`, 'https://img02.glsx.com.cn/gl-iconfont/iconfont.css', 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/images/icons/sprite.css'], css: [`${CDN_DOMAIN}/element-ui/2.11.1/theme-chalk/index.css`, 'https://img02.glsx.com.cn/gl-iconfont/iconfont.css'],
js: [`${CDN_DOMAIN}/rxjs/7.3.0/rxjs.umd.min.js`] js: [`${CDN_DOMAIN}/rxjs/7.3.0/rxjs.umd.min.js`]
} }
module.exports = { module.exports = {
...@@ -98,12 +98,10 @@ module.exports = { ...@@ -98,12 +98,10 @@ module.exports = {
const templateFunction = function (data) { const templateFunction = function (data) {
var shared = '.i { display: inline-block; vertical-align: middle; background-image: url(I) }'.replace('I', data.sprites[0].image) var shared = '.i { display: inline-block; vertical-align: middle; background-image: url(I) }'.replace('I', data.sprites[0].image)
var perSprite = data.sprites var perSprite = data.sprites
.map(function (sprite) { .map(function (sprite) {
return '.i-N { width: Wpx; height: Hpx; background-position: Xpx Ypx; }'.replace('N', sprite.name).replace('W', sprite.width).replace('H', sprite.height).replace('X', sprite.offset_x).replace('Y', sprite.offset_y) return '.i-N { width: Wpx; height: Hpx; background-position: Xpx Ypx; }'.replace('N', sprite.name).replace('W', sprite.width).replace('H', sprite.height).replace('X', sprite.offset_x).replace('Y', sprite.offset_y)
}) })
.join('\n') .join('\n')
return shared + '\n' + perSprite return shared + '\n' + perSprite
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!