收藏
回答

不应该在分包appJSON 是要怎么样?删除还是放到哪儿

问题模块
教程反馈


最后一次编辑于  02-13  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答

3 个回答

  • Duzzu😛
    Duzzu😛
    02-13

    https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/basic.html?search-key=%E5%88%86%E5%8C%85

    最下面有一个demo,你可以下载下来参考官方的配置一下,你这个报错肯定是路径写得有问题



    02-13
    赞同 1
    回复 1
    • Visjia
      Visjia
      02-13

      非常感谢

      02-13
      回复
  • Mr.Hope
    Mr.Hope
    02-13

    在分包写的页面不要在pages数组中写。。。。。你自己仔细看文档去

    02-13
    赞同
    回复 1
    • Mr.Hope
      Mr.Hope
      02-13

      {

      "pages": [

      "page/main",

      "page/function",

      "page/guide",

      "page/me",

      "settings/1.1",

      "settings/setting",

      "settings/about"

      ],

      "subPackages": [

      {

      "root": "function",

      "pages": [

      "cal",

      "map",

      "situs",

      "player",

      "PEcal",

      "scenery",

      "notice",

      "noticeDetail"

      ]

      },

      {

      "root": "module",

      "pages": [

      "module1",

      "module2",

      "module3",

      "module4",

      "module5",

      "module6",

      "module7",

      "sharePage",

      "web",

      "building"

      ]

      }

      ],

      "preloadRule": {

      "page/main": {

      "network": "all",

      "packages": [

      "module"

      ]

      },

      "page/function": {

      "network": "all",

      "packages": [

      "function"

      ]

      },

      "module/sharePage": {

      "network": "all",

      "packages": [

      "__APP__"

      ]

      }

      },

      "window": {

      "navigationBarBackgroundColor": "#ffffff",

      "navigationBarTextStyle": "black",

      "navigationBarTitleText": "东师青年",

      "navigationStyle": "custom",

      "backgroundColor": "#efeef4",

      "backgroundTextStyle": "dark",

      "backgroundColorTop": "#f5f5f7",

      "backgroundColorBottom": "#efeef4",

      "pageOrientation": "auto"

      },

      "tabBar": {

      "custom": false,

      "color": "#8a8a8a",

      "selectedColor": "#3cc51f",

      "borderStyle": "black",

      "backgroundColor": "#ffffff",

      "position": "bottom",

      "list": [

      {

      "pagePath": "page/main",

      "text": "首页",

      "iconPath": "icon/tab/home.png",

      "selectedIconPath": "icon/tab/@Home.png"

      },

      {

      "pagePath": "page/function",

      "text": "功能",

      "iconPath": "icon/tab/function.png",

      "selectedIconPath": "icon/tab/@Function.png"

      },

      {

      "pagePath": "page/guide",

      "text": "东师指南",

      "iconPath": "icon/tab/guide.png",

      "selectedIconPath": "icon/tab/@Guide.png"

      },

      {

      "pagePath": "page/me",

      "text": "我的东师",

      "iconPath": "icon/tab/me.png",

      "selectedIconPath": "icon/tab/@Me.png"

      }

      ]

      },

      "networkTimeout": {

      "request": 5000,

      "connectSocket": 8000,

      "uploadFile": 8000,

      "downloadFile": 25000

      },

      "workers": "worker",

      "debug": true,

      "resizable": true,

      "permission": {

      "scope.userLocation": {

      "desc": "您的位置信息将用于校园地图导航"

      }

      },

      "requiredBackgroundModes": [

      "audio"

      ],

      "usingComponents": {

      "share": "components/share",

      "nav": "components/nav"

      }

      }


      这是我的app.json

      02-13
      1
      回复
  • Visjia
    Visjia
    02-13

    好的

    02-13
    赞同
    回复