Преглед изворни кода

将 admin-mp 重构为 admin-h5,运营平台移动端改用 H5 方式运行

- 目录重命名:admin-mp → admin-h5
- manifest.json:移除 mp-weixin / app-plus / quickapp 配置,仅保留 h5
- pages.json:取消自定义 tabBar,启用 uni-app 标准 H5 tabBar
- 移除 custom-tab-bar 组件(小程序专属)
- package.json 及 .gitignore 路径同步更新

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline пре 1 дан
родитељ
комит
3f04261af8
53 измењених фајлова са 54 додато и 228 уклоњено
  1. 2 2
      .gitignore
  2. 0 0
      admin-h5/.claude/settings.local.json
  3. 0 0
      admin-h5/index.html
  4. 0 0
      admin-h5/package-lock.json
  5. 2 2
      admin-h5/package.json
  6. 0 0
      admin-h5/src/App.vue
  7. 0 0
      admin-h5/src/api/auth.js
  8. 0 0
      admin-h5/src/api/device.js
  9. 0 0
      admin-h5/src/api/dict.js
  10. 0 0
      admin-h5/src/api/finance.js
  11. 0 0
      admin-h5/src/api/order.js
  12. 0 0
      admin-h5/src/api/rate.js
  13. 0 0
      admin-h5/src/api/stat.js
  14. 0 0
      admin-h5/src/api/station.js
  15. 0 0
      admin-h5/src/api/system.js
  16. 0 0
      admin-h5/src/api/user.js
  17. 0 0
      admin-h5/src/components/AppIcon.vue
  18. 0 0
      admin-h5/src/components/NavBar.vue
  19. 0 0
      admin-h5/src/components/dict-label/index.vue
  20. 0 0
      admin-h5/src/components/dict-select/index.vue
  21. 0 0
      admin-h5/src/main.js
  22. 50 0
      admin-h5/src/manifest.json
  23. 0 1
      admin-h5/src/pages.json
  24. 0 0
      admin-h5/src/pages/device/detail.vue
  25. 0 0
      admin-h5/src/pages/device/list.vue
  26. 0 0
      admin-h5/src/pages/finance/index.vue
  27. 0 0
      admin-h5/src/pages/finance/refund.vue
  28. 0 0
      admin-h5/src/pages/finance/settlement.vue
  29. 0 0
      admin-h5/src/pages/finance/split-record.vue
  30. 0 0
      admin-h5/src/pages/finance/withdraw.vue
  31. 0 0
      admin-h5/src/pages/index/index.vue
  32. 0 0
      admin-h5/src/pages/login/login.vue
  33. 0 0
      admin-h5/src/pages/order/detail.vue
  34. 0 0
      admin-h5/src/pages/order/list.vue
  35. 0 0
      admin-h5/src/pages/setting/device-binding.vue
  36. 0 0
      admin-h5/src/pages/setting/device-config-detail.vue
  37. 0 0
      admin-h5/src/pages/setting/device-config.vue
  38. 0 0
      admin-h5/src/pages/setting/index.vue
  39. 0 0
      admin-h5/src/pages/setting/rate-config-detail.vue
  40. 0 0
      admin-h5/src/pages/setting/rate-config.vue
  41. 0 0
      admin-h5/src/pages/station/detail.vue
  42. 0 0
      admin-h5/src/pages/station/list.vue
  43. 0 0
      admin-h5/src/pages/system/dict.vue
  44. 0 0
      admin-h5/src/pages/system/feedback.vue
  45. 0 0
      admin-h5/src/pages/system/log.vue
  46. 0 0
      admin-h5/src/pages/system/notice.vue
  47. 0 0
      admin-h5/src/pages/user/list.vue
  48. 0 0
      admin-h5/src/uni.scss
  49. 0 0
      admin-h5/src/utils/dict.js
  50. 0 0
      admin-h5/src/utils/index.js
  51. 0 0
      admin-h5/vite.config.js
  52. 0 113
      admin-mp/src/custom-tab-bar/index.vue
  53. 0 110
      admin-mp/src/manifest.json

+ 2 - 2
.gitignore

@@ -34,6 +34,6 @@ build/
 file_storage/
 logs/
 car-wash-admin/src/main/resources/static/
-admin-mp/node_modules/
-admin-mp/dist/
+admin-h5/node_modules/
+admin-h5/dist/
 .qoder/

