Просмотр исходного кода

feat: 迁移页面配置并更新依赖包

- 移除 manifest.config.ts 中的物流插件配置
- 将 pages.config.ts 重命名为 pages.json.ts 并更新导入语句
- 替换 @uni-helper/vite-plugin-uni-pages 为 @uni-ku/pages-json
- 在 pages.json.ts 中添加物流插件到子包配置中
- 更新 src/config/index.ts 中的开发环境地址
- 移除 src/manifest.json 中的物流插件配置
- 更新 pnpm-lock.yaml 中的相关依赖版本
zhangtao 1 неделя назад
Родитель
Сommit
da23120fd4

+ 2 - 10
.husky/pre-commit

@@ -1,12 +1,4 @@
 #!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
 
-if [ "$SKIP_SIMPLE_GIT_HOOKS" = "1" ]; then
-    echo "[INFO] SKIP_SIMPLE_GIT_HOOKS is set to 1, skipping hook."
-    exit 0
-fi
-
-if [ -f "$SIMPLE_GIT_HOOKS_RC" ]; then
-    . "$SIMPLE_GIT_HOOKS_RC"
-fi
-
-pnpm lint-staged
+npx lint-staged --allow-empty --no-stash $1

+ 0 - 7
manifest.config.ts

@@ -71,13 +71,6 @@ export default defineManifestConfig({
     // componentFramework: 'glass-easel',
     // darkmode: false,
     // themeLocation: 'theme.json',
-    plugins: {
-      logisticsPlugin: {
-        version: '2.1.12',
-        provider: 'wx9ad912bf20548d92',
-      },
-    },
-
   },
   'mp-alipay': {
     usingComponents: true,

+ 2 - 2
package.json

@@ -108,9 +108,9 @@
     "@uni-helper/vite-plugin-uni-components": "^0.2.0",
     "@uni-helper/vite-plugin-uni-layouts": "^0.1.11",
     "@uni-helper/vite-plugin-uni-manifest": "^0.2.8",
-    "@uni-helper/vite-plugin-uni-pages": "^0.3.11",
     "@uni-helper/volar-service-uni-pages": "^0.3.11",
     "@uni-ku/bundle-optimizer": "1.3.15-beta.2",
+    "@uni-ku/pages-json": "^0.2.40",
     "@uni-ku/root": "^1.3.4",
     "@unocss/eslint-config": "^0.62.3",
     "@vue/runtime-core": "^3.4.38",
@@ -141,6 +141,6 @@
     "pre-commit": "pnpm lint-staged"
   },
   "lint-staged": {
-    "*": "eslint"
+    "*": "eslint --fix"
   }
 }

+ 61 - 0
pages.json.ts

@@ -0,0 +1,61 @@
+import { defineConfig } from '@uni-ku/pages-json'
+
+export default defineConfig({
+  pages: [
+
+  ],
+  globalStyle: {
+    // 导航栏配置
+    navigationBarBackgroundColor: '@navBgColor',
+    navigationBarTextStyle: '@navTxtStyle',
+    navigationBarTitleText: 'wot',
+
+    // 页面背景配置
+    backgroundColor: '@bgColor',
+    backgroundTextStyle: '@bgTxtStyle',
+    backgroundColorTop: '@bgColorTop',
+    backgroundColorBottom: '@bgColorBottom',
+
+    // 下拉刷新配置
+    enablePullDownRefresh: false,
+    onReachBottomDistance: 50,
+
+    // 动画配置
+    animationType: 'pop-in',
+    animationDuration: 300,
+  },
+
+  tabBar: {
+    custom: true,
+    // #ifdef MP-ALIPAY
+    customize: true,
+    // 暂时不生效。4.71.2025061206-alpha已修复:https://uniapp.dcloud.net.cn/release-note-alpha.html#_4-71-2025061206-alpha,我们等正式版发布后更新。
+    overlay: true,
+    // #endif
+    height: '0',
+    color: '@tabColor',
+    selectedColor: '@tabSelectedColor',
+    backgroundColor: '@tabBgColor',
+    borderStyle: '@tabBorderStyle',
+    list: [{
+      pagePath: 'pages/index/index',
+    }, {
+      pagePath: 'pages/classfiy/index',
+    }, {
+      pagePath: 'pages/cart/index',
+    }, {
+      pagePath: 'pages/my/index',
+    }],
+  },
+  subPackages: [
+    {
+      root: 'subPack-xsb',
+      plugins: {
+        logisticsPlugin: {
+          version: '2.1.12',
+          provider: 'wx9ad912bf20548d92',
+        },
+      },
+    },
+  ],
+})

+ 58 - 104
pnpm-lock.yaml

@@ -142,7 +142,7 @@ importers:
         version: 1.0.0-alpha.6(@uni-helper/uni-app-types@1.0.0-alpha.3(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4)))(@uni-helper/uni-cloud-types@1.0.0-alpha.3(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4)))(@uni-helper/uni-ui-types@1.0.0-alpha.3(@uni-helper/uni-app-types@1.0.0-alpha.3(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4)))(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4)))(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4))
       '@uni-helper/unocss-preset-uni':
         specifier: ^0.2.11
