添加菜单

master
夜笙歌 1 month ago
parent 684ac2ed20
commit 2a9b6ab954

@ -1,11 +1,13 @@
<template>
<div class="menu">
<div v-for="(i,k) in menuList" :class="`menuItem ${$route.path === i.path ? 'focus':''}`" @mouseenter="getChildren(i)" @click="toLink((i.children||[]).length===0 ? i.path:'')">
<div v-for="(i,k) in menuList" :class="`menuItem ${$route.path === i.path ? 'focus':''}`"
@mouseenter="getChildren(i)" @click="toLink((i.children||[]).length===0 ? i.path:'')">
<div :class="`name `">{{ i.name }}</div>
<div class="line"></div>
</div>
<div class="subMenu" v-if="(subMenuList||[]).length>0" @mouseleave="clearChildren">
<div :class="`topMenuItem${$route.fullPath === ii.path ? ' active':''}`" v-for="(ii,k) in subMenuList" @click="toLink(ii.path)">
<div :class="`topMenuItem${$route.fullPath === ii.path ? ' active':''}`" v-for="(ii,k) in subMenuList"
@click="toLink(ii.path)">
<div class="icon">
<img :src="ii.icon" alt="" style="width: 1.8vw;height: 1.8vw;object-fit: contain">
</div>
@ -35,13 +37,18 @@ export default {
name: '首页',
path: '/index'
},
{
name: '关于海威',
path: '/productCenter/industrialInternet',
children: []
},
{
name: '产品中心',
path: '/productCenter/industrialInternet',
children: []
},
{
name: '例与客户',
name: '行业方案',
path: '/casesAndClients/IOT',
children: []
},
@ -50,7 +57,7 @@ export default {
// path: '/newsCenter'
// },
{
name: '关于我们',
name: '服务支持',
path: '/contactUs'
},
],
@ -87,7 +94,7 @@ export default {
pageSize: 111
}).then(e => {
console.log(e)
this.menuList[1].children = e.rows.map(v => {
this.menuList[2].children = e.rows.map(v => {
return {
name: v.configTypeName,
icon: v.configTypeIcon,
@ -102,7 +109,22 @@ export default {
pageSize: 111
}).then(e => {
console.log(e)
this.menuList[2].children = e.rows.map(v => {
this.menuList[3].children = e.rows.map(v => {
return {
name: v.configTypeName,
icon: v.configTypeIcon,
path: '/casesAndClients/IOT?portalConfigTypeId=' + v.configTypeId
}
})
})
getPortalConfigTypeList({
configTypeClassfication: 3,
parentId: 0,
pageNum: 1,
pageSize: 111
}).then(e => {
console.log(e)
this.menuList[1].children = e.rows.map(v => {
return {
name: v.configTypeName,
icon: v.configTypeIcon,

@ -26,7 +26,7 @@ import wlw from "@/assets/icon/wlw.png";
let map = null
export default {
name: 'PlatformAdvantages',
name: 'PlatformAdvantages2',
components: {
TitleGroup
},

@ -23,7 +23,7 @@ import wlw from "@/assets/icon/wlw.png";
let map = null
export default {
name: 'PlatformAdvantages',
name: 'PlatformAdvantages3',
components: {
TitleGroup
},

@ -10,7 +10,7 @@ module.exports = defineConfig({
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
'/dev-api': {
target: `http://175.27.215.92/prod-api`,
target: `http://175.27.215.92:8899/prod-api`,
// target: `http://1345442242.gnway.cc:80`,
changeOrigin: true,
pathRewrite: {

10751
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save