uniapp-h5/README.md

24 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 目录以及文件说明
1. src作为项目源代码目录
2. src/static作为项目静态资源文件目录(图片,字体文件等,现只有图片文件),打包时都是直接拷贝过来的,不会被编译
3. src/pages作为项目页面文件目录
4. src/api作为所有页面api接口目录
5. src/utils作为常用工具函数封装的目录
**举例说明**
src/pages/ycnc代表邮储奶茶活动的模块相对应的src/static/ycnc代表邮储奶茶对应的静态资源文件src/api/ycnc.js代表所有的api接口
### 打包特有文件说明
**@uni-helper/vite-plugin-uni-pages**
uniapp的路由文件插件默认自动扫描src/pages下的所有.vue文件为页面然后自动构建生成pages.json
[详情见](https://uni-helper.js.org/vite-plugin-uni-pages)
**vite.config.js**
vite打包配置文件主要是一些插件
**custom.pages.js**
指定打包扫描的目录(默认 .src/pages),以及需要打包的模块(例:ycnc)和指定特定模块的特定页面(需要显示指定.vue后缀,例:'ycnc/index.vue')
**vite.plugin.js**
打包后针对static拷贝多余的文件再删除的插件脚本(vite使用的详见vite.config.js)
### 各个模块的说明
ycnc 邮储奶茶活动
xyyk 兴业半价优酷的活动