Sin descripción

Burt 562566ea74 chore: rename title hace 2 años
.husky e9602040a5 build: husky + lint-staged + commitlint hace 2 años
.vscode a6435acf98 build(vscode): add recommend extensions hace 2 años
env 0600f6aeb0 build: 优化title配置 hace 2 años
screenshots 685280b75d docs(readme): app 打包成apk运行,页面空白 hace 2 años
src 562566ea74 chore: rename title hace 2 años
.editorconfig 47c8ac2b5d build(prettier): add .prettierrc.js hace 2 años
.eslintrc.cjs a1f2bef5d1 build: 配置文件一点小优化 hace 2 años
.gitignore a1f2bef5d1 build: 配置文件一点小优化 hace 2 años
.npmrc 11629b2c11 build(.npmrc): add .npmrc & pnpm i hace 2 años
.prettierrc.cjs c51e7181f8 chore: test file hace 2 años
.stylelintrc.cjs 6b8c822306 build: stylelint hace 2 años
README.md 674d65ce2b docs(readme): 已完成功能 hace 2 años
commitlint.config.cjs e9602040a5 build: husky + lint-staged + commitlint hace 2 años
index.html 0600f6aeb0 build: 优化title配置 hace 2 años
package.json 7706e697aa docs: package.json hace 2 años
pages.config.ts 81c85b5e35 feat: 同时支持h5和weixin的导航栏渐变 hace 2 años
pnpm-lock.yaml 141b2cd46d build(uni-helper): 引入 @uni-helper/vite-plugin-uni-platform hace 2 años
shims-uni.d.ts a1f2bef5d1 build: 配置文件一点小优化 hace 2 años
tsconfig.json a266441305 build(uni-helper): 引入 @uni-helper/uni-cloud-types 云开发类型 hace 2 años
uni-pages.d.ts d05dae4cbf feat: 整理通屏页二级页面 hace 2 años
uno.config.ts 3c6321ad88 fix(unocss): 处理unocss在小程序中报错 hace 2 años
vite.config.ts 7e5e54678f fix(env): 环境变量不生效bug hace 2 años

README.md

vue3-uniapp-template

特性

业务功能 TODO LIST

  • 页面下拉刷新
  • 页面悬浮球(floating bubble)
  • 导航栏返回or去首页
  • 导航栏渐变(微信+h5)
  • 自定义导航栏顶部机型适配
  • 微信小程序分享(好友+朋友圈)
  • 多tab列表功能
  • 抽奖转盘

环境

  • pnpm>=8.12
  • node>=16

运行

  • web平台: pnpm dev:h5, 然后打开 http://localhost:9000/
  • weixin平台:pnpm dev:mp-weixin 然后打开微信开发者工具,导入本地文件夹,选择本项目的dist/dev/mp-weixin 文件。

发布

  • web平台: pnpm build:h5,打包后的文件在 dist/build/h5,可以放到web服务器,如nginx运行。如果最终不是放在根目录,可以在 vite.config.tsbase 属性进行配置。vite官网 vite.base
  • weixin平台:pnpm build:h5, 打包后的文件在 dist/build/mp-weixin,然后通过微信开发者工具导入,并点击右上角的“上传”按钮进行上传。

app 打包成apk运行,页面空白

  • pnpm build:app
  • 注意,app运行完后不支持本地跑,就是说HBuildX打开生成的app文件夹也跑不了
  • 需要配置 manifest.json,有3个地方需要填,如下图 app打包
  • 然后打开HBuildX--发行--原生APP云打包,然后出现如下图,按图填写即可。 app打包
  • 打包成功如下图 app打包成功
  • 生成的apk路径 app打包成功路径
  • 运行报错如下图 apk运行报错
  • 官方链接:https://ask.dcloud.net.cn/article/35627
  • 安装历史版本的HBuildX: https://hx.dcloud.net.cn/Tutorial/HistoryVersion,然后在百度云盘里面下载,下载HBuildX3.8.12的(因为本地的cli对应的HBuildX版本为3.8.12)
  • 使用刚下载的旧版HBuildX云打包,一切顺利,但是最终打包的apk在手机安装后,运行出来的是白屏!(除了tabbar啥都么有,郁闷,PS:tabbar可以切换,但是都是空白页面) APP运行页面空白