ソースを参照

```
feat: 集成Wot Design Uni组件库并配置页面路由

- 添加 @uni-helper/vite-plugin-uni-layouts 依赖并更新相关依赖版本
- 集成 wot-design-uni 组件库,自动生成组件类型声明
- 配置完整的页面路由结构,包括首页、购物车、分类、个人中心等主要页面
- 添加小程序分包配置,包含商品、订单、地址管理等功能模块
- 更新开发环境配置,启用页面布局插件支持
- 在个人中心页面移除测试二维码组件
```

zouzexu 1 週間 前
コミット
8864579f45
8 ファイル変更459 行追加74 行削除
  1. 1 1
      package.json
  2. 21 65
      pnpm-lock.yaml
  3. 39 0
      src/components.d.ts
  4. 2 2
      src/config/index.ts
  5. 330 2
      src/pages.json
  6. 0 1
      src/pages/my/index.vue
  7. 54 0
      src/uni-pages.d.ts
  8. 12 3
      vite.config.ts

+ 1 - 1
package.json

@@ -80,6 +80,7 @@
     "@dcloudio/uni-mp-weixin": "3.0.0-4060620250520001",
     "@dcloudio/uni-mp-xhs": "3.0.0-4060620250520001",
     "@dcloudio/uni-quickapp-webview": "3.0.0-4060620250520001",
+    "@uni-helper/vite-plugin-uni-layouts": "0.1.10",
     "@vueuse/core": "^11.0.3",
     "alova": "^3.3.4",
     "echarts": "^6.0.0",
@@ -108,7 +109,6 @@
     "@uni-helper/uni-types": "^1.0.0-alpha.6",
     "@uni-helper/unocss-preset-uni": "^0.2.11",
     "@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/volar-service-uni-pages": "^0.3.11",
     "@uni-ku/bundle-optimizer": "1.3.15-beta.2",

+ 21 - 65
pnpm-lock.yaml

@@ -70,6 +70,9 @@ importers:
       '@dcloudio/uni-quickapp-webview':
         specifier: 3.0.0-4060620250520001
         version: 3.0.0-4060620250520001(@vueuse/core@11.0.3(vue@3.4.38(typescript@5.5.4)))(postcss@8.4.41)(rollup@4.21.1)(vue@3.4.38(typescript@5.5.4))
+      '@uni-helper/vite-plugin-uni-layouts':
+        specifier: 0.1.10
+        version: 0.1.10(rollup@4.21.1)
       '@vueuse/core':
         specifier: ^11.0.3
         version: 11.0.3(vue@3.4.38(typescript@5.5.4))
@@ -149,9 +152,6 @@ importers:
       '@uni-helper/vite-plugin-uni-components':
         specifier: ^0.2.0
         version: 0.2.0(rollup@4.21.1)
-      '@uni-helper/vite-plugin-uni-layouts':
-        specifier: ^0.1.11
-        version: 0.1.11(rollup@4.21.1)
       '@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))
@@ -453,11 +453,6 @@ packages:
     engines: {node: '>=6.0.0'}
     hasBin: true
 
-  '@babel/parser@7.28.0':
-    resolution: {integrity: sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==}
-    engines: {node: '>=6.0.0'}
-    hasBin: true
-
   '@babel/parser@7.28.4':
     resolution: {integrity: sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==}
     engines: {node: '>=6.0.0'}
@@ -2508,8 +2503,8 @@ packages:
   '@uni-helper/vite-plugin-uni-components@0.2.0':
     resolution: {integrity: sha512-h/rV8Z3N+wus/ZviYzkdRePNSUlkndn5H+wVC17ZXmG+2mqmUfLJdGskzrCbgE7Y1TT7u8E9yMz8Ah/RwMf0GQ==}
 