+ 0 - 0
admin-mp/.claude/settings.local.json → admin-h5/.claude/settings.local.json


+ 0 - 0
admin-mp/index.html → admin-h5/index.html


+ 0 - 0
admin-mp/package-lock.json → admin-h5/package-lock.json


+ 2 - 2
admin-mp/package.json → admin-h5/package.json

@@ -1,5 +1,5 @@
 {
-  "name": "admin-app",
+  "name": "admin-h5",
   "version": "1.0.0",
   "description": "自助洗车运营管理H5",
   "main": "main.js",
@@ -40,7 +40,7 @@
     "vue-tsc": "^1.0.24"
   },
   "uni-app": {
-    "id": "admin-app",
+    "id": "admin-h5",
     "name": "自助洗车运营管理",
     "versionName": "1.0.0",
     "versionCode": "100",

+ 0 - 0
admin-mp/src/App.vue → admin-h5/src/App.vue


+ 0 - 0
admin-mp/src/api/auth.js → admin-h5/src/api/auth.js


+ 0 - 0
admin-mp/src/api/device.js → admin-h5/src/api/device.js


+ 0 - 0
admin-mp/src/api/dict.js → admin-h5/src/api/dict.js


+ 0 - 0
admin-mp/src/api/finance.js → admin-h5/src/api/finance.js


+ 0 - 0
admin-mp/src/api/order.js → admin-h5/src/api/order.js


+ 0 - 0
admin-mp/src/api/rate.js → admin-h5/src/api/rate.js


+ 0 - 0
admin-mp/src/api/stat.js → admin-h5/src/api/stat.js


+ 0 - 0
admin-mp/src/api/station.js → admin-h5/src/api/station.js


+ 0 - 0
admin-mp/src/api/system.js → admin-h5/src/api/system.js


+ 0 - 0
admin-mp/src/api/user.js → admin-h5/src/api/user.js


+ 0 - 0
admin-mp/src/components/AppIcon.vue → admin-h5/src/components/AppIcon.vue


+ 0 - 0
admin-mp/src/components/NavBar.vue → admin-h5/src/components/NavBar.vue


+ 0 - 0
admin-mp/src/components/dict-label/index.vue → admin-h5/src/components/dict-label/index.vue


+ 0 - 0
admin-mp/src/components/dict-select/index.vue → admin-h5/src/components/dict-select/index.vue


+ 0 - 0
admin-mp/src/main.js → admin-h5/src/main.js


+ 50 - 0
admin-h5/src/manifest.json

@@ -0,0 +1,50 @@
+{
+    "name" : "自助洗车运营管理",
+    "appid" : "__UNI__14E0F2A",
+    "description" : "自助洗车运营管理H5",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : true,
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "h5" : {
+        "async" : {
+            "loading" : "AsyncLoading",
+            "error" : "AsyncError",
+            "delay" : 2000,
+            "timeout" : 10000
+        },
+        "usingComponents" : true,
+        "router" : {
+            "mode" : "hash",
+            "base" : "./"
+        },
+        "title" : "自助洗车运营管理",
+        "domain" : "",
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : false
+            }
+        },
+        "esnextModules" : [],
+        "postcss" : {
+            "autoprefixer" : {
+                "enable" : true,
+                "config" : {
+                    "browsers" : [ "Android >= 4.0", "iOS >= 8" ]
+                }
+            },
+            "pxtransform" : {
+                "enable" : true,
+                "config" : {}
+            },
+            "url" : {
+                "enable" : true,
+                "config" : {
+                    "limit" : 4096
+                }
+            }
+        }
+    }
+}

+ 0 - 1
admin-mp/src/pages.json → admin-h5/src/pages.json

