|
@@ -14,19 +14,19 @@ function headrRouter(initialState: any, history: any) {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- if (history?.location?.pathname === '/launchSystemNew') { //当切换一级菜单的辅助跳转
|
|
|
+ if (history?.location?.pathname === '/launchSystemV3') { //当切换一级菜单的辅助跳转
|
|
|
history?.goBack()
|
|
|
initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
|
|
|
- if (item?.routes?.some((i: { path: string }) => i.path?.includes('/launchSystemNew'))) {
|
|
|
+ if (item?.routes?.some((i: { path: string }) => i.path?.includes('/launchSystemV3'))) {
|
|
|
let path = item?.routes?.length > 0 ? (item?.routes[0]?.routes?.length > 0 && item?.routes[0]?.routes[0]?.path) ? item?.routes[0]?.routes[0]?.path : item?.routes[0].path : item?.routes[0].path
|
|
|
isPhone ? history.push(path) : window.open(location.origin + '/#' + path)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- if (history?.location?.pathname === '/launchSystemV3') { //当切换一级菜单的辅助跳转
|
|
|
+ if (history?.location?.pathname === '/launchSystemNew') { //当切换一级菜单的辅助跳转
|
|
|
history?.goBack()
|
|
|
initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
|
|
|
- if (item?.routes?.some((i: { path: string }) => i.path?.includes('/launchSystemV3'))) {
|
|
|
+ if (item?.routes?.some((i: { path: string }) => i.path?.includes('/launchSystemNew'))) {
|
|
|
let path = item?.routes?.length > 0 ? (item?.routes[0]?.routes?.length > 0 && item?.routes[0]?.routes[0]?.path) ? item?.routes[0]?.routes[0]?.path : item?.routes[0].path : item?.routes[0].path
|
|
|
isPhone ? history.push(path) : window.open(location.origin + '/#' + path)
|
|
|
}
|
|
@@ -75,12 +75,6 @@ function getMyMenu(code: any, data: any,) {
|
|
|
new_data.push(data[key][0])
|
|
|
}
|
|
|
})
|
|
|
- // 处理顺序
|
|
|
- new_data = new_data?.sort((a, b) => {
|
|
|
- let v1 = a.orderNum
|
|
|
- let v2 = b.orderNum
|
|
|
- return v1 - v2
|
|
|
- })
|
|
|
new_data?.forEach((items: any) => {
|
|
|
if (items?.children?.length === 0) {//假如路由的子路由只有一个代表当前组件没有子路由,将children中的component组件路径给外层component
|
|
|
newData.push({ path: items.children[0].path, name: items.meta.title, icon: items.meta.icon, component: items.children[0].component, key: items.menuId }) // roles: roles
|
|
@@ -93,6 +87,100 @@ function getMyMenu(code: any, data: any,) {
|
|
|
}
|
|
|
return newData
|
|
|
}
|
|
|
+const launchSystemV3 = {
|
|
|
+ path: '/launchSystemV3',
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ path: '/launchSystemV3/adMonitorListV3',
|
|
|
+ name: '广告监控',
|
|
|
+ component: './launchSystemV3/adMonitorListV3',
|
|
|
+ access: 'adMonitorListV3',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/launchSystemV3/adqv3',
|
|
|
+ name: '腾讯广告',
|
|
|
+ component: './launchSystemV3/adqv3',
|
|
|
+ access: 'adqv3',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/launchSystemV3/account',
|
|
|
+ name: '广告账户管理',
|
|
|
+ access: 'account',
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: '小说',
|
|
|
+ path: '/launchSystemV3/account/novel',
|
|
|
+ access: 'novel',
|
|
|
+ component: './launchSystemNew/account/novel',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '游戏',
|
|
|
+ path: '/launchSystemV3/account/game',
|
|
|
+ access: 'game',
|
|
|
+ component: './launchSystemNew/account/game',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/launchSystemV3/tencentAdPutIn',
|
|
|
+ name: '广告投放',
|
|
|
+ access: 'tencentAdPutIn',
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: '广告创建',
|
|
|
+ path: '/launchSystemV3/tencentAdPutIn/create',
|
|
|
+ access: 'create',
|
|
|
+ component: './launchSystemV3/tencentAdPutIn/create',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '任务列表',
|
|
|
+ path: '/launchSystemV3/tencentAdPutIn/taskList',
|
|
|
+ access: 'taskList',
|
|
|
+ component: './launchSystemV3/tencentAdPutIn/taskList',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/launchSystemV3/tencenTasset',
|
|
|
+ name: '资产',
|
|
|
+ access: 'tencenTasset',
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: '定向模板',
|
|
|
+ path: '/launchSystemV3/tencenTasset/targeting',
|
|
|
+ access: 'targeting',
|
|
|
+ component: './launchSystemV3/tencenTasset/targeting',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '品牌形象',
|
|
|
+ path: '/launchSystemV3/tencenTasset/brand',
|
|
|
+ access: 'brand',
|
|
|
+ component: './launchSystemV3/tencenTasset/brand',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '头像昵称跳转页',
|
|
|
+ path: '/launchSystemV3/tencenTasset/profiles',
|
|
|
+ access: 'profiles',
|
|
|
+ component: './launchSystemV3/tencenTasset/profiles',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/launchSystemV3/material',
|
|
|
+ name: '素材库',
|
|
|
+ access: 'material',
|
|
|
+ icon: 'DatabaseOutlined',
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: '本地素材',
|
|
|
+ path: '/launchSystemV3/material/cloud',
|
|
|
+ access: 'cloud',
|
|
|
+ component: './launchSystemNew/material/cloud',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+}
|
|
|
/** 投放系统 */
|
|
|
const launchSystem = {
|
|
|
path: '/launchSystemNew',
|
|
@@ -182,81 +270,7 @@ const launchSystem = {
|
|
|
],
|
|
|
|
|
|
}
|
|
|
-const launchSystemV3 = {
|
|
|
- path: '/launchSystemV3',
|
|
|
- routes: [
|
|
|
- {
|
|
|
- path: '/launchSystemV3/adMonitorListV3',
|
|
|
- name: '广告监控',
|
|
|
- component: './launchSystemV3/adMonitorListV3',
|
|
|
- access: 'adMonitorListV3',
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/launchSystemV3/adqv3',
|
|
|
- name: '腾讯广告',
|
|
|
- component: './launchSystemV3/adqv3',
|
|
|
- access: 'adqv3',
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/launchSystemV3/tencentAdPutIn',
|
|
|
- name: '广告投放',
|
|
|
- access: 'tencentAdPutIn',
|
|
|
- routes: [
|
|
|
- {
|
|
|
- name: '广告创建',
|
|
|
- path: '/launchSystemV3/tencentAdPutIn/create',
|
|
|
- access: 'create',
|
|
|
- component: './launchSystemV3/tencentAdPutIn/create',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '任务列表',
|
|
|
- path: '/launchSystemV3/tencentAdPutIn/taskList',
|
|
|
- access: 'taskList',
|
|
|
- component: './launchSystemV3/tencentAdPutIn/taskList',
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/launchSystemV3/tencenTasset',
|
|
|
- name: '资产',
|
|
|
- access: 'tencenTasset',
|
|
|
- routes: [
|
|
|
- {
|
|
|
- name: '定向模板',
|
|
|
- path: '/launchSystemV3/tencenTasset/targeting',
|
|
|
- access: 'targeting',
|
|
|
- component: './launchSystemV3/tencenTasset/targeting',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '品牌形象',
|
|
|
- path: '/launchSystemV3/tencenTasset/brand',
|
|
|
- access: 'brand',
|
|
|
- component: './launchSystemV3/tencenTasset/brand',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '头像昵称跳转页',
|
|
|
- path: '/launchSystemV3/tencenTasset/profiles',
|
|
|
- access: 'profiles',
|
|
|
- component: './launchSystemV3/tencenTasset/profiles',
|
|
|
- }
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/launchSystemV3/material',
|
|
|
- name: '素材库',
|
|
|
- access: 'material',
|
|
|
- icon: 'DatabaseOutlined',
|
|
|
- routes: [
|
|
|
- {
|
|
|
- name: '本地素材',
|
|
|
- path: '/launchSystemV3/material/cloud',
|
|
|
- access: 'cloud',
|
|
|
- component: './launchSystemNew/material/cloud',
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ]
|
|
|
-}
|
|
|
+
|
|
|
/** 头条 */
|
|
|
const adMonitor = {
|
|
|
path: '/toutiao',
|
|
@@ -273,7 +287,7 @@ const adMonitor = {
|
|
|
export {
|
|
|
headrRouter,
|
|
|
getMyMenu,
|
|
|
+ launchSystemV3,
|
|
|
launchSystem,
|
|
|
- adMonitor,
|
|
|
- launchSystemV3
|
|
|
+ adMonitor
|
|
|
}
|