-  '@uni-helper/vite-plugin-uni-layouts@0.1.11':
-    resolution: {integrity: sha512-FXdFATBFsHAl7xY9q3KO0EexMRGua/7txIiQTm2rQi1/bXcft4CUXldtuHl9Upq0V6CT47aanmfzcOF5CpHK7Q==}
+  '@uni-helper/vite-plugin-uni-layouts@0.1.10':
+    resolution: {integrity: sha512-RJdGmJjZtpKNVfShiKYZrualMxdi+i8uh7zpPG+X3lzf6wyKSJgWwVAj3GUdqeE/QUEncNPmj2sqwuyeLXPxbA==}
 
   '@uni-helper/vite-plugin-uni-manifest@0.2.8':
     resolution: {integrity: sha512-6QtUcCTkvpR5GAPUxyKlEtm+KYxOk1RSVfdrxlWYW2q7Iws0D7UeNirA4GMuc/SaayEjURlU7cUrS7NceoPCfQ==}
@@ -3201,8 +3196,8 @@ packages:
     resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}
     engines: {node: '>= 0.8'}
 
-  c12@1.11.1:
-    resolution: {integrity: sha512-KDU0TvSvVdaYcQKQ6iPHATGz/7p/KiVjPg4vQrB6Jg/wX9R0yl5RZxWm9IoZqaIHD2+6PZd81+KMGwRr/lRIUg==}
+  c12@1.11.2:
+    resolution: {integrity: sha512-oBs8a4uvSDO9dm8b7OCFW7+dgtVrwmwnrVXYzLm43ta7ep2jCn/0MhoUFygIWtxhyy6+/MG7/agvpY0U1Iemew==}
     peerDependencies:
       magicast: ^0.3.4
     peerDependenciesMeta:
@@ -3787,10 +3782,6 @@ packages:
     resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==}
     engines: {node: '>=8'}
 
-  dotenv@16.4.5:
-    resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==}
-    engines: {node: '>=12'}
-
   dotenv@16.6.1:
     resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==}
     engines: {node: '>=12'}
@@ -4421,10 +4412,6 @@ packages:
   get-tsconfig@4.7.6:
     resolution: {integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==}
 
-  giget@1.2.3:
-    resolution: {integrity: sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==}
-    hasBin: true
-
   giget@1.2.5:
     resolution: {integrity: sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==}
     hasBin: true
@@ -5557,11 +5544,6 @@ packages:
   nwsapi@2.2.22:
     resolution: {integrity: sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==}
 
-  nypm@0.3.11:
-    resolution: {integrity: sha512-E5GqaAYSnbb6n1qZyik2wjPDZON43FqOJO59+3OkWrnmQtjggrMOVnsyzfjxp/tS6nlYJBA4zRA5jSM2YaadMg==}
-    engines: {node: ^14.16.0 || >=16.10.0}
-    hasBin: true
-
   nypm@0.5.4:
     resolution: {integrity: sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==}
     engines: {node: ^14.16.0 || >=16.10.0}
@@ -5594,8 +5576,8 @@ packages:
   ofetch@1.3.4:
     resolution: {integrity: sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==}
 
-  ohash@1.1.3:
-    resolution: {integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==}
+  ohash@1.1.6:
+    resolution: {integrity: sha512-TBu7PtV8YkAZn0tSxobKY2n2aAQva936lhRrj6957aDaCf9IEtqsKbgMzXE/F/sjqYOwmrukeORHNLe5glk7Cg==}
 
   ohash@2.0.11:
     resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==}
@@ -7502,10 +7484,6 @@ snapshots:
     dependencies:
       '@babel/types': 7.27.1
 
-  '@babel/parser@7.28.0':
-    dependencies:
-      '@babel/types': 7.28.2
-
   '@babel/parser@7.28.4':
     dependencies:
       '@babel/types': 7.28.4
@@ -10418,18 +10396,18 @@ snapshots:
       - rollup
       - supports-color
 
-  '@uni-helper/vite-plugin-uni-layouts@0.1.11(rollup@4.21.1)':
+  '@uni-helper/vite-plugin-uni-layouts@0.1.10(rollup@4.21.1)':
     dependencies:
-      '@babel/types': 7.28.2
+      '@babel/types': 7.28.4
       '@uni-helper/uni-env': 0.1.7
-      '@vue/compiler-core': 3.4.21
-      '@vue/compiler-sfc': 3.4.21
+      '@vue/compiler-core': 3.4.38
+      '@vue/compiler-sfc': 3.4.38
       ast-kit: 0.11.3(rollup@4.21.1)
-      c12: 1.11.1
+      c12: 1.11.2
       chokidar: 3.6.0
       fast-glob: 3.3.3
       jsonc-parser: 3.3.1
-      magic-string: 0.30.17
+      magic-string: 0.30.21
       scule: 1.3.0
     transitivePeerDependencies:
       - magicast
@@ -11085,7 +11063,7 @@ snapshots:
 
   ast-kit@0.11.3(rollup@4.21.1):
     dependencies:
-      '@babel/parser': 7.28.0
+      '@babel/parser': 7.28.4
       '@rollup/pluginutils': 5.1.0(rollup@4.21.1)
       pathe: 1.1.2
     transitivePeerDependencies:
@@ -11293,16 +11271,16 @@ snapshots:
 
   bytes@3.1.2: {}
 
-  c12@1.11.1:
+  c12@1.11.2:
     dependencies:
       chokidar: 3.6.0
       confbox: 0.1.8
       defu: 6.1.4
-      dotenv: 16.4.5
-      giget: 1.2.3
+      dotenv: 16.6.1
+      giget: 1.2.5
       jiti: 1.21.7
       mlly: 1.7.4
-      ohash: 1.1.3
+      ohash: 1.1.6
       pathe: 1.1.2
       perfect-debounce: 1.0.0
       pkg-types: 1.3.1
@@ -11874,8 +11852,6 @@ snapshots:
     dependencies:
       is-obj: 2.0.0
 
-  dotenv@16.4.5: {}
-
   dotenv@16.6.1: {}
 
   dotgitignore@2.1.0:
@@ -12701,17 +12677,6 @@ snapshots:
     dependencies:
       resolve-pkg-maps: 1.0.0
 
-  giget@1.2.3:
-    dependencies:
-      citty: 0.1.6
-      consola: 3.2.3
-      defu: 6.1.4
-      node-fetch-native: 1.6.4
-      nypm: 0.3.11
-      ohash: 1.1.3
-      pathe: 1.1.2
-      tar: 6.2.1
-
   giget@1.2.5:
     dependencies:
       citty: 0.1.6
@@ -14015,15 +13980,6 @@ snapshots:
 
   nwsapi@2.2.22: {}
 
-  nypm@0.3.11:
-    dependencies:
-      citty: 0.1.6
-      consola: 3.2.3
-      execa: 8.0.1
-      pathe: 1.1.2
-      pkg-types: 1.3.1
-      ufo: 1.6.1
-
   nypm@0.5.4:
     dependencies:
       citty: 0.1.6
@@ -14074,7 +14030,7 @@ snapshots:
       node-fetch-native: 1.6.4
       ufo: 1.5.4
 
-  ohash@1.1.3: {}
+  ohash@1.1.6: {}
 
   ohash@2.0.11: {}
 

+ 39 - 0
src/components.d.ts