-        version: 0.2.11(@unocss/preset-legacy-compat@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/rule-utils@0.62.3)(@unocss/vite@0.62.3(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))(unocss-applet@0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.17)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))))(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
+        version: 0.2.11(@unocss/preset-legacy-compat@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/rule-utils@0.62.3)(@unocss/vite@0.62.3(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))(unocss-applet@0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.21)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))))(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
       '@uni-helper/vite-plugin-uni-components':
         specifier: ^0.2.0
         version: 0.2.0(rollup@4.21.1)
@@ -152,15 +152,15 @@ importers:
       '@uni-helper/vite-plugin-uni-manifest':
         specifier: ^0.2.8
         version: 0.2.8(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
-      '@uni-helper/vite-plugin-uni-pages':
-        specifier: ^0.3.11
-        version: 0.3.11(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
       '@uni-helper/volar-service-uni-pages':
         specifier: ^0.3.11
         version: 0.3.11
       '@uni-ku/bundle-optimizer':
         specifier: 1.3.15-beta.2
         version: 1.3.15-beta.2(@vueuse/core@11.0.3(vue@3.4.38(typescript@5.5.4)))(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))(vue@3.4.38(typescript@5.5.4))
+      '@uni-ku/pages-json':
+        specifier: ^0.2.40
+        version: 0.2.40(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
       '@uni-ku/root':
         specifier: ^1.3.4
         version: 1.3.4(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
@@ -455,11 +455,6 @@ packages:
     engines: {node: '>=6.0.0'}
     hasBin: true
 
-  '@babel/parser@7.28.3':
-    resolution: {integrity: sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==}
-    engines: {node: '>=6.0.0'}
-    hasBin: true
-
   '@babel/parser@7.28.4':
     resolution: {integrity: sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==}
     engines: {node: '>=6.0.0'}
@@ -2029,6 +2024,9 @@ packages:
   '@jridgewell/sourcemap-codec@1.5.4':
     resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==}
 
+  '@jridgewell/sourcemap-codec@1.5.5':
+    resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
+
   '@jridgewell/trace-mapping@0.3.25':
     resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
 
@@ -2161,9 +2159,6 @@ packages:
   '@polka/url@1.0.0-next.25':
     resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==}
 
-  '@quansync/fs@0.1.5':
-    resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==}
-
   '@rollup/pluginutils@5.1.0':
     resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==}
     engines: {node: '>=14.0.0'}
@@ -2518,11 +2513,6 @@ packages:
     peerDependencies:
       vite: ^4.0.0 || ^5.0.0 || ^6.0.0
 
-  '@uni-helper/vite-plugin-uni-pages@0.3.11':
-    resolution: {integrity: sha512-LnMkZsNdItz950TX2PYomkvtYDW8lFOGfKmmAKpw2LUUD28VCnxP8E8+rzB5nLM0vyEQeMCzHe3z378R/h/snw==}
-    peerDependencies:
-      vite: ^5.0.0
-
   '@uni-helper/volar-service-uni-pages@0.3.11':
     resolution: {integrity: sha512-5Xp/sY+Y07fV3CqrU7xTwVhZ4ipzN9CgzjQgST1cycQOHx9A9JNKjrJDSHaxTu6sxZGHV2LlHQHAWOv0Ag1SUg==}
     peerDependencies:
@@ -2536,6 +2526,11 @@ packages:
     peerDependencies:
       vite: ^4.0.0 || ^5.0.0
 
+  '@uni-ku/pages-json@0.2.40':
+    resolution: {integrity: sha512-WelEEo2LDdjN/jDnqE+lUprI454l7j9HbBmToDRBrZCVbLhqjsxRmHpmVWL0x/pG36dv9mEgpF7VpUdCAidlzQ==}
+    peerDependencies:
+      vite: ^5.4.19
+
   '@uni-ku/root@1.3.4':
     resolution: {integrity: sha512-J9HoVoIeuxGhqysDZWSbXwTW9fdg73syTbwr1s/yMpk4cbniWdEMa7eAxgfpi+iQoIsXEGVmTDaqejdwGRLYaw==}
     peerDependencies:
@@ -3048,8 +3043,8 @@ packages:
     resolution: {integrity: sha512-qdwwKEhckRk0XE22/xDdmU3v/60E8Edu4qFhgTLIhGGDs/PAJwLw9pQn8Rj99PitlbBZbYpx0k/lbir4kg0SuA==}
     engines: {node: '>=16.14.0'}
 
-  ast-kit@1.4.3:
-    resolution: {integrity: sha512-MdJqjpodkS5J149zN0Po+HPshkTdUyrvF7CKTafUgv69vBSPtncrj+3IiUgqdd7ElIEkbeXCsEouBUwLrw9Ilg==}
+  ast-kit@0.12.2:
+    resolution: {integrity: sha512-es1zHFsnZ4Y4efz412nnrU3KvVAhgqy90a7Yt9Wpi5vQ3l4aYMOX0Qx4FD0elKr5ITEhiUGCSFcgGYf4YTuACg==}
     engines: {node: '>=16.14.0'}
 
   asynckit@0.4.0:
@@ -3397,8 +3392,8 @@ packages:
   commander@2.20.3:
     resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
 
