收藏
回答

第三方分包加载无法预览

问题模块 框架类型 终端类型 微信版本 基础库版本
框架 小程序 工具 6.6.3 1.9.8

我是第三方开发平台,由于包太大就做了分包加载,在编辑器上运行和上传都没有问题,但是预览的时候就包“无效的json文件”,却不报具体位置,这很让人头疼,是不是第三方的ext.json不能配置分包加载?

最后一次编辑于  2018-02-07  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏

16 个回答

  • Phobal
    Phobal
    2018-10-30

    最近也踩了类似的坑,主要原因是因为在 tabBar 的配置下的 iconPathselectedIconPath

    字段值中包含了子包中的静态资源,因为子包是在主包下载后才开始下载的,并且子包的下载时机也不一样,但是 tabBar 需要第一次就要加载进来的,但是子包还没下载,那么 tabBar 依赖的静态资源都找不到,所以就报错了, 解决方法就是把 tabBar 中要用到的静态资源都放在主包去加载

    2018-10-30
    赞同
    回复
  • Panda
    Panda
    2018-07-05

    @大夏天 能不能把你配置好的两个json文件粘一下,我的是在app.json配置了全部的页面的路径。

    主包跟分包都有,但是ext.json里面配置了分包的,没有主包的。审核的时候一直提示路径不一致

    2018-07-05
    赞同
    回复
  • A简去野
    A简去野
    2018-06-16

    现在ext.json里面的pages只能取app.json里面pages的子集,如果没有变化可以不填。

    你检查一下ext.json里面有没有加page,再预览一下。


    只要在上传代码时候设置了pages,分包页面就提示不存在了。请官方看一下问题,



    2018-06-16
    赞同
    回复 1
    • oric
      oric
      2018-07-03

      第三方小程序如果使用分包的话只能维持代码模版的页面配置( pages/ subPackages ),暂时不支持使用ext.json更改。

      如果没有变更pages配置的话,请删除extjson中的pages字段。


      2018-07-03
      回复
  • 唐雄
    唐雄
    2018-04-08

    把ext.json里面的page删了是可以预览,但是第三方平台发布小程序的时候会报错,errmsg:"page is in invalid format hint: [AbC105484527]" 请问是怎么解决的

    2018-04-08
    赞同
    回复
  • A00阿狸么
    A00阿狸么
    2018-04-03

    第三方平台发布小程序的时候还需要page不

    2018-04-03
    赞同
    回复
  • A00阿狸么
    A00阿狸么
    2018-04-03

    发布的时候ext.json还需要page不呢

    2018-04-03
    赞同
    回复
  • 大夏天
    大夏天
    2018-04-03

    把ext.json里面的page删了就可以了

    2018-04-03
    赞同
    回复
  • A00阿狸么
    A00阿狸么
    2018-04-01

    如何处理这个问题呢。还没看懂呢。 “你检查一下ext.json里面有没有加page,再预览一下。”

    2018-04-01
    赞同
    回复 3
    • 大夏天
      大夏天
      2018-06-20

      ext.json里面不要配置page就可以了


      2018-06-20
      回复
    • Panda
      Panda
      2018-07-09回复大夏天

      不是说ext.json里面不能有分包“subPackages”的这个字段吗,想知道你是怎么配置的

      2018-07-09
      回复
    • 大夏天
      大夏天
      2018-07-10

      是的,就是ext.json中不要有page和subPackages这两个字段,这两个配置在app.json中就行

      2018-07-10
      回复
  • oric
    oric
    2018-02-07

    现在ext.json里面的pages只能取app.json里面pages的子集,如果没有变化可以不填。

    你检查一下ext.json里面有没有加page,再预览一下。

    2018-02-07
    赞同
    回复
  • 大夏天
    大夏天
    2018-02-07

    这是ext.json

    {

    "extEnable": true,

    "extAppid": "wxa1bd86cdf47df34e",

    "pages": [

    "pages/index/index",

    "pages/category/category",

    "pages/cart/cart",

    "pages/member/index/index",

    "pages/address/add/add",

    "pages/address/list/list",

    "pages/address/select/index",

    "pages/allActivity/allActivity",

    "pages/area/index/index",

    "pages/article/detail/detail",

    "pages/article/list/list",

    "pages/bargain/bargain/index",

    "pages/bargain/cashier/index",

    "pages/bargain/detail/index",

    "pages/bargain/index/index",

    "pages/bargain/list/index",

    "pages/canyin/index",

    "pages/chainPage/chainPage",

    "pages/commission/QRcode/QRcode",

    "pages/commission/Withdraw/Withdraw",

    "pages/commission/WithdrawDetail/WithdrawDetail",

    "pages/commission/WithdrawDetailMoney/WithdrawDetailMoney",

    "pages/commission/agreement/agreement",

    "pages/commission/distributionPrice/distributionPrice",

    "pages/commission/logs/logs",

    "pages/commission/orderForm/orderForm",

    "pages/commission/register/index",

    "pages/commission/shopStore/index",

    "pages/commission/team/team",

    "pages/consultation/consultationDetail/consultationDetail",

    "pages/consultation/reviewArea/reviewArea",

    "pages/consultation/consultation",

    "pages/customerForm/formDetail/formDetail",

    "pages/customerForm/formSuccess/formSuccess",

    "pages/customerForm/customerForm",

    "pages/expressQuery/expressQuery",

    "pages/game/fruitMachine/fruitMachine",

    "pages/game/scratch/scratch",

    "pages/game/wheel/wheel",

    "pages/goods/detail/detail",

    "pages/goods/groupDetail/detail",

    "pages/goods/grouplist/list",

    "pages/goods/list/list",

    "pages/goods/priceKill/priceKill",

    "pages/goods/shop/introduceShop/introduceShop",

    "pages/goods/shop/shop",

    "pages/groupbuy/cashier/index",

    "pages/groupbuy/confirmOrder/index",

    "pages/groupbuy/detail/index",

    "pages/groupbuy/fightGroups/index",

    "pages/groupbuy/groupList/detail/index",

    "pages/groupbuy/groupList/index",

    "pages/groupbuy/index/index",

    "pages/groupbuy/list/index",

    "pages/groupbuy/openGroups/index",

    "pages/indexpage/indexpage",

    "pages/member/aboutus/aboutus",

    "pages/member/activeCard/consumption/consumption",

    "pages/member/activeCard/integralSum/integralSum",

    "pages/member/activeCard/activeCard",

    "pages/member/allTool/details/index",

    "pages/member/allTool/groupbuy/index",

    "pages/member/allTool/allTool",

    "pages/member/collect/collect",

    "pages/member/coupon/Couponcenter/Couponcenter",

    "pages/member/coupon/couponDetail/couponDetail",

    "pages/member/coupon/getCoupon/getCoupon",

    "pages/member/coupon/myCoupon/myCoupon",

    "pages/member/coupon/index",

    "pages/member/evaluate/addevaluate/index",

    "pages/member/evaluate/evaluate",

    "pages/member/groupActivity/activityIntroduce/activityIntroduce",

    "pages/member/groupActivity/activityType/activityType",

    "pages/member/groupActivity/addType/addType",

    "pages/member/groupActivity/allChannel/allChannel",

    "pages/member/groupActivity/changeImg/changeImg",

    "pages/member/groupActivity/channel/channel",

    "pages/member/groupActivity/establishActivity/establishActivity",

    "pages/member/groupActivity/userInformation/userInformation",

    "pages/member/groupActivity/groupActivity",

    "pages/member/integral/address/detail/index",

    "pages/member/integral/address/list/index",

    "pages/member/integral/detail/index",

    "pages/member/integral/exchange/index",

    "pages/member/integral/home/index",

    "pages/member/integral/integral/index",

    "pages/member/integral/received/index",

    "pages/member/integral/recording/index",

    "pages/member/jump/jump",

    "pages/member/membership/index",

    "pages/member/membership/cardInfo/cardInfo",

    "pages/member/membership/cardOpen/cardOpen",

    "pages/member/membership/cardSuccess/cardSuccess",

    "pages/member/money/money",

    "pages/member/point/point",

    "pages/member/registered/index",

    "pages/member/sign/detail/detail",

    "pages/member/sign/sign",

    "pages/merchants/article/index",

    "pages/notice/detail/detail",

    "pages/notice/list/list",

    "pages/order/checkout/checkout",

    "pages/order/complaint/complaint",

    "pages/order/complaintEvery/complaintEvery",

    "pages/order/details/index",

    "pages/order/list/list",

    "pages/order/logistics/index",

    "pages/order/mendian/index",

    "pages/order/myQuestion/myQuestion",

    "pages/order/orderpay/payment",

    "pages/order/ordersubmit/index",

    "pages/order/payment/payment",

    "pages/order/pinjia/index",

    "pages/order/refund/refundDetails/refundDetails",

    "pages/order/refund/refund",

    "pages/order/refundGoods/refundGoods",

    "pages/order/success/index",

    "pages/register/index",

    "pages/search/index",

    "pages/seller/goods",

    "pages/seller/index",

    "pages/services/category/category",

    "pages/services/detail/index",

    "pages/services/list/index",

    "pages/services/list_detail/index",

    "pages/services/search/search",

    "pages/services/services_pinjia/index",

    "pages/shoppage/list/index",

    "pages/shoppage/index",

    "pages/supdem/detialInfo/detialInfo",

    "pages/supdem/exhibit/exhibit",

    "pages/supdem/mydetialInfo/mydetialInfo",

    "pages/supdem/myexhibit/myexhibit",

    "pages/supdem/supdem",

    "pages/video/detail/index",

    "pages/video/list/index"

    ],

    "window": {

    "navigationBarBackgroundColor": "#fff",

    "navigationBarTitleText": "阳光在线旅游222222",

    "navigationBarTextStyle": "black",

    "enablePullDownRefresh": true

    },

    "subPackages": [

    {

    "root": "packageA",

    "pages": [

    "pages/community/complaints/index",

    "pages/community/index/index",

    "pages/community/list/Essencearea/index",

    "pages/community/list/Relatedsections/index",

    "pages/community/list/index/index",

    "pages/community/p_topic/index",

    "pages/community/person/center",

    "pages/community/plate/index",

    "pages/community/topic/index"

    ]

    }

    ],

    "tabBar": {

    "list": [

    {

    "pagePath": "pages/index/index",

    "iconPath": "images/icon_home.png",

    "selectedIconPath": "images/icon_home_selected.png",

    "text": "首页"

    },

    {

    "pagePath": "pages/category/category",

    "iconPath": "images/icon_cate.png",

    "selectedIconPath": "images/icon_cate_selected.png",

    "text": "分类"

    },

    {

    "pagePath": "pages/cart/cart",

    "iconPath": "images/icon_cart.png",

    "selectedIconPath": "images/icon_cart_selected1.png",

    "text": "购物车"

    },

    {

    "pagePath": "pages/member/index/index",

    "iconPath": "images/icon_member.png",

    "selectedIconPath": "images/icon_member_selected.png",

    "text": "我"

    }

    ]

    },

    "ext": {

    "new": 3,

    "uniacid": "8419",

    "tabBarPage": [

    "/pages/index/index",

    "/pages/category/category",

    "/pages/cart/cart",

    "/pages/member/index/index"

    ]

    }

    }


    2018-02-07
    赞同
    回复

正在加载...