@@ -14,6 +14,45 @@ declare module 'vue' {
     PrivacyPopup: typeof import('./components/PrivacyPopup.vue')['default']
     QCode: typeof import('./components/QCode.vue')['default']
     StatusTip: typeof import('./components/StatusTip.vue')['default']
+    WdBadge: typeof import('wot-design-uni/components/wd-badge/wd-badge.vue')['default']
+    WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
+    WdCard: typeof import('wot-design-uni/components/wd-card/wd-card.vue')['default']
+    WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default']
+    WdCellGroup: typeof import('wot-design-uni/components/wd-cell-group/wd-cell-group.vue')['default']
+    WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default']
+    WdCheckboxGroup: typeof import('wot-design-uni/components/wd-checkbox-group/wd-checkbox-group.vue')['default']
+    WdCircle: typeof import('wot-design-uni/components/wd-circle/wd-circle.vue')['default']
+    WdConfigProvider: typeof import('wot-design-uni/components/wd-config-provider/wd-config-provider.vue')['default']
+    WdCountDown: typeof import('wot-design-uni/components/wd-count-down/wd-count-down.vue')['default']
+    WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default']
+    WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default']
+    WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default']
+    WdInputNumber: typeof import('wot-design-uni/components/wd-input-number/wd-input-number.vue')['default']
+    WdLoading: typeof import('wot-design-uni/components/wd-loading/wd-loading.vue')['default']
+    WdLoadmore: typeof import('wot-design-uni/components/wd-loadmore/wd-loadmore.vue')['default']
+    WdMessageBox: typeof import('wot-design-uni/components/wd-message-box/wd-message-box.vue')['default']
+    WdNavbar: typeof import('wot-design-uni/components/wd-navbar/wd-navbar.vue')['default']
+    WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default']
+    WdNotify: typeof import('wot-design-uni/components/wd-notify/wd-notify.vue')['default']
+    WdOverlay: typeof import('wot-design-uni/components/wd-overlay/wd-overlay.vue')['default']
+    WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
+    WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
+    WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']
+    WdRate: typeof import('wot-design-uni/components/wd-rate/wd-rate.vue')['default']
+    WdSkeleton: typeof import('wot-design-uni/components/wd-skeleton/wd-skeleton.vue')['default']
+    WdSortButton: typeof import('wot-design-uni/components/wd-sort-button/wd-sort-button.vue')['default']
+    WdStatusTip: typeof import('wot-design-uni/components/wd-status-tip/wd-status-tip.vue')['default']
+    WdStep: typeof import('wot-design-uni/components/wd-step/wd-step.vue')['default']
+    WdSteps: typeof import('wot-design-uni/components/wd-steps/wd-steps.vue')['default']
+    WdSwiper: typeof import('wot-design-uni/components/wd-swiper/wd-swiper.vue')['default']
+    WdTab: typeof import('wot-design-uni/components/wd-tab/wd-tab.vue')['default']
+    WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default']
+    WdTabbarItem: typeof import('wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue')['default']
+    WdTabs: typeof import('wot-design-uni/components/wd-tabs/wd-tabs.vue')['default']
+    WdTag: typeof import('wot-design-uni/components/wd-tag/wd-tag.vue')['default']
+    WdTextarea: typeof import('wot-design-uni/components/wd-textarea/wd-textarea.vue')['default']
+    WdToast: typeof import('wot-design-uni/components/wd-toast/wd-toast.vue')['default']
+    WdUpload: typeof import('wot-design-uni/components/wd-upload/wd-upload.vue')['default']
     Zcontact: typeof import('./components/Zcontact.vue')['default']
     Zpopup: typeof import('./components/Zpopup.vue')['default']
     Zupload: typeof import('./components/Zupload.vue')['default']

+ 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',
   /**
    * 体验版
    */

+ 330 - 2
src/pages.json

@@ -1,5 +1,59 @@
 {
-  "pages": [],
+  "pages": [
+    {
+      "path": "pages/index/index",
+      "name": "smqjh-home",
+      "layout": "tabbar",
+      "islogin": false,
+      "style": {
+        "navigationBarTitleText": "首页",
+        "navigationStyle": "custom",
+        "backgroundColor": "#9ED605",
+        "backgroundColorTop": "#9ED605"
+      }
+    },
+    {
+      "path": "pages/cart/index",
+      "name": "smqjh-cart",
+      "layout": "tabbar",
+      "islogin": false,
+      "style": {
+        "navigationBarTitleText": "购物车",
+        "navigationStyle": "custom",
+        "disableScroll": true
+      }
+    },
+    {
+      "path": "pages/classfiy/index",
+      "name": "smqjh-classfiy",
+      "layout": "tabbar",
+      "islogin": false,
+      "style": {
+        "navigationBarTitleText": "市民请集合分类",
+        "navigationStyle": "custom",
+        "disableScroll": true
+      }
+    },
+    {
+      "path": "pages/login/index",
+      "name": "smqjh-login",
+      "islogin": false,
+      "style": {
+        "navigationBarTitleText": "市民请集合"
+      }
+    },
+    {
+      "path": "pages/my/index",
+      "name": "smqjh-my",
+      "layout": "tabbar",
+      "islogin": false,
+      "style": {
+        "navigationBarTitleText": "个人中心",
+        "navigationStyle": "custom",
+        "disableScroll": true
+      }
+    }
+  ],
   "globalStyle": {
     "navigationBarBackgroundColor": "@navBgColor",
     "navigationBarTextStyle": "@navTxtStyle",
@@ -45,7 +99,281 @@
           "version": "2.1.12",
           "provider": "wx9ad912bf20548d92"
         }
-      }
+      },
+      "pages": [
+        {
+          "path": "commonTab/index",
+          "name": "xsb-homeTabbar",
+          "islogin": false,
+          "style": {
+            "navigationStyle": "custom",
+            "navigationBarTitleText": "星闪豹首页",
+            "backgroundColorBottom": "#fff",
+            "disableScroll": true
+          }
+        },
+        {
+          "path": "confirmOrder/index",
+          "name": "xsb-confirmOrder",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "提交订单"
+          }
+        },
+        {
+          "path": "goods/index",
+          "name": "xsb-goods",
+          "islogin": false,
+          "style": {
+            "navigationStyle": "custom",
+            "navigationBarTitleText": "星闪豹商品详情"
+          }
+        },
+        {
+          "path": "order/index",
+          "name": "xsb-order",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "订单列表"
+          }
+        },
+        {
+          "path": "orderDetaile/index",
+          "name": "xsb-orderDetaile",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "订单详情",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "search/index",
+          "name": "xsb-search",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "搜索"
+          }
+        },
+        {
+          "path": "selectAddress/index",
+          "name": "xsb-selectAddress",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "选择收获地址"
+          }
+        }
+      ]
+    },
+    {
+      "root": "subPack-common",
+      "pages": [
+        {
+          "path": "addressList/index",
+          "name": "common-addressList",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "收获地址"
+          }
+        },
+        {
+          "path": "afterSales/index",
+          "name": "common-afterSales",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "申请售后"
+          }
+        },
+        {
+          "path": "afterSalesDetail/index",
+          "name": "common-afterSalesDetail",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "售后详情"
+          }
+        },
+        {
+          "path": "afterSalesList/index",
+          "name": "common-afterSalesList",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "售后列表"
+          }
+        },
+        {
+          "path": "editAddress/index",
+          "name": "common-editAddress",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "编辑新增收获地址",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "integral/index",
+          "name": "common-integral",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "积分",
+            "disableScroll": true
+          }
+        },
+        {
+          "path": "nickName/index",
+          "name": "common-nickName",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "修改昵称"
+          }
+        },
+        {
+          "path": "payError/index",
+          "name": "common-payError",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "支付失败",
+            "navigationStyle": "custom",
+            "disableScroll": true
+          }
+        },
+        {
+          "path": "paySuccess/index",
+          "name": "common-paySuccess",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "支付成功",
+            "navigationStyle": "custom",
+            "disableScroll": true
+          }
+        },
+        {
+          "path": "revalue/index",
+          "name": "common-revalue",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "写评价",
+            "navigationStyle": "custom",
+            "disableScroll": true
+          }
+        },
+        {
+          "path": "revalueSuccess/index",
+          "name": "common-revalue-success",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "评价成功",
+            "navigationStyle": "custom",
+            "disableScroll": true
+          }
+        },
+        {
+          "path": "user-center/index",
+          "name": "common-user-center",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "账户设置"
+          }
+        }
+      ]
+    },
+    {
+      "root": "subPack-smqjh",
+      "pages": [
+        {
+          "path": "order/index",
+          "name": "smqjh-order",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "订单列表"
+          }
+        }
+      ]
+    },
+    {
+      "root": "subPack-charge",
+      "pages": [
+        {
+          "path": "chargeDetail/chargeDetail",
+          "name": "charge-detail",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "充电详情",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "chargeing/chargeing",
+          "name": "chargeing",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "正在充电",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "chargeMap/chargeMap",
+          "name": "charge-map",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "地图模式",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "chargeOrderDetail/chargeOrderDetail",
+          "name": "charge-order-detail",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "订单详情",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "chargeOrderList/chargeOrderList",
+          "name": "charge-order-list",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "充电订单",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "chargeSearchList/chargeSearchList",
+          "name": "cahrge-search-list",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "搜索列表",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "chargeSiteDetail/chargeSiteDetail",
+          "name": "charge-site-detail",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "站点详情",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "chargeStart/chargeStart",
+          "name": "charge-start",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "启动终端",
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "index/index",
+          "name": "charge-index",
+          "islogin": false,
+          "style": {
+            "navigationStyle": "custom",
+            "navigationBarTitleText": "",
+            "backgroundColorBottom": "#fff"
+          }
+        }
+      ]
     }
   ]
 }