-  comment-json@4.2.5:
-    resolution: {integrity: sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==}
+  comment-json@4.5.1:
+    resolution: {integrity: sha512-taEtr3ozUmOB7it68Jll7s0Pwm+aoiHyXKrEC8SEodL4rNpdfDLqa7PfBlrgFoCNNdR8ImL+muti5IGvktJAAg==}
     engines: {node: '>= 6'}
 
   comment-parser@1.4.1:
@@ -4542,10 +4537,6 @@ packages:
     resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
     engines: {node: '>=8'}
 
-  has-own-prop@2.0.0:
-    resolution: {integrity: sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==}
-    engines: {node: '>=8'}
-
   has-property-descriptors@1.0.2:
     resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}
 
@@ -5222,9 +5213,6 @@ packages:
   lodash.debounce@4.0.8:
     resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
 
-  lodash.groupby@4.6.0:
-    resolution: {integrity: sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==}
-
   lodash.ismatch@4.4.0:
     resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==}
 
@@ -5287,6 +5275,9 @@ packages:
   magic-string@0.30.17:
     resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}
 
+  magic-string@0.30.21:
+    resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
+
   make-dir@4.0.0:
     resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}
     engines: {node: '>=10'}
@@ -6002,9 +5993,6 @@ packages:
   quansync@0.2.10:
     resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==}
 
-  quansync@0.2.11:
-    resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==}
-
   querystringify@2.2.0:
     resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
 
@@ -6113,10 +6101,6 @@ packages:
     resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==}
     hasBin: true
 
-  repeat-string@1.6.1:
-    resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==}
-    engines: {node: '>=0.10'}
-
   request-light@0.5.8:
     resolution: {integrity: sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==}
 
@@ -6707,9 +6691,6 @@ packages:
   unconfig@0.5.5:
     resolution: {integrity: sha512-VQZ5PT9HDX+qag0XdgQi8tJepPhXiR/yVOkn707gJDKo31lGjRilPREiQJ9Z6zd/Ugpv6ZvO5VxVIcatldYcNQ==}
 
-  unconfig@7.3.3:
-    resolution: {integrity: sha512-QCkQoOnJF8L107gxfHL0uavn7WD9b3dpBcFX6HtfQYmjw2YzWxGuFQ0N0J6tE9oguCBJn9KOvfqYDCMPHIZrBA==}
-
   undici-types@6.19.8:
     resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
 
@@ -7351,8 +7332,8 @@ snapshots:
 
   '@babel/generator@7.28.3':
     dependencies:
-      '@babel/parser': 7.28.3
-      '@babel/types': 7.28.2
+      '@babel/parser': 7.28.4
+      '@babel/types': 7.28.4
       '@jridgewell/gen-mapping': 0.3.12
       '@jridgewell/trace-mapping': 0.3.29
       jsesc: 3.1.0
@@ -7418,7 +7399,7 @@ snapshots:
 
   '@babel/helper-module-imports@7.22.15':
     dependencies:
-      '@babel/types': 7.28.2
+      '@babel/types': 7.28.4
 
   '@babel/helper-module-imports@7.24.7':
     dependencies:
@@ -7519,10 +7500,6 @@ snapshots:
     dependencies:
       '@babel/types': 7.28.2
 
-  '@babel/parser@7.28.3':
-    dependencies:
-      '@babel/types': 7.28.2
-
   '@babel/parser@7.28.4':
     dependencies:
       '@babel/types': 7.28.4
@@ -8140,7 +8117,7 @@ snapshots:
     dependencies:
       '@babel/code-frame': 7.27.1
       '@babel/parser': 7.28.4
-      '@babel/types': 7.28.2
+      '@babel/types': 7.28.4
 
   '@babel/traverse@7.25.4':
     dependencies:
@@ -8157,10 +8134,10 @@ snapshots:
   '@babel/traverse@7.27.1':
     dependencies:
       '@babel/code-frame': 7.27.1
-      '@babel/generator': 7.27.1
+      '@babel/generator': 7.28.3
       '@babel/parser': 7.28.4
       '@babel/template': 7.27.2
-      '@babel/types': 7.28.2
+      '@babel/types': 7.28.4
       debug: 4.4.1
       globals: 11.12.0
     transitivePeerDependencies:
@@ -9960,6 +9937,8 @@ snapshots:
 
   '@jridgewell/sourcemap-codec@1.5.4': {}
 
+  '@jridgewell/sourcemap-codec@1.5.5': {}
+
   '@jridgewell/trace-mapping@0.3.25':
     dependencies:
       '@jridgewell/resolve-uri': 3.1.2
@@ -10065,10 +10044,6 @@ snapshots:
 
   '@polka/url@1.0.0-next.25': {}
 
-  '@quansync/fs@0.1.5':
-    dependencies:
-      quansync: 0.2.11
-
   '@rollup/pluginutils@5.1.0(rollup@4.21.1)':
     dependencies:
       '@types/estree': 1.0.5
@@ -10411,13 +10386,13 @@ snapshots:
       typescript: 5.5.4
       vue: 3.4.38(typescript@5.5.4)
 
