mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-06-24 11:00:22 +08:00
manager 升级到vue3
This commit is contained in:
@@ -1,32 +1,46 @@
|
||||
<template>
|
||||
<div id="main" class="app-main">
|
||||
<router-view></router-view>
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCategoryTree } from '@/api/goods.js'
|
||||
import Cookies from "js-cookie";
|
||||
import { getCategoryTree } from "@/api/goods.js";
|
||||
import util from "@/libs/util";
|
||||
|
||||
export default {
|
||||
updated () {
|
||||
if (!localStorage.getItem('category') && this.$route.path !== '/login') {
|
||||
getCategoryTree(0).then(res => {
|
||||
name: "App",
|
||||
updated() {
|
||||
if (!localStorage.getItem("category") && this.$route.path !== "/login") {
|
||||
getCategoryTree(0).then((res) => {
|
||||
if (res.success) {
|
||||
localStorage.setItem('category', JSON.stringify(res.result))
|
||||
localStorage.setItem("category", JSON.stringify(res.result));
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const loggedIn = this.getStore("accessToken") || Cookies.get("userInfoManager");
|
||||
if (loggedIn) {
|
||||
util.bootstrapDynamicRoutesFromCache();
|
||||
util.initRouter(this);
|
||||
this.$store.commit("setOpenedList");
|
||||
this.$store.commit("initCachePage");
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f0f0f0;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.app-main {
|
||||
@@ -42,14 +56,6 @@ body {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.ivu-btn-text:focus {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.ivu-tag {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tox-notifications-container {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user