+ 0 - 1
src/pages/my/index.vue

@@ -148,7 +148,6 @@ function handleGo(item: { name: string }) {
         退出登录
       </wd-button>
     </view>
-    <QCode text="123" :qwidth="100" />
   </view>
 </template>
 

+ 54 - 0
src/uni-pages.d.ts

@@ -0,0 +1,54 @@
+/* eslint-disable */
+/* prettier-ignore */
+// @ts-nocheck
+// Generated by @uni-ku/pages-json
+
+interface NavigateToOptions {
+  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/chargeOrderList/chargeOrderList" |
+       "/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";
+}
+
+type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;
+
+declare interface Uni {
+  navigateTo(options: UniNamespace.NavigateToOptions & NavigateToOptions): void;
+  redirectTo(options: UniNamespace.RedirectToOptions & RedirectToOptions): void;
+  switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
+  reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
+}

+ 12 - 3
vite.config.ts

@@ -1,4 +1,5 @@
 import process from 'node:process'
+import path from 'node:path'
 import Uni from '@dcloudio/vite-plugin-uni'
 import UniHelperComponents from '@uni-helper/vite-plugin-uni-components'
 import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
@@ -23,8 +24,8 @@ export default async () => {
       UniHelperManifest(),
       // https://github.com/uni-helper/vite-plugin-uni-pages
       pagesJson({
-        dts: 'src/uni-pages.d.ts',
-        pageDir: 'pages',
+        dts: path.resolve(process.cwd(), 'src/uni-pages.d.ts'),
+        pagesDir: 'pages',
         subPackageDirs: [
           'subPack-xsb',
           'subPack-common',
@@ -36,7 +37,15 @@ export default async () => {
          * @default []
          */
         exclude: ['**/components/**/*.*'],
-        hooks: [hookUniPlatform],
+        hooks: [
+          hookUniPlatform,
+          // 简单调试 hook:在生成时打印上下文,帮助定位问题
+          (ctx) => {
+            console.log('[pages-json] pages type:', Object.prototype.toString.call(ctx.pages))
+            console.log('[pages-json] pages count:', Array.isArray(ctx.pages) ? ctx.pages.length : 'not array')
+            console.log('[pages-json] output dts:', path.resolve(process.cwd(), 'src/uni-pages.d.ts'))
+          },
+        ],
       }),
       // https://github.com/uni-helper/vite-plugin-uni-layouts
       UniHelperLayouts(),