@@ -164,7 +164,6 @@
     "backgroundColor": "#F5F7FA"
   },
   "tabBar": {
-    "custom": true,
     "color": "#999999",
     "selectedColor": "#C6171E",
     "backgroundColor": "#ffffff",

+ 0 - 0
admin-mp/src/pages/device/detail.vue → admin-h5/src/pages/device/detail.vue


+ 0 - 0
admin-mp/src/pages/device/list.vue → admin-h5/src/pages/device/list.vue


+ 0 - 0
admin-mp/src/pages/finance/index.vue → admin-h5/src/pages/finance/index.vue


+ 0 - 0
admin-mp/src/pages/finance/refund.vue → admin-h5/src/pages/finance/refund.vue


+ 0 - 0
admin-mp/src/pages/finance/settlement.vue → admin-h5/src/pages/finance/settlement.vue


+ 0 - 0
admin-mp/src/pages/finance/split-record.vue → admin-h5/src/pages/finance/split-record.vue


+ 0 - 0
admin-mp/src/pages/finance/withdraw.vue → admin-h5/src/pages/finance/withdraw.vue


+ 0 - 0
admin-mp/src/pages/index/index.vue → admin-h5/src/pages/index/index.vue


+ 0 - 0
admin-mp/src/pages/login/login.vue → admin-h5/src/pages/login/login.vue


+ 0 - 0
admin-mp/src/pages/order/detail.vue → admin-h5/src/pages/order/detail.vue


+ 0 - 0
admin-mp/src/pages/order/list.vue → admin-h5/src/pages/order/list.vue


+ 0 - 0
admin-mp/src/pages/setting/device-binding.vue → admin-h5/src/pages/setting/device-binding.vue


+ 0 - 0
admin-mp/src/pages/setting/device-config-detail.vue → admin-h5/src/pages/setting/device-config-detail.vue


+ 0 - 0
admin-mp/src/pages/setting/device-config.vue → admin-h5/src/pages/setting/device-config.vue


+ 0 - 0
admin-mp/src/pages/setting/index.vue → admin-h5/src/pages/setting/index.vue


+ 0 - 0
admin-mp/src/pages/setting/rate-config-detail.vue → admin-h5/src/pages/setting/rate-config-detail.vue


+ 0 - 0
admin-mp/src/pages/setting/rate-config.vue → admin-h5/src/pages/setting/rate-config.vue


+ 0 - 0
admin-mp/src/pages/station/detail.vue → admin-h5/src/pages/station/detail.vue


+ 0 - 0
admin-mp/src/pages/station/list.vue → admin-h5/src/pages/station/list.vue


+ 0 - 0
admin-mp/src/pages/system/dict.vue → admin-h5/src/pages/system/dict.vue


+ 0 - 0
admin-mp/src/pages/system/feedback.vue → admin-h5/src/pages/system/feedback.vue


+ 0 - 0
admin-mp/src/pages/system/log.vue → admin-h5/src/pages/system/log.vue


+ 0 - 0
admin-mp/src/pages/system/notice.vue → admin-h5/src/pages/system/notice.vue


+ 0 - 0
admin-mp/src/pages/user/list.vue → admin-h5/src/pages/user/list.vue


+ 0 - 0
admin-mp/src/uni.scss → admin-h5/src/uni.scss


+ 0 - 0
admin-mp/src/utils/dict.js → admin-h5/src/utils/dict.js


+ 0 - 0
admin-mp/src/utils/index.js → admin-h5/src/utils/index.js


+ 0 - 0
admin-mp/vite.config.js → admin-h5/vite.config.js


+ 0 - 113
admin-mp/src/custom-tab-bar/index.vue

@@ -1,113 +0,0 @@
-<template>
-  <view class="tab-bar">
-    <view
-      v-for="(tab, index) in tabs"
-      :key="index"
-      class="tab-item"
-      @click="switchTab(tab)"
-    >
-      <view class="tab-inner" :class="{ active: current === index }">
-        <AppIcon
-          :name="tab.icon"
-          :size="current === index ? 22 : 22"
-          :color="current === index ? activeColor : inactiveColor"
-        />
-        <text
-          class="tab-text"
-          :class="{ active: current === index }"
-        >{{ tab.text }}</text>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { ref, watch, onMounted } from 'vue'
-
-const props = defineProps({
-  selected: {
-    type: Number,
-    default: 0
-  }
-})
-
-const activeColor = '#C6171E'
-const inactiveColor = '#999999'
-
-const tabs = [
-  { pagePath: '/pages/index/index',   text: '首页', icon: 'home' },
-  { pagePath: '/pages/order/list',    text: '订单', icon: 'clipboard' },
-  { pagePath: '/pages/device/list',   text: '设备', icon: 'monitor' },
-  { pagePath: '/pages/finance/index', text: '财务', icon: 'dollar' },
-]
-
-const current = ref(props.selected)
-
-watch(() => props.selected, (val) => {
-  current.value = val
-})
-
-onMounted(() => {
-  const pages = getCurrentPages()
-  if (pages.length > 0) {
-    const route = '/' + pages[pages.length - 1].route
-    const idx = tabs.findIndex(t => t.pagePath === route)
-    if (idx !== -1) current.value = idx
-  }
-})
-
-const switchTab = (tab) => {
-  uni.switchTab({ url: tab.pagePath })
-}
-</script>
-
-<style scoped>
-.tab-bar {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  display: flex;
-  align-items: stretch;
-  background: #FFFFFF;
-  padding: 8rpx 12rpx;
-  padding-bottom: calc(8rpx + env(safe-area-inset-bottom));
-  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
-  border-top: 1px solid #F0F0F0;
-  z-index: 999;
-}
-
-.tab-item {
-  flex: 1;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.tab-inner {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  gap: 4rpx;
-  padding: 10rpx 24rpx;
-  border-radius: 20rpx;
-  transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
-}
-
-.tab-inner.active {
-  background: rgba(198, 23, 30, 0.08);
-}
-
-.tab-text {
-  font-size: 20rpx;
-  font-weight: 500;
-  color: #999999;
-  transition: color 0.25s;
-}
-
-.tab-text.active {
-  color: #C6171E;
-  font-weight: 600;
-}
-</style>

+ 0 - 110
admin-mp/src/manifest.json

@@ -1,110 +0,0 @@
-{
-    "name" : "自助洗车运营管理",
-    "appid" : "__UNI__14E0F2A",
-    "description" : "自助洗车运营管理H5",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : true,
-    "uniStatistics" : {
-        "enable" : false
-    },
-    "app-plus" : {
-        "usingComponents" : true,
-        "nvueStyleCompiler" : "uni-app",
-        "compilerVersion" : 3,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        }
-    },
-    "quickapp" : {
-        "usingComponents" : true
-    },
-    "mp-weixin" : {
-        "appid" : "wxd4011d630482655b",
-        "setting" : {
-            "urlCheck" : false,
-            "es6" : true,
-            "enhance" : true,
-            "postcss" : true,
-            "preloadBackgroundData" : false,
-            "minified" : true,
-            "newFeature" : true,
-            "coverView" : true,
-            "nodeModules" : false,
-            "autoAudits" : false,
-            "showShadowRootInWxmlPanel" : true,
-            "scopeDataCheck" : false,
-            "uglifyFileName" : true,
-            "checkInvalidKey" : true,
-            "checkSiteMap" : true,
-            "uploadWithSourceMap" : true,
-            "compileHotReLoad" : false,
-            "useMultiFrameRuntime" : true,
-            "useApiHook" : true,
-            "useApiHostProcess" : true,
-            "babelSetting" : {
-                "ignore" : [],
-                "disablePlugins" : [],
-                "outputPath" : ""
-            },
-            "enableEngineNative" : false,
-            "useIsolateContext" : true,
-            "userConfirmedBundleSwitch" : false,
-            "packNpmManually" : false,
-            "packNpmRelationList" : [],
-            "minifyWXSS" : true,
-            "minifyWXML" : true,
-            "showStatusBar" : true,
-            "logThreshold" : "warn",
-            "allowJsEval" : true
-        },
-        "usingComponents" : true,
-        "permission" : {
-            "scope.userLocation" : {
-                "desc" : "你的位置信息将用于小程序定位"
-            }
-        }
-    },
-    "h5" : {
-        "async" : {
-            "loading" : "AsyncLoading",
-            "error" : "AsyncError",
-            "delay" : 2000,
-            "timeout" : 10000
-        },
-        "usingComponents" : true,
-        "router" : {
-            "mode" : "hash",
-            "base" : "./"
-        },
-        "title" : "自助洗车运营管理",
-        "domain" : "",
-        "optimization" : {
-            "treeShaking" : {
-                "enable" : false
-            }
-        },
-        "esnextModules" : [],
-        "postcss" : {
-            " autoprefixer" : {
-                "enable" : true,
-                "config" : {
-                    "browsers" : [ "Android >= 4.0", "iOS >= 8" ]
-                }
-            },
-            "pxtransform" : {
-                "enable" : true,
-                "config" : {}
-            },
-            "url" : {
-                "enable" : true,
-                "config" : {
-                    "limit" : 4096
-                }
-            }
-        }
-    }
-}