当前位置: 首页 > news >正文

uniapp微信小程序分包,小程序分包

前言,都知道我是一个后端开发、所以今天来写一下uniapp。
起因是美工给我的切图太大,微信小程序不让了,在网上找了一大堆分包的文章,我心思我照着写的啊,怎么就一直报错呢?

错误原因 tabBar的页面被我放在分包了(********)
tabBar的页面要放在主包中!tabBar的页面要放在主包中!tabBar的页面要放在主包中!(重要的事情说3遍)

pages.json

{"easycom": {"autoscan": true,"^u-(.*)": "@/vk-uview-ui/components/u-$1/u-$1.vue"},"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages{"path": "pages/index/index","style": {"navigationBarTitleText": "首页","enablePullDownRefresh": true, //是否启用刷新"app-plus": {"titleNView": false}}},{"path": "pages/login/index","style": {"navigationBarTitleText": "登录"}},{"path": "pages/mine/work","style": {"navigationBarTitleText": "订单"}},{"path": "pages/mine/index","style": {"navigationBarTitleText": "我的"}},{"path": "pages/cpzx/index","style": {"navigationBarTitleText": "商城","enablePullDownRefresh": true //是否启用刷新}}],/**主资源过大 分包处理*/"subPackages": [{"root": "pagesA","pages": [{"path": "test/test","style": {"navigationBarTitleText": "test"}},{"path": "fwpj/index","style": {"navigationBarTitleText": "服务评价"}},{"path": "ywzx/index","style": {"navigationBarTitleText": "在线客服"}},{"path": "pay/index","style": {"navigationBarTitleText": "缴费"}},{"path": "mine/about","style": {"navigationBarTitleText": "关于我们"}},{"path": "webview/index","style": {"navigationBarTitleText": ""}},{"path": "detil/index","style": {"navigationBarTitleText": ""}}]}],"globalStyle": {"navigationBarTextStyle": "black","navigationBarTitleText": "uni-app","navigationBarBackgroundColor": "#fff","backgroundColor": "#fff","mp-alipay": {"allowsBounceVertical": "NO"}},"tabBar": {"color": "#a2a6b0","selectedColor": "#070002","borderStyle": "black","backgroundColor": "#FFFFFF","list": [{"pagePath": "pages/index/index","iconPath": "static/images/tabbar/nav-1-1.png","selectedIconPath": "static/images/tabbar/nav-1.png","text": "首页"},{"pagePath": "pages/cpzx/index","iconPath": "static/images/tabbar/nav-2-1.png","selectedIconPath": "static/images/tabbar/nav-2.png","text": "商城"},{"pagePath": "pages/mine/work","iconPath": "static/images/tabbar/nav-3-1.png","selectedIconPath": "static/images/tabbar/nav-3.png","text": "订单"},{"pagePath": "pages/mine/index","iconPath": "static/images/tabbar/nav-4-1.png","selectedIconPath": "static/images/tabbar/nav-4.png","text": "我的"}]}
}

目录结构

在这里插入图片描述

http://www.lryc.cn/news/256811.html

相关文章:

  • 『Linux升级路』进度条小程序
  • 使用rust slint开发桌面应用
  • Flutter桌面应用程序定义系统托盘Tray
  • docker:安装mysql以及最佳实践
  • uniapp实战 —— 自定义顶部导航栏
  • 中国移动频段划分
  • 《PySpark大数据分析实战》-01.关于数据
  • Qt/C++视频监控拉流显示/各种rtsp/rtmp/http视频流/摄像头采集/视频监控回放/录像存储
  • Vue.js - 界面设计工具和UI组件库
  • 【贪心算法】 Opponents
  • 【git 相关操作】
  • 流媒体音视频/安防视频云平台/可视化监控平台EasyCVR无法启动且打印panic报错,是什么原因?
  • H264之NALU结构详解
  • 快速整合EasyExcel实现Excel的上传下载
  • MongoDB的条件操作符
  • 【Linux】探索Linux进程状态 | 僵尸进程 | 孤儿进程
  • 大数据股票简单分析
  • 从零开始搭建链上dex自动化价差套利程序(11)
  • 2023.12面试题汇总小结
  • Linux权限命令详解
  • 【Android】Glide的简单使用(下)
  • TCP对数据的拆分
  • 面试问题--计算机网络:二层转发、三层转发与osi模型
  • kubectl获取ConfigMap导出YAML时如何忽略某些字段
  • 复制粘贴——QT实现原理
  • (一)五种最新算法(SWO、COA、LSO、GRO、LO)求解无人机路径规划MATLAB
  • LED透镜粘接UV胶是一种特殊的UV固化胶,用于固定和粘合LED透镜。
  • C语言 题目
  • CDN 内容分发网络
  • Android : Xui- RecyclerView+BannerLayout 轮播图简单应用