Selaa lähdekoodia

log:配置本地路由+SUCESS CODE由1改为200+添加小地图页面路由

sunhongyao341504 2 vuotta sitten
vanhempi
commit
c8bc1d68e3

+ 2 - 2
.env.development

@@ -1,5 +1,5 @@
 # 只在开发模式中被载入
-VITE_PORT = 8084
+VITE_PORT = 8092
 
 # 网站根目录
 VITE_PUBLIC_PATH = /
@@ -18,7 +18,7 @@ VITE_DROP_CONSOLE = true
 # VITE_PROXY=[["/api","https://naive-ui-admin"]]
 
 # API 接口地址
-VITE_GLOB_API_URL = http://172.16.23.144:8086
+VITE_GLOB_API_URL = 
 # 图片上传地址
 VITE_GLOB_UPLOAD_URL= http://172.16.23.144:8086
 

+ 1 - 1
mock/_util.ts

@@ -2,7 +2,7 @@ import Mock from 'mockjs';
 
 export function resultSuccess(result, { message = 'ok' } = {}) {
   return Mock.mock({
-    code: 1,
+    code: 200,
     data: result,
     message,
     type: 'success',

+ 32 - 0
mock/login/routers.ts

@@ -63,6 +63,38 @@ const list = [
       },
     ],
   },
+  {
+    path: '/map-config',
+    name: 'map_config',
+    component: 'LAYOUT',
+    redirect: '/map-config/mini-map',
+    meta: {
+      icon: 'PictureOutlined',
+      title: '地图配置',
+      noCache: false,
+      hidden: false,
+      isFrame: '1',
+      status: '0',
+      isRoot: false,
+      alwaysShow: false,
+    },
+    children: [
+      {
+        path: 'mini-map',
+        name: 'mini_map',
+        component: '/map-config/mini-map/MiniMapConfig',
+        meta: {
+          title: '自定义地图',
+          noCache: false,
+          hidden: false,
+          isFrame: '1',
+          status: '0',
+          isRoot: false,
+          alwaysShow: false,
+        },
+      },
+    ],
+  },
   {
     path: '/auth',
     name: 'auth',

+ 1 - 0
package.json

@@ -45,6 +45,7 @@
     "echarts": "^5.3.3",
     "element-plus": "^2.3.6",
     "element-resize-detector": "^1.2.4",
+    "fabric": "^5.3.0",
     "lodash-es": "^4.17.21",
     "mockjs": "^1.1.0",
     "nprogress": "^0.2.0",

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 687 - 32
pnpm-lock.yaml


+ 1 - 1
src/enums/httpEnum.ts

@@ -2,7 +2,7 @@
  * @description: 请求结果集
  */
 export enum ResultEnum {
-  SUCCESS = 1,
+  SUCCESS = 200,
   ERROR = 400,
   TIMEOUT = 20011,
   TYPE = 'success',

+ 1 - 1
src/layout/components/Sider/Sider.vue

@@ -13,8 +13,8 @@
   >
     <template v-for="item in menus" :key="item.key">
       <el-menu-item v-if="!item.children" :key="getMenuKey(item.key)" :index="item.key">
+        <el-icon v-if="item.icon"><component :is="item.icon" /></el-icon>
         <template #title>
-          <el-icon v-if="item.icon"><component :is="item.icon" /></el-icon>
           <span>{{ item.title }}</span>
         </template>
       </el-menu-item>

+ 2 - 0
src/router/router-icons.ts

@@ -13,6 +13,7 @@ import {
   BellOutlined,
   BookOutlined,
   ToolOutlined,
+  PictureOutlined,
 } from '@vicons/antd';
 import {
   OptionsSharp,
@@ -40,4 +41,5 @@ export const constantRouterIcon = {
   BellOutlined: renderIcon(BellOutlined),
   BookOutlined: renderIcon(BookOutlined),
   ToolOutlined: renderIcon(ToolOutlined),
+  PictureOutlined: renderIcon(PictureOutlined),
 };

+ 7 - 0
src/views/map-config/mini-map/MiniMapConfig.vue

@@ -0,0 +1,7 @@
+<template>
+  <div>自定义小地图</div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>