Commit 7404616e by liimin

放弃cdn 菜单css

1 parent b7f32064
...@@ -152,15 +152,8 @@ export default { ...@@ -152,15 +152,8 @@ export default {
async edit() { async edit() {
this.dialogVisible = true this.dialogVisible = true
}, },
async logoff() { logoff() {
try { this.logout()
this.setLoading(true)
await this.logout()
} catch (error) {
console.log({ error })
} finally {
this.$router.replace('/login')
}
}, },
dropdownVisibleChange(isShow) { dropdownVisibleChange(isShow) {
this.drOpen = isShow this.drOpen = isShow
......
<template> <template>
<div class="com-up-log"> <div class="com-up-log">
<a :href="v.link" target="blank" @click="clickHandler()">更新日志</a> <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> </div>
</template> </template>
<script> <script>
import { Version } from 'glsx-common-sdk' import { Version } from 'glsx-common-sdk'
import { helper } from '@/common'
const version = new Version({ const version = new Version({
request: { request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config', baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
...@@ -26,9 +27,11 @@ export default { ...@@ -26,9 +27,11 @@ export default {
methods: { methods: {
async getUpdateLogCofig() { async getUpdateLogCofig() {
this.v = await version.get({ moduleUrl: 'scrm-sp', env: 'update' }) 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() { clickHandler() {
this.v = version.set(this.v.version) this.v = version.set()
} }
} }
} }
...@@ -36,10 +39,18 @@ export default { ...@@ -36,10 +39,18 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.com-up-log { .com-up-log {
position: relative; position: relative;
.i-dot { margin-right: 6px;
.isNew {
position: absolute; position: absolute;
top: -8px; width: 30px;
right: -8px; height: 16px;
line-height: 16px;
background: #eb4e4e;
border-radius: 4px 4px 4px 0;
top: -12px;
right: -22px;
color: #fff;
font-size: 12px;
} }
} }
</style> </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()
} }
} }
......
...@@ -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) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!