Commit 7404616e by liimin

放弃cdn 菜单css

1 parent b7f32064
......@@ -152,15 +152,8 @@ export default {
async edit() {
this.dialogVisible = true
},
async logoff() {
try {
this.setLoading(true)
await this.logout()
} catch (error) {
console.log({ error })
} finally {
this.$router.replace('/login')
}
logoff() {
this.logout()
},
dropdownVisibleChange(isShow) {
this.drOpen = isShow
......
<template>
<div class="com-up-log">
<a :href="v.link" target="blank" @click="clickHandler()">更新日志</a>
<i class="i i-dot" v-if="v.isNew"></i>
<span class="isNew" v-if="v.isNew">New</span>
</div>
</template>
<script>
import { Version } from 'glsx-common-sdk'
import { helper } from '@/common'
const version = new Version({
request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
......@@ -26,9 +27,11 @@ export default {
methods: {
async getUpdateLogCofig() {
this.v = await version.get({ moduleUrl: 'scrm-sp', env: 'update' })
const { cdn } = this.$config
helper.createLink(`${cdn}/test/icons/sprite.css?v=${this.v.version}`)
},
clickHandler() {
this.v = version.set(this.v.version)
this.v = version.set()
}
}
}
......@@ -36,10 +39,18 @@ export default {
<style lang="scss" scoped>
.com-up-log {
position: relative;
.i-dot {
margin-right: 6px;
.isNew {
position: absolute;
top: -8px;
right: -8px;
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 @@
* @Author: limin
* @Date: 2021-08-19 11:16:08
* @LastEditors: limin
* @LastEditTime: 2022-11-07 21:30:55
* @LastEditTime: 2023-08-22 16:07:37
* @Description:
-->
<template>
......@@ -152,7 +152,6 @@ export default {
this.$refs['passwordForm'].resetFields()
},
logoff() {
this.$router.push('/login')
this.logout()
}
}
......
......@@ -40,9 +40,13 @@ const app = {
await dispatch('persisted', menuFormat)
return { defaultPath }
},
async logout({ dispatch }) {
async logout({ dispatch, commit }) {
commit('SET_LOADING', 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 */
async formatSave({ dispatch }, menus) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!