正在显示
3 个修改的文件
包含
8 行增加
和
7 行删除
| 1 | -import { createWebHistory, createRouter } from 'vue-router' | 1 | +import { createWebHashHistory, createRouter } from 'vue-router' |
| 2 | /* Layout */ | 2 | /* Layout */ |
| 3 | import Layout from '@/layout' | 3 | import Layout from '@/layout' |
| 4 | 4 | ||
| @@ -161,7 +161,7 @@ export const dynamicRoutes = [ | @@ -161,7 +161,7 @@ export const dynamicRoutes = [ | ||
| 161 | ] | 161 | ] |
| 162 | 162 | ||
| 163 | const router = createRouter({ | 163 | const router = createRouter({ |
| 164 | - history: createWebHistory(), | 164 | + history: createWebHashHistory(), |
| 165 | routes: constantRoutes, | 165 | routes: constantRoutes, |
| 166 | scrollBehavior(to, from, savedPosition) { | 166 | scrollBehavior(to, from, savedPosition) { |
| 167 | if (savedPosition) { | 167 | if (savedPosition) { |
| @@ -159,7 +159,7 @@ | @@ -159,7 +159,7 @@ | ||
| 159 | <el-tree-select | 159 | <el-tree-select |
| 160 | v-model="form.parentId" | 160 | v-model="form.parentId" |
| 161 | :data="menuOptions" | 161 | :data="menuOptions" |
| 162 | - :props="{ value: 'id', label: 'label', children: 'children' }" | 162 | + :props="{ value: 'id', label: 'name', children: 'children' }" |
| 163 | value-key="id" | 163 | value-key="id" |
| 164 | placeholder="选择上级分类" | 164 | placeholder="选择上级分类" |
| 165 | check-strictly | 165 | check-strictly |
| @@ -346,9 +346,9 @@ function resetQuery() { | @@ -346,9 +346,9 @@ function resetQuery() { | ||
| 346 | /** 查询菜单下拉树结构 */ | 346 | /** 查询菜单下拉树结构 */ |
| 347 | function getTypeTreeSelect() { | 347 | function getTypeTreeSelect() { |
| 348 | menuOptions.value = []; | 348 | menuOptions.value = []; |
| 349 | - getTreeTypeList().then((response) => { | ||
| 350 | - const menu = { id: 0, label: "主类目", children: [] }; | ||
| 351 | - menu.children = response.data; | 349 | + getTypeList().then((response) => { |
| 350 | + const menu = { id: 0, name: "主类目", children: [] }; | ||
| 351 | + menu.children = proxy.handleTree(response.data, "id"); | ||
| 352 | menuOptions.value.push(menu); | 352 | menuOptions.value.push(menu); |
| 353 | }); | 353 | }); |
| 354 | } | 354 | } |
| @@ -2,7 +2,8 @@ import { defineConfig, loadEnv } from 'vite' | @@ -2,7 +2,8 @@ import { defineConfig, loadEnv } from 'vite' | ||
| 2 | import path from 'path' | 2 | import path from 'path' |
| 3 | import createVitePlugins from './vite/plugins' | 3 | import createVitePlugins from './vite/plugins' |
| 4 | 4 | ||
| 5 | -const baseUrl = 'http://htai.toolsai.cc/' // 后端接口 | 5 | +// const baseUrl = 'http://htai.aiboxgo.com/' // 后端接口 |
| 6 | +const baseUrl = 'http://192.168.2.15:35273/' // 后端接口 | ||
| 6 | 7 | ||
| 7 | // https://vitejs.dev/config/ | 8 | // https://vitejs.dev/config/ |
| 8 | export default defineConfig(({ mode, command }) => { | 9 | export default defineConfig(({ mode, command }) => { |
-
请 注册 或 登录 后发表评论