Bladeren bron

注释无用代码

@dongkboy 1 jaar geleden
bovenliggende
commit
e3aa9a0013

+ 0 - 1
.env.development

@@ -3,7 +3,6 @@ VITE_APP_SETTING = false
 # 页面标题
 VITE_APP_TITLE = 掌柜运营平台
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
-# VITE_APP_API_BASEURL = https://test.baoxianzhanggui.com/web-api #默认地址
 # VITE_APP_API_BASEURL = http://192.168.0.55:8001  #董鑫
 VITE_APP_API_BASEURL = http://192.168.0.253:8001  #田智
 

+ 1 - 1
.env.production

@@ -1,7 +1,7 @@
 # 应用配置面板
 VITE_APP_SETTING = false
 # 页面标题
-VITE_APP_TITLE = 生产环境
+VITE_APP_TITLE = 掌柜运营平台
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
 VITE_APP_API_BASEURL = https://sxzgkj.baoxianzhanggui.com/web-api
 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空

+ 2 - 2
.env.test

@@ -1,9 +1,9 @@
 # 应用配置面板
 VITE_APP_SETTING = false
 # 页面标题
-VITE_APP_TITLE = 测试环境
+VITE_APP_TITLE = 掌柜运营平台
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = https://test.baoxianzhanggui.com/web-api
+VITE_APP_API_BASEURL = http://39.98.199.213:8001 #测试地址
 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
 VITE_APP_DEBUG_TOOL =
 # 是否禁用开发者工具,可防止被调试

+ 1 - 1
src/layouts/components/HotkeysIntro/index.vue

@@ -37,7 +37,7 @@ onMounted(() => {
 })
 const submitForm = async (formEl: FormInstance | undefined) => {
   if (!formEl) return
-  await formEl.validate((valid, fields): any => {
+  await formEl.validate((valid): any => {
     if (valid) {
       if (formLabelAlign.oldPassWord == formLabelAlign.newPassWord) {
         return ElMessage({

+ 1 - 1
src/layouts/components/Logo/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import imgLogo from '@/assets/images/logo.png'
+// import imgLogo from '@/assets/images/logo.png'
 import useSettingsStore from '@/store/modules/settings'
 
 defineOptions({

+ 3 - 4
src/store/modules/menu.ts

@@ -1,6 +1,5 @@
 import type { Menu, Route } from '#/global'
 import type { RouteRecordRaw } from 'vue-router'
-import api from '@/api'
 import menu from '@/menu'
 import { resolveRoutePath } from '@/utils'
 import { cloneDeep } from 'lodash-es'
@@ -183,9 +182,9 @@ const useMenuStore = defineStore(
     }
     // 生成导航(后端生成)
     async function generateMenusAtBack() {
-      await api.appApi.menuList().then(async (res) => {
-        filesystemMenusRaw.value = (res.data as Menu.recordMainRaw[]).filter(item => item.children.length !== 0)
-      }).catch(() => {})
+      // await api.appApi.menuList().then(async (res) => {
+      //   filesystemMenusRaw.value = (res.data as Menu.recordMainRaw[]).filter(item => item.children.length !== 0)
+      // }).catch(() => {})
     }
     // 设置主导航
     function isPathInMenus(menus: Menu.recordRaw[], path: string) {

+ 20 - 21
src/store/modules/route.ts

@@ -1,6 +1,5 @@
 import type { Route } from '#/global'
 import type { RouteRecordRaw } from 'vue-router'
-import apiApp from '@/api/modules/app'
 import { systemRoutes } from '@/router/routes'
 import { resolveRoutePath } from '@/utils'
 import { cloneDeep } from 'lodash-es'
@@ -149,26 +148,26 @@ const useRouteStore = defineStore(
       isGenerate.value = true
     }
     // 格式化后端路由数据
-    function formatBackRoutes(routes: any, views = import.meta.glob('../../views/**/*.vue')): Route.recordMainRaw[] {
-      return routes.map((route: any) => {
-        switch (route.component) {
-          case 'Layout':
-            route.component = () => import('@/layouts/index.vue')
-            break
-          default:
-            if (route.component) {
-              route.component = views[`../../views/${route.component}`]
-            }
-            else {
-              delete route.component
-            }
-        }
-        if (route.children) {
-          route.children = formatBackRoutes(route.children, views)
-        }
-        return route
-      })
-    }
+    // function formatBackRoutes(routes: any, views = import.meta.glob('../../views/**/*.vue')): Route.recordMainRaw[] {
+    //   return routes.map((route: any) => {
+    //     switch (route.component) {
+    //       case 'Layout':
+    //         route.component = () => import('@/layouts/index.vue')
+    //         break
+    //       default:
+    //         if (route.component) {
+    //           route.component = views[`../../views/${route.component}`]
+    //         }
+    //         else {
+    //           delete route.component
+    //         }
+    //     }
+    //     if (route.children) {
+    //       route.children = formatBackRoutes(route.children, views)
+    //     }
+    //     return route
+    //   })
+    // }
     // 生成路由(后端获取)
     async function generateRoutesAtBack() {
       // await apiApp.routeList().then((res) => {