From 034195330b600747dd8dc489b76c1ca9d49988cb Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 04 六月 2025 09:46:38 +0800
Subject: [PATCH] fix: 修改ui

---
 apps/taro/config/index.js |   38 ++++++++++++++++++++++++++++++++++----
 1 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/apps/taro/config/index.js b/apps/taro/config/index.js
index 0e17760..83f8f71 100644
--- a/apps/taro/config/index.js
+++ b/apps/taro/config/index.js
@@ -5,6 +5,8 @@
 import ComponentsPlugin from 'unplugin-vue-components/webpack';
 import NutUIResolver from '@nutui/nutui-taro/dist/resolver';
 
+const rootPath = path.resolve(__dirname, '..', '..', '..');
+
 const config = {
   projectName: 'vue-mini',
   date: '2022-11-29',
@@ -24,6 +26,7 @@
   },
   alias: {
     '@': path.resolve(__dirname, '..', 'src'),
+    '@life-payment/components': path.resolve(rootPath, 'packages', 'components'),
   },
   sourceRoot: 'src',
   outputRoot: `dist/${process.env.TARO_ENV}`,
@@ -92,7 +95,7 @@
       url: {
         enable: true,
         config: {
-          limit: 1024, // 璁惧畾杞崲灏哄涓婇檺
+          limit: 2024, // 璁惧畾杞崲灏哄涓婇檺
         },
       },
       cssModules: {
@@ -110,7 +113,13 @@
 
       chain.plugin('unplugin-auto-import').use(
         AutoImport({
-          imports: ['vue', 'pinia', 'vue-router', { '@/constants': ['RouterPath'] }],
+          imports: [
+            'vue',
+            'pinia',
+            'vue-router',
+            { '@/constants': ['RouterPath'] },
+            { '@/utils': ['RouteHelper'] },
+          ],
           eslintrc: {
             enabled: true, // Default `false`
             filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
@@ -187,6 +196,17 @@
   h5: {
     publicPath: '/',
     staticDirectory: 'static',
+    router: {
+      mode: 'browser',
+    },
+    devServer: {
+      proxy: {
+        '/api': {
+          target: 'http://localhost:58190', // 鐩爣鏈嶅姟鍣ㄥ湴鍧�
+          changeOrigin: true,
+        },
+      },
+    },
     postcss: {
       autoprefixer: {
         enable: true,
@@ -195,7 +215,7 @@
       url: {
         enable: true,
         config: {
-          limit: 1024, // 璁惧畾杞崲灏哄涓婇檺
+          limit: 2024, // 璁惧畾杞崲灏哄涓婇檺
         },
       },
       cssModules: {
@@ -206,10 +226,20 @@
         },
       },
     },
+    htmlPluginOption: {
+      favicon: './public/logo-v.png',
+    },
+    useHtmlComponents: true,
     webpackChain(chain, webpack) {
       chain.plugin('unplugin-auto-import').use(
         AutoImport({
-          imports: ['vue', 'pinia', 'vue-router', { '@/constants': ['RouterPath'] }],
+          imports: [
+            'vue',
+            'pinia',
+            'vue-router',
+            { '@/constants': ['RouterPath'] },
+            { '@/utils': ['RouteHelper'] },
+          ],
           eslintrc: {
             enabled: true, // Default `false`
             filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`

--
Gitblit v1.9.1