-  '@uni-helper/unocss-preset-uni@0.2.11(@unocss/preset-legacy-compat@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/rule-utils@0.62.3)(@unocss/vite@0.62.3(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))(unocss-applet@0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.17)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))))(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))':
+  '@uni-helper/unocss-preset-uni@0.2.11(@unocss/preset-legacy-compat@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/rule-utils@0.62.3)(@unocss/vite@0.62.3(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))(unocss-applet@0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.21)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))))(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))':
     dependencies:
       '@uni-helper/uni-env': 0.1.7
       '@unocss/preset-legacy-compat': 66.4.2
       '@unocss/rule-utils': 0.62.3
       unocss: 0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
-      unocss-applet: 0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.17)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
+      unocss-applet: 0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.21)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
     optionalDependencies:
       '@unocss/preset-mini': 0.62.3
       '@unocss/vite': 0.62.3(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
@@ -10461,30 +10436,6 @@ snapshots:
     transitivePeerDependencies:
       - magicast
 
-  '@uni-helper/vite-plugin-uni-pages@0.3.11(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))':
-    dependencies:
-      '@babel/generator': 7.28.3
-      '@babel/types': 7.28.2
-      '@uni-helper/uni-env': 0.1.7
-      '@vue/compiler-sfc': 3.4.21
-      ast-kit: 1.4.3
-      chokidar: 3.6.0
-      comment-json: 4.2.5
-      debug: 4.4.1
-      detect-indent: 6.1.0
-      detect-newline: 3.1.0
-      fast-glob: 3.3.3
-      json5: 2.2.3
-      kolorist: 1.8.0
-      lodash.groupby: 4.6.0
-      magic-string: 0.30.17
-      typescript: 5.9.2
-      unconfig: 7.3.3
-      vite: 5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)
-      yaml: 2.8.1
-    transitivePeerDependencies:
-      - supports-color
-
   '@uni-helper/volar-service-uni-pages@0.3.11':
     dependencies:
       '@uni-helper/pages-json-schema': 0.3.11
@@ -10509,6 +10460,22 @@ snapshots:
       - ts-node
       - vue
 
+  '@uni-ku/pages-json@0.2.40(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))':
+    dependencies:
+      '@babel/generator': 7.28.3
+      '@babel/types': 7.28.4
+      '@vue/compiler-sfc': 3.4.21
+      ast-kit: 0.12.2
+      chokidar: 3.6.0
+      comment-json: 4.5.1
+      debug: 4.4.1
+      fast-glob: 3.3.3
+      magic-string: 0.30.21
+      typescript: 5.9.2
+      vite: 5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)
+    transitivePeerDependencies:
+      - supports-color
+
   '@uni-ku/root@1.3.4(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))':
     dependencies:
       '@vue/compiler-sfc': 3.4.21
@@ -10528,11 +10495,11 @@ snapshots:
     dependencies:
       unocss: 0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
 
-  '@unocss-applet/transformer-attributify@0.8.2(magic-string@0.30.17)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))':
+  '@unocss-applet/transformer-attributify@0.8.2(magic-string@0.30.21)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))':
     dependencies:
       unocss: 0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
     optionalDependencies:
-      magic-string: 0.30.17
+      magic-string: 0.30.21
 
   '@unocss/astro@0.62.3(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))':
     dependencies:
@@ -10890,13 +10857,13 @@ snapshots:
 
   '@vue/compiler-sfc@3.4.21':
     dependencies:
-      '@babel/parser': 7.28.3
+      '@babel/parser': 7.28.4
       '@vue/compiler-core': 3.4.21
       '@vue/compiler-dom': 3.4.21
       '@vue/compiler-ssr': 3.4.21
       '@vue/shared': 3.4.21
       estree-walker: 2.0.2
-      magic-string: 0.30.17
+      magic-string: 0.30.21
       postcss: 8.4.41
       source-map-js: 1.2.0
 
@@ -11118,10 +11085,10 @@ snapshots:
     transitivePeerDependencies:
       - rollup
 
-  ast-kit@1.4.3:
+  ast-kit@0.12.2:
     dependencies:
       '@babel/parser': 7.28.4
-      pathe: 2.0.3
+      pathe: 1.1.2
 
   asynckit@0.4.0: {}
 
@@ -11509,13 +11476,11 @@ snapshots:
 
   commander@2.20.3: {}
 
-  comment-json@4.2.5:
+  comment-json@4.5.1:
     dependencies:
       array-timsort: 1.0.3
       core-util-is: 1.0.3
       esprima: 4.0.1
-      has-own-prop: 2.0.0
-      repeat-string: 1.6.1
 
   comment-parser@1.4.1: {}
 
@@ -12871,8 +12836,6 @@ snapshots:
 
   has-flag@4.0.0: {}
 
-  has-own-prop@2.0.0: {}
-
   has-property-descriptors@1.0.2:
     dependencies:
       es-define-property: 1.0.0
@@ -13750,8 +13713,6 @@ snapshots:
 
   lodash.debounce@4.0.8: {}
 
-  lodash.groupby@4.6.0: {}
-
   lodash.ismatch@4.4.0: {}
 
   lodash.isplainobject@4.0.6: {}
