fix: 增加版本号

This commit is contained in:
zhangds 2024-06-20 15:16:50 +08:00
parent febcb51570
commit 792df5edfc
4 changed files with 99 additions and 79 deletions

View File

@ -1,24 +1,24 @@
import React from "react";
import "./main.less";
import { Link } from "react-router-dom";
import React from "react"
import "./main.less"
import { Link } from "react-router-dom"
export default class MouseMenu extends React.Component {
constructor(props) {
super(props);
super(props)
this.state = {
activeMenuList: [] //总动态路由数据
};
}
}
componentDidMount() {
let activeMenuList = JSON.parse(sessionStorage.getItem("activeMenu"));
this.setState({ activeMenuList });
let activeMenuList = JSON.parse(sessionStorage.getItem("activeMenu"))
this.setState({ activeMenuList })
}
closeMenuMask() {
this.props.mouseLeaveFn();
this.props.mouseLeaveFn()
}
//点击菜单
clickMenuItem(e, it) {
if (it.router == "/home/distributor-add") {
sessionStorage.setItem("pathname2", "/home/system/distributor-add");
sessionStorage.setItem("pathname2", "/home/system/distributor-add")
let activerou = [
{
pagetitle: "新建",
@ -33,24 +33,26 @@ export default class MouseMenu extends React.Component {
}
]
}
];
sessionStorage.setItem("breaknav", JSON.stringify(activerou));
]
sessionStorage.setItem("breaknav", JSON.stringify(activerou))
}
this.props.mouseLeaveFn();
this.props.mouseLeaveFn()
}
render() {
let menuList = this.state.activeMenuList; //路由表
let urlHref = window.location.href.replace(/^\/|\/$/g, "");
const pathname = urlHref.lastIndexOf("/");
const pathnamestr = urlHref.substr(pathname);
let menuList = this.state.activeMenuList //路由表
let urlHref = window.location.href.replace(/^\/|\/$/g, "")
const pathname = urlHref.lastIndexOf("/")
const pathnamestr = urlHref.substr(pathname)
return (
<div
className='mouseMenu'
className="mouseMenu"
onMouseLeave={this.closeMenuMask.bind(this)}
onMouseEnter={this.props.mouseEnter}>
<div className='menuBody'>
<div className='first_menu'>
onMouseEnter={this.props.mouseEnter}
>
<div className="menuBody">
<div className="first_menu">
{menuList?.map((item, i) => {
return (
<div key={i}>
@ -60,23 +62,23 @@ export default class MouseMenu extends React.Component {
key={childI}
to={childItem.router}
className={
childItem.router.includes(pathnamestr) &&
item.children.length >= 1
childItem.router.includes(pathnamestr) && item.children.length >= 1
? "mouse_menuactive menu_items"
: "menu_items"
}
onClick={(e) => this.clickMenuItem(e, childItem)}>
onClick={(e) => this.clickMenuItem(e, childItem)}
>
{childItem.title}
</Link>
) : null;
) : null
})}
</div>
);
)
})}
</div>
{/* <Icon type="close" className="closeMenu" onClick={this.closeMenuMask.bind(this)} /> */}
</div>
</div>
);
)
}
}

View File

@ -185,7 +185,9 @@ export default class App extends Component {
{/* logo */}
<div className="log">
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/logo.svg" alt="" />
<span>营销系统管理平台</span>
<span className="name">营销系统管理平台</span>
<span className="versions">V2.9.7.8</span>
</div>
{/* 顶部导航 */}
<div className="nav">

View File

@ -1,7 +1,7 @@
.start {
width: 100%;
height: 100%;
background: #F5F6F7;
background: #f5f6f7;
// overflow-y: scroll;
}
.navicon {
@ -46,11 +46,17 @@
width: 36px;
height: 36px;
}
.start .log span{
.start .log .name {
padding-left: 15px;
width: 200px;
border-left: 1px solid #ccc;
}
.start .log .versions {
font-size: 12px;
padding: 0 5px;
margin-top: 28px;
}
.nav {
height: 100%;
width: 60vw;
@ -96,9 +102,8 @@
width: 200px;
display: flex;
padding: 15px;
background: #F7F9FC;
background: #f7f9fc;
border-bottom: 1px solid #e0e0e0;
}
.exit-userInfo {
line-height: 1.5rem;
@ -107,7 +112,8 @@
font-size: 14px;
margin-left: 15px;
}
.exit-btn,.modify-btn{
.exit-btn,
.modify-btn {
flex: 1;
display: flex;
align-items: center;
@ -117,7 +123,8 @@
color: #939599;
cursor: pointer;
}
.exit-btn:hover,.modify-btn:hover{
.exit-btn:hover,
.modify-btn:hover {
color: #296bef;
}
.modify-btn {

View File

@ -79,7 +79,16 @@ export default class App extends Component {
this.getAccountList()
sessionStorage.setItem("showflag", true)
if (menuList && menuList.length > 0) {
// 过滤 系统管理 ***
let xtIndex = menuList.findIndex((item) => item.title === "系统管理")
if (xtIndex !== -1) {
menuList[xtIndex].children = menuList[xtIndex].children.filter(
(item) => item.title !== "定制化模板"
)
sessionStorage.setItem("activeMenu", JSON.stringify(menuList))
} else {
sessionStorage.setItem("activeMenu", JSON.stringify(menuList))
}
let market = menuList.filter((item) => item.id == 16)
if (market && market[0]?.children.length > 0) {
//菜单有营销计划