收藏
回答

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


回答关注问题邀请回答
收藏

3 个回答

  • Duzzu😛
    Duzzu😛
    2019-02-13

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

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



    2019-02-13
    有用 1
    回复 1
    • 2019-02-13

      非常感谢

      2019-02-13
      回复
  • 2019-02-13

    好的

    2019-02-13
    有用
    回复
  • Mr.Hope
    Mr.Hope
    2019-02-13

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

    2019-02-13
    有用
    回复 1
    • Mr.Hope
      Mr.Hope
      2019-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

      2019-02-13
      1
      回复
登录 后发表内容