@@ -13807,6 +13768,10 @@ snapshots:
     dependencies:
       '@jridgewell/sourcemap-codec': 1.5.4
 
+  magic-string@0.30.21:
+    dependencies:
+      '@jridgewell/sourcemap-codec': 1.5.5
+
   make-dir@4.0.0:
     dependencies:
       semver: 7.7.2
@@ -14474,8 +14439,6 @@ snapshots:
 
   quansync@0.2.10: {}
 
-  quansync@0.2.11: {}
-
   querystringify@2.2.0: {}
 
   queue-microtask@1.2.3: {}
@@ -14599,8 +14562,6 @@ snapshots:
     dependencies:
       jsesc: 0.5.0
 
-  repeat-string@1.6.1: {}
-
   request-light@0.5.8: {}
 
   require-directory@2.1.1: {}
@@ -15213,13 +15174,6 @@ snapshots:
     transitivePeerDependencies:
       - supports-color
 
-  unconfig@7.3.3:
-    dependencies:
-      '@quansync/fs': 0.1.5
-      defu: 6.1.4
-      jiti: 2.5.1
-      quansync: 0.2.11
-
   undici-types@6.19.8: {}
 
   undici-types@6.21.0: {}
@@ -15282,11 +15236,11 @@ snapshots:
 
   universalify@2.0.1: {}
 
-  unocss-applet@0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.17)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))):
+  unocss-applet@0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(magic-string@0.30.21)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))):
     dependencies:
       '@unocss-applet/preset-applet': 0.8.2(@unocss/core@66.4.2)(@unocss/preset-mini@0.62.3)(@unocss/preset-uno@0.62.3)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
       '@unocss-applet/preset-rem-rpx': 0.8.2(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
-      '@unocss-applet/transformer-attributify': 0.8.2(magic-string@0.30.17)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
+      '@unocss-applet/transformer-attributify': 0.8.2(magic-string@0.30.21)(unocss@0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6)))
       unocss: 0.62.3(postcss@8.4.41)(rollup@4.21.1)(vite@5.2.8(@types/node@20.16.2)(sass@1.78.0)(terser@5.31.6))
     optionalDependencies:
       '@unocss/preset-uno': 0.62.3

+ 2 - 2
src/config/index.ts

@@ -6,11 +6,11 @@ const mapEnvVersion = {
   // develop: 'http://192.168.1.101:8080',
   // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
-  develop: 'http://192.168.0.19:8080',
+  // develop: 'http://192.168.0.19:8080',
   // develop: 'http://192.168.0.217:8080',
   // develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://47.109.84.152:8081',
-  // develop: 'https://smqjh.api.zswlgz.com',
+  develop: 'https://smqjh.api.zswlgz.com',
   /**
    * 体验版
    */

+ 1 - 7
src/manifest.json

@@ -64,13 +64,7 @@
       "wxbc64403830bb13c5",
       "wx9894a01b9e92c368"
     ],
