master
fanfan 4 months ago
parent bbef478b54
commit 93d364fcb9
  1. 37
      src/components/GlobalHeader/RightContent.vue
  2. 6
      src/config/router.config.js

@ -1,6 +1,7 @@
<template> <template>
<div :class="wrpCls"> <div :class="wrpCls">
<!-- PRO标识 --> <!-- PRO标识 -->
<span style="color: #001529; font-size: 14px">商城截止时间{{ storeInfo.effective_time | formatDate }}</span>
<div v-if="isPro" class="pro-edition"> <div v-if="isPro" class="pro-edition">
<a-tooltip placement="bottom"> <a-tooltip placement="bottom">
<template slot="title"> <template slot="title">
@ -20,50 +21,58 @@
<script> <script>
import AvatarDropdown from './AvatarDropdown' import AvatarDropdown from './AvatarDropdown'
// import SelectLang from '@/components/SelectLang' // import SelectLang from '@/components/SelectLang'
import moment from 'moment'
export default { export default {
name: 'RightContent', name: 'RightContent',
components: { components: {
AvatarDropdown AvatarDropdown,
// SelectLang // SelectLang
}, },
props: { props: {
prefixCls: { prefixCls: {
type: String, type: String,
default: 'ant-pro-global-header-index-action' default: 'ant-pro-global-header-index-action',
}, },
isMobile: { isMobile: {
type: Boolean, type: Boolean,
default: () => false default: () => false,
}, },
topMenu: { topMenu: {
type: Boolean, type: Boolean,
required: true required: true,
}, },
theme: { theme: {
type: String, type: String,
required: true required: true,
} },
}, },
data () { data() {
const currentUser = this.$store.getters.userInfo const currentUser = this.$store.getters.userInfo
return { return {
showMenu: true, showMenu: true,
currentUser, currentUser,
isPro: true isPro: true,
storeInfo: '',
} }
}, },
filters: {
formatDate(value) {
return value ? moment(value * 1000).format('YYYY-MM-DD HH:mm:ss') : '-'
},
},
computed: { computed: {
wrpCls () { wrpCls() {
return { return {
'ant-pro-global-header-index-right': true, 'ant-pro-global-header-index-right': true,
[`ant-pro-global-header-index-${(this.isMobile || !this.topMenu) ? 'light' : this.theme}`]: true [`ant-pro-global-header-index-${this.isMobile || !this.topMenu ? 'light' : this.theme}`]: true,
} }
} },
},
mounted() {
this.storeInfo = JSON.parse(window.localStorage.getItem('storeInfo'))
console.log(this.storeInfo.effective_time)
}, },
mounted () {
}
} }
</script> </script>

@ -1127,6 +1127,12 @@ export const asyncRouterMap = [
meta: { title: '客服设置', keepAlive: false, permission: ['/setting/customer'] }, meta: { title: '客服设置', keepAlive: false, permission: ['/setting/customer'] },
moduleKey: 'setting-customer', moduleKey: 'setting-customer',
}, },
{
path: '/setting/gmall/index',
component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/gmall/index'),
meta: { title: '开通商城', keepAlive: false, permission: ['/setting/gmall/index'] },
moduleKey: 'setting-customer',
},
// { // {
// path: '/setting/storage', // path: '/setting/storage',
// component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/Storage'), // component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/Storage'),

Loading…
Cancel
Save