huangxw 1 month ago
parent
commit
fed3314656

+ 36 - 5
src/pages.json

@@ -41,14 +41,45 @@
     ],
     "subPackages": [
         {
-            "root": "plant",
+            // 基地分包
+            "root": "plant/base",
             "pages": [
                 {
-                    "path": "index/index",
+                    "path": "base-list/index",
                     "style": {
-                        "navigationBarTitleText": "企业信息",
-                        "disableScroll": true,
-                        "enablePullDownRefresh": false
+                        "navigationBarTitleText": "基地列表"
+                    }
+                },
+                {
+                    "path": "base-detail/index",
+                    "style": {
+                        "navigationBarTitleText": "基地详情"
+                    }
+                },
+                {
+                    "path": "base-edit/index",
+                    "style": {
+                        "navigationBarTitleText": "编辑基地"
+                    }
+                },
+                {
+                    "path": "base-map/index",
+                    "style": {
+                        "navigationBarTitleText": "基地地图"
+                    }
+                },
+                // GAP基地信息
+                {
+                    "path": "gap-base-info/index",
+                    "style": {
+                        "navigationBarTitleText": "GAP基地信息"
+                    }
+                },
+                // 添加Gap基地信息添加
+                {
+                    "path": "gap-base-info-edit/index",
+                    "style": {
+                        "navigationBarTitleText": "添加GAP基地信息"
                     }
                 }
             ]

+ 3 - 0
src/plant/base/base-detail/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <view>页面内容</view>
+</template>

+ 3 - 0
src/plant/base/base-edit/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <view>页面内容</view>
+</template>

+ 3 - 0
src/plant/base/base-list/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <view>页面内容</view>
+</template>

+ 3 - 0
src/plant/base/base-map/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <view>页面内容</view>
+</template>

+ 3 - 0
src/plant/base/gap-base-info-edit/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <view>页面内容</view>
+</template>

+ 3 - 0
src/plant/base/gap-base-info/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <view>页面内容</view>
+</template>

+ 0 - 10
src/plant/index/index.vue

@@ -1,10 +0,0 @@
-<template>
-    <view class="c-primary">种植端</view>
-</template>
-<script setup lang="ts">
-import { useClientRequest } from '@/utils/request';
-setTimeout(() => {
-    useClientRequest.get('/time');
-}, 2000);
-</script>
-<style></style>

+ 0 - 29
src/utils/request.ts

@@ -1,35 +1,6 @@
 // uniapp封装的请求方法
 let timeout = 60 * 1000;
 
-// 获取当前应该使用的 base URL
-const getBaseUrl = (): string => {
-    try {
-        // 获取当前页面栈
-        const pages = getCurrentPages();
-        if (pages.length === 0) {
-            // 默认使用 VITE_API_BASE_URL
-            return import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000';
-        }
-        // 获取当前页面路由
-        const currentPage = pages[pages.length - 1];
-        const route = currentPage.route || '';
-        console.log(route, 'route');
-
-        // 判断路由路径
-        if (route.includes('plant/')) {
-            return import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000';
-        } else if (route.includes('production/')) {
-            return import.meta.env.VITE_API_OTHER_BASE_URL || 'http://localhost:3000';
-        }
-
-        // 默认情况
-        return import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000';
-    } catch (error) {
-        // 出错时使用默认值
-        return import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000';
-    }
-};
-
 // 获取全局请求头方法
 const getHeader = () => {
     let header = {

File diff suppressed because it is too large
+ 0 - 1
stats.html


Some files were not shown because too many files changed in this diff