-    "lazyCodeLoading": "requiredComponents",
-    "plugins": {
-      "logisticsPlugin": {
-        "version": "2.1.12",
-        "provider": "wx9ad912bf20548d92"
-      }
-    }
+    "lazyCodeLoading": "requiredComponents"
   },
   "mp-alipay": {
     "usingComponents": true,

+ 18 - 45
src/pages.json

@@ -1,21 +1,7 @@
 {
   "pages": [
-    {
-      "path": "pages/index/index",
-      "type": "home",
-      "name": "smqjh-home",
-      "layout": "tabbar",
-      "islogin": false,
-      "style": {
-        "navigationBarTitleText": "首页",
-        "navigationStyle": "custom",
-        "backgroundColor": "#9ED605",
-        "backgroundColorTop": "#9ED605"
-      }
-    },
     {
       "path": "pages/cart/index",
-      "type": "page",
       "name": "smqjh-cart",
       "layout": "tabbar",
       "islogin": false,
@@ -27,7 +13,6 @@
     },
     {
       "path": "pages/classfiy/index",
-      "type": "page",
       "name": "smqjh-classfiy",
       "layout": "tabbar",
       "islogin": false,
@@ -37,9 +22,20 @@
         "disableScroll": true
       }
     },
+    {
+      "path": "pages/index/index",
+      "name": "smqjh-home",
+      "layout": "tabbar",
+      "islogin": false,
+      "style": {
+        "navigationBarTitleText": "首页",
+        "navigationStyle": "custom",
+        "backgroundColor": "#9ED605",
+        "backgroundColorTop": "#9ED605"
+      }
+    },
     {
       "path": "pages/login/index",
-      "type": "page",
       "name": "smqjh-login",
       "islogin": false,
       "style": {
@@ -48,7 +44,6 @@
     },
     {
       "path": "pages/my/index",
-      "type": "page",
       "name": "smqjh-my",
       "layout": "tabbar",
       "islogin": false,
@@ -99,10 +94,15 @@
   "subPackages": [
     {
       "root": "subPack-xsb",
+      "plugins": {
+        "logisticsPlugin": {
+          "version": "2.1.12",
+          "provider": "wx9ad912bf20548d92"
+        }
+      },
       "pages": [
         {
           "path": "commonTab/index",
-          "type": "page",
           "name": "xsb-homeTabbar",
           "islogin": false,
           "style": {
@@ -114,7 +114,6 @@
         },
         {
           "path": "confirmOrder/index",
-          "type": "page",
           "name": "xsb-confirmOrder",
           "islogin": true,
           "style": {
@@ -123,7 +122,6 @@
         },
         {
           "path": "goods/index",
-          "type": "page",
           "name": "xsb-goods",
           "islogin": false,
           "style": {
@@ -133,7 +131,6 @@
         },
         {
           "path": "order/index",
-          "type": "page",
           "name": "xsb-order",
           "islogin": true,
           "style": {
@@ -142,7 +139,6 @@
         },
         {
           "path": "orderDetaile/index",
-          "type": "page",
           "name": "xsb-orderDetaile",
           "islogin": true,
           "style": {
@@ -152,7 +148,6 @@
         },
         {
           "path": "search/index",
-          "type": "page",
           "name": "xsb-search",
           "islogin": false,
           "style": {
@@ -161,7 +156,6 @@
         },
         {
           "path": "selectAddress/index",
-          "type": "page",
           "name": "xsb-selectAddress",
           "islogin": false,
           "style": {
@@ -175,7 +169,6 @@
       "pages": [
         {
           "path": "addressList/index",
-          "type": "page",
           "name": "common-addressList",
           "islogin": true,
           "style": {
@@ -184,7 +177,6 @@
         },
         {
           "path": "afterSales/index",
-          "type": "page",
           "name": "common-afterSales",
           "islogin": true,
           "style": {
@@ -193,7 +185,6 @@
         },
         {
           "path": "afterSalesDetail/index",
-          "type": "page",
           "name": "common-afterSalesDetail",
           "islogin": true,
           "style": {
@@ -202,7 +193,6 @@
         },
         {
           "path": "afterSalesList/index",
-          "type": "page",
           "name": "common-afterSalesList",
           "islogin": true,
           "style": {
@@ -211,7 +201,6 @@
         },
         {
           "path": "editAddress/index",
-          "type": "page",
           "name": "common-editAddress",
           "islogin": true,
           "style": {
@@ -221,7 +210,6 @@
         },
         {
           "path": "integral/index",
-          "type": "page",
           "name": "common-integral",
           "islogin": true,
           "style": {
@@ -231,7 +219,6 @@
         },
         {
           "path": "nickName/index",
-          "type": "page",
           "name": "common-nickName",
           "islogin": true,
           "style": {
@@ -240,7 +227,6 @@
         },
         {
           "path": "payError/index",
-          "type": "page",
           "name": "common-payError",
           "islogin": true,
           "style": {
@@ -251,7 +237,6 @@
         },
         {
           "path": "paySuccess/index",
-          "type": "page",
           "name": "common-paySuccess",
           "islogin": true,
           "style": {
@@ -262,7 +247,6 @@
         },
         {
           "path": "revalue/index",
-          "type": "page",
           "name": "common-revalue",
           "islogin": true,
           "style": {
@@ -273,7 +257,6 @@
         },
         {
           "path": "revalueSuccess/index",
-          "type": "page",
           "name": "common-revalue-success",
           "islogin": true,
           "style": {
@@ -284,7 +267,6 @@
         },
         {
           "path": "user-center/index",
-          "type": "page",
           "name": "common-user-center",
           "islogin": true,
           "style": {
@@ -298,7 +280,6 @@
       "pages": [
         {
           "path": "order/index",
-          "type": "page",
           "name": "smqjh-order",
           "islogin": true,
           "style": {
@@ -312,7 +293,6 @@
       "pages": [
         {
           "path": "chargeDetail/chargeDetail",
-          "type": "page",
           "name": "charge-detail",
           "islogin": false,
           "style": {
@@ -322,7 +302,6 @@
         },
         {
           "path": "chargeing/chargeing",
-          "type": "page",
           "name": "chargeing",
           "islogin": true,
           "style": {
@@ -332,7 +311,6 @@
         },
         {
           "path": "chargeMap/chargeMap",
-          "type": "page",
           "name": "charge-map",
           "islogin": false,
           "style": {
@@ -342,7 +320,6 @@
         },
         {
           "path": "chargeOrderDetail/chargeOrderDetail",
-          "type": "page",
           "name": "charge-order-detail",
           "islogin": true,
           "style": {
@@ -352,7 +329,6 @@
         },
         {
           "path": "chargeSearchList/chargeSearchList",
-          "type": "page",
           "name": "cahrge-search-list",
           "islogin": false,
           "style": {
@@ -362,7 +338,6 @@
         },
         {
           "path": "chargeSiteDetail/chargeSiteDetail",
-          "type": "page",
           "name": "charge-site-detail",
           "islogin": true,
           "style": {
@@ -372,7 +347,6 @@
         },
         {
           "path": "chargeStart/chargeStart",
-          "type": "page",
           "name": "charge-start",
           "islogin": true,
           "style": {
@@ -382,7 +356,6 @@
         },
         {
           "path": "index/index",
-          "type": "page",
           "name": "charge-index",
           "islogin": false,
           "style": {

+ 12 - 6
src/router/index.ts

@@ -1,13 +1,19 @@
-/// <reference types="@uni-helper/vite-plugin-uni-pages/client" />
-import { pages, subPackages } from 'virtual:uni-pages'
+import pagesJson from 'virtual:pages-json'
+import type { Page } from '@uni-ku/pages-json/types'
 
+interface cousPage extends Page {
+  islogin: boolean
+  name?: string
+}
 function generateRoutes() {
-  const routes = pages.map((page) => {
+  if (!pagesJson.pages)
+    return []
+  const routes = pagesJson.pages.map((page) => {
     const newPath = `/${page.path}`
     return { ...page, path: newPath }
-  })
-  if (subPackages && subPackages.length > 0) {
-    subPackages.forEach((subPackage) => {
+  }) as cousPage[]
+  if (pagesJson.subPackages && pagesJson.subPackages.length > 0) {
+    pagesJson.subPackages.forEach((subPackage) => {
       const subRoutes = subPackage.pages.map((page: any) => {
         const newPath = `/${subPackage.root}/${page.path}`
         return { ...page, path: newPath }

+ 1 - 1
src/store/manualThemeStore.ts

@@ -1,5 +1,5 @@
-import type { ThemeColorOption, ThemeMode, ThemeState } from '@/composables/types/theme'
 import { defineStore } from 'pinia'
+import type { ThemeColorOption, ThemeMode, ThemeState } from '@/composables/types/theme'
 import { themeColorOptions } from '@/composables/types/theme'
 
 /**

+ 1 - 9
src/subPack-xsb/commonTab/components/cart.vue

@@ -4,15 +4,7 @@ import router from '@/router'
 import { useSmqjhCartStore } from '@/store/cart'
 
 const emit = defineEmits(['changeTab'])
-definePage({
-  name: 'xsb-cart',
-  islogin: false,
-  style: {
-    navigationStyle: 'custom',
-    navigationBarTitleText: '星闪豹购物车',
-    disableScroll: true,
-  },
-})
+
 const { cartList, isCartAllChecked, totalProduct } = storeToRefs(useSmqjhCartStore())
 const cartStore = useSmqjhCartStore()
 

+ 1 - 9
src/subPack-xsb/commonTab/components/classfiy.vue

@@ -21,15 +21,7 @@ const selectSkuId = ref(0)
 const SelectGoodsNum = ref(1)
 const goodsInTo = ref()
 const goodsInfo = ref<Api.xsbCategoryProductList | Api.xsbProductDetail | undefined>()
-definePage({
-  name: 'xsb-classfiy',
-  islogin: false,
-  style: {
-    navigationStyle: 'custom',
-    navigationBarTitleText: '星闪豹分类',
-    disableScroll: true,
-  },
-})
+
 const isTopLoading = ref(false)
 const cartPopup = ref(false)
 const basllObj = ref({

+ 1 - 10
src/subPack-xsb/commonTab/components/my.vue

@@ -2,15 +2,6 @@
 import { StaticUrl } from '@/config'
 import router from '@/router'
 
-definePage({
-  name: 'xsb-my',
-  islogin: false,
-  style: {
-    navigationStyle: 'custom',
-    navigationBarTitleText: '星闪豹我的',
-    disableScroll: true,
-  },
-})
 const tabList = ref([
   { title: '待支付', icon: `${StaticUrl}/1.png`, name: 'xsb-order' },
   { title: '待收货', icon: `${StaticUrl}/2.png`, name: 'xsb-order' },
@@ -30,7 +21,7 @@ function handleGo(item: { name: string }) {
 </script>
 
 <template>
-  <view class="page-class page-xsb bg-#F9F9F9 dark:bg-[var(--wot-dark-background)]">
+  <view class="page-xsb page-class bg-#F9F9F9 dark:bg-[var(--wot-dark-background)]">
     <wd-navbar
       title="个人中心" custom-style="background-color: transparent !important;" :bordered="false"
       safe-area-inset-top fixed :z-index="99"

+ 34 - 42
src/uni-pages.d.ts

@@ -1,50 +1,46 @@
 /* eslint-disable */
 /* prettier-ignore */
 // @ts-nocheck
-// Generated by vite-plugin-uni-pages
-
-type _LocationUrl =
-  "/pages/index/index" |
-  "/pages/cart/index" |
-  "/pages/classfiy/index" |
-  "/pages/login/index" |
-  "/pages/my/index" |
-  "/subPack-xsb/commonTab/index" |
-  "/subPack-xsb/confirmOrder/index" |
-  "/subPack-xsb/goods/index" |
-  "/subPack-xsb/order/index" |
-  "/subPack-xsb/orderDetaile/index" |
-  "/subPack-xsb/search/index" |
-  "/subPack-xsb/selectAddress/index" |
-  "/subPack-common/addressList/index" |
-  "/subPack-common/afterSales/index" |
-  "/subPack-common/afterSalesDetail/index" |
-  "/subPack-common/afterSalesList/index" |
-  "/subPack-common/editAddress/index" |
-  "/subPack-common/integral/index" |
-  "/subPack-common/nickName/index" |
-  "/subPack-common/payError/index" |
-  "/subPack-common/paySuccess/index" |
-  "/subPack-common/revalue/index" |
-  "/subPack-common/revalueSuccess/index" |
-  "/subPack-common/user-center/index" |
-  "/subPack-smqjh/order/index" |
-  "/subPack-charge/chargeDetail/chargeDetail" |
-  "/subPack-charge/chargeing/chargeing" |
-  "/subPack-charge/chargeMap/chargeMap" |
-  "/subPack-charge/chargeOrderDetail/chargeOrderDetail" |
-  "/subPack-charge/chargeSearchList/chargeSearchList" |
-  "/subPack-charge/chargeSiteDetail/chargeSiteDetail" |
-  "/subPack-charge/chargeStart/chargeStart" |
-  "/subPack-charge/index/index";
+// Generated by @uni-ku/pages-json
 
 interface NavigateToOptions {
-  url: _LocationUrl;
+  url: "/pages/login/index" |
+       "/subPack-xsb/commonTab/index" |
+       "/subPack-xsb/confirmOrder/index" |
+       "/subPack-xsb/goods/index" |
+       "/subPack-xsb/order/index" |
+       "/subPack-xsb/orderDetaile/index" |
+       "/subPack-xsb/search/index" |
+       "/subPack-xsb/selectAddress/index" |
+       "/subPack-common/addressList/index" |
+       "/subPack-common/afterSales/index" |
+       "/subPack-common/afterSalesDetail/index" |
+       "/subPack-common/afterSalesList/index" |
+       "/subPack-common/editAddress/index" |
+       "/subPack-common/integral/index" |
+       "/subPack-common/nickName/index" |
+       "/subPack-common/payError/index" |
+       "/subPack-common/paySuccess/index" |
+       "/subPack-common/revalue/index" |
+       "/subPack-common/revalueSuccess/index" |
+       "/subPack-common/user-center/index" |
+       "/subPack-smqjh/order/index" |
+       "/subPack-charge/chargeDetail/chargeDetail" |
+       "/subPack-charge/chargeing/chargeing" |
+       "/subPack-charge/chargeMap/chargeMap" |
+       "/subPack-charge/chargeOrderDetail/chargeOrderDetail" |
+       "/subPack-charge/chargeSearchList/chargeSearchList" |
+       "/subPack-charge/chargeSiteDetail/chargeSiteDetail" |
+       "/subPack-charge/chargeStart/chargeStart" |
+       "/subPack-charge/index/index";
 }
 interface RedirectToOptions extends NavigateToOptions {}
 
 interface SwitchTabOptions {
-  url: "/pages/index/index" | "/pages/classfiy/index" | "/pages/cart/index" | "/pages/my/index"
+  url: "/pages/index/index" |
+       "/pages/classfiy/index" |
+       "/pages/cart/index" |
+       "/pages/my/index";
 }
 
 type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;
@@ -55,7 +51,3 @@ declare interface Uni {
   switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
   reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
 }
-
-declare module "virtual:uni-pages" {
-  export type LocationUrl = _LocationUrl;
-}

+ 2 - 1
tsconfig.json

@@ -11,7 +11,8 @@
       "@mini-types/alipay",
       "miniprogram-api-typings",
       "@uni-helper/uni-types",
-      "wot-design-uni/global"
+      "wot-design-uni/global",
+      "@uni-ku/pages-json/client"
     ],
     "sourceMap": true
   },

+ 10 - 7
vite.config.ts

@@ -4,10 +4,11 @@ import UniHelperComponents from '@uni-helper/vite-plugin-uni-components'
 import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
 import UniHelperLayouts from '@uni-helper/vite-plugin-uni-layouts'
 import UniHelperManifest from '@uni-helper/vite-plugin-uni-manifest'
-import UniHelperPages from '@uni-helper/vite-plugin-uni-pages'
+import pagesJson from '@uni-ku/pages-json/vite'
 import Optimization from '@uni-ku/bundle-optimizer'
 import UniKuRoot from '@uni-ku/root'
 import AutoImport from 'unplugin-auto-import/vite'
+import { hookUniPlatform } from '@uni-ku/pages-json/hooks'
 import { defineConfig } from 'vite'
 // https://vitejs.dev/config/
 export default async () => {
@@ -21,19 +22,21 @@ export default async () => {
       // https://github.com/uni-helper/vite-plugin-uni-manifest
       UniHelperManifest(),
       // https://github.com/uni-helper/vite-plugin-uni-pages
-      UniHelperPages({
+      pagesJson({
         dts: 'src/uni-pages.d.ts',
-        subPackages: [
-          'src/subPack-xsb',
-          'src/subPack-common',
-          'src/subPack-smqjh',
-          'src/subPack-charge',
+        pageDir: 'pages',
+        subPackageDirs: [
+          'subPack-xsb',
+          'subPack-common',
+          'subPack-smqjh',
+          'subPack-charge',
         ],
         /**
          * 排除的页面,相对于 dir 和 subPackages
          * @default []
          */
         exclude: ['**/components/**/*.*'],
+        hooks: [hookUniPlatform],
       }),
       // https://github.com/uni-helper/vite-plugin-uni-layouts
       UniHelperLayouts(),