refactor: 更新配置文件和图标资源

- 精简prod.ts配置,移除不必要的注释和代码
- 更新app.config.ts中的tabBar样式和图标路径
- 删除不再使用的图标文件,优化项目资源结构
This commit is contained in:
iHeyTang 2025-09-11 12:47:31 +08:00
parent b3c7c09e13
commit a38a0847eb
8 changed files with 19 additions and 46 deletions

View File

@ -1,35 +1,9 @@
import type { UserConfigExport } from "@tarojs/cli" import type { UserConfigExport } from '@tarojs/cli';
export default { export default {
mini: {}, mini: {},
h5: { h5: {
// 确保产物为 es5 // 确保产物为 es5
legacy: true, legacy: true,
/** },
* WebpackChain } satisfies UserConfigExport<'vite'>;
* @docs https://github.com/neutrinojs/webpack-chain
*/
// webpackChain (chain) {
// /**
// * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
// * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
// */
// chain.plugin('analyzer')
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
// /**
// * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
// * @docs https://github.com/chrisvfritz/prerender-spa-plugin
// */
// const path = require('path')
// const Prerender = require('prerender-spa-plugin')
// const staticDir = path.join(__dirname, '..', 'dist')
// chain
// .plugin('prerender')
// .use(new Prerender({
// staticDir,
// routes: [ '/pages/index/index' ],
// postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
// }))
// }
}
} satisfies UserConfigExport<'vite'>

View File

@ -1,40 +1,39 @@
export default defineAppConfig({ export default defineAppConfig({
pages: [ pages: [
'pages/home/index', // 新的模板卡片首页 'pages/home/index', // 新的模板卡片首页
'pages/history/index', // 历史记录页面 'pages/history/index', // 历史记录页面
'pages/generate/index', // 生成处理页面 'pages/generate/index', // 生成处理页面
'pages/result/index' 'pages/result/index',
], ],
tabBar: { tabBar: {
color: '#999999', color: '#8E9BAE',
selectedColor: '#FFD67A', selectedColor: '#1D1F22',
backgroundColor: '#FFFFFF', backgroundColor: '#FFFFFF',
borderStyle: 'black', borderStyle: 'black',
list: [ list: [
{ {
pagePath: 'pages/home/index', pagePath: 'pages/home/index',
text: '首页', text: '首页',
iconPath: 'assets/icons/default/shouye-weixuanzhong.png', iconPath: 'assets/icons/playground.png',
selectedIconPath: 'assets/icons/activate/shouye.png' selectedIconPath: 'assets/icons/playground-selected.png',
}, },
{ {
pagePath: 'pages/history/index', pagePath: 'pages/history/index',
text: '历史记录', text: '历史记录',
iconPath: 'assets/icons/default/fuwuzixun-weixuanzhong.png', iconPath: 'assets/icons/user.png',
selectedIconPath: 'assets/icons/activate/shoulijindu.png' selectedIconPath: 'assets/icons/user-selected.png',
} },
] ],
}, },
window: { window: {
backgroundTextStyle: 'light', backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff', navigationBarBackgroundColor: '#fff',
navigationBarTitleText: '图生视频', navigationBarTitleText: '图生视频',
navigationBarTextStyle: 'black' navigationBarTextStyle: 'black',
}, },
permission: { permission: {
'scope.album': { 'scope.album': {
desc: '用于保存生成的图片和视频到相册' desc: '用于保存生成的图片和视频到相册',
} },
}, },
}) });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/assets/icons/user.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB