收藏
回答

第三方模板开发系统BUG:tab会以模板小程序的pages顺序加载




公司名称

xxx

MP帐号(邮箱)

xxx

开发者微信号

yawn2011

机型(如iPhone 6s plus)

iphone6

操作系统(如iOS 9.3)

iOS 9.2.1

是否必现

出现时间


操作路径(即如何操作可以复现该问题)


问题描述(具体问题介绍)

三方开发文档说明模板小程序开发配置替换时,app.json中的pages会被替换。经测试,能过模板小程序生成的小程序和tabs确实被替换,但是pages的顺序还是模板小程序的顺序。

比如模板小程序的pages为:{

"pages/comm/storePage0/storePage0"}

生成小程序的pages为:{

"pages/comm/classify/classify",

"pages/comm/storePage1/storePage1",

"pages/comm/personal/personal",

"pages/comm/bookshelf/bookshelf"

}

生成小程的tabs.list为:{

{

"list": [

 {

   "text": "图书",

   "iconPath": "images/tabicons/ic_my_default.png",

   "selectedIconPath": "images/tabicons/ic_my.png",

   "pagePath": "pages/comm/classify/classify"

 },

 {

   "text": "课程",

   "iconPath": "images/tabicons/ic_bookshelf_default.png",

   "selectedIconPath": "images/tabicons/ic_bookshelf.png",

   "pagePath": "pages/comm/storePage1/storePage1"

 },

 {

   "text": "我",

   "iconPath": "images/tabicons/ic_my_default.png",

   "selectedIconPath": "images/tabicons/ic_my.png",

   "pagePath": "pages/comm/personal/personal"

 },

 {

   "text": "书架",

   "iconPath": "images/tabicons/ic_bookshelf_default.png",

   "selectedIconPath": "images/tabicons/ic_bookshelf.png",

   "pagePath": "pages/comm/bookshelf/bookshelf"

 }

]

}


如上生成小程序的pages顺序和tab.list的顺序是一致的,tab上也没有classify,通过预览二维码体验小程序的时候通过Log查看onReady的是pages/comm/classify/classify,但是第一个tab实际执行的是pages/comm/storePage0/storePage0的代码逻辑,即按照了模板小程序的pages渲染了,我生成的小程序的tabs里面并没有storePage0,如下图

问题截图(客户端问题界面截图)

代码片段截图

生成小程序的代码为配置为:

{

 "extAppid": "wx3e8d9bd805eae3e7",

 "pages": [

   "pages/comm/classify/classify",

   "pages/comm/storePage1/storePage1",

   "pages/comm/personal/personal",

   "pages/comm/bookshelf/bookshelf",

   "pages/comm/storePage0/storePage0",

   "pages/index/index",

   "pages/logs/logs",

   "pages/swiperpage/swiperpage",

   "pages/gird/gird",

   "pages/pay/pay",

   "pages/comm/qrscan/qrscan",

   "pages/comm/bookdetail/bookdetail",

   "pages/comm/editInformation/editInformation",

   "pages/comm/resview/videoplay/videoplay",

   "pages/comm/resview/soundplay/soundplay",

   "pages/comm/booklist/booklist",

   "pages/comm/courseDetail/courseDetail",

   "pages/comm/resourceList/resourceList",

   "pages/comm/resview/reslist/reslist",

   "pages/comm/resview/reslive/reslive",

   "pages/comm/bookdetailIntro/bookdetailIntro",

   "pages/comm/myAccount/myAccount",

   "pages/comm/jourlist/jourlist",

   "pages/comm/bought/bought",

   "pages/comm/myCourse/myCourse",

   "pages/comm/empty/empty",

   "pages/comm/storePage/storePage",

   "pages/comm/storePage2/storePage2",

   "pages/comm/storePage3/storePage",

   "pages/comm/storePage4/storePage4"

 ],

 "tabBar": {

   "list": [

     {

       "text": "图书",

       "iconPath": "images/tabicons/ic_my_default.png",

       "selectedIconPath": "images/tabicons/ic_my.png",

       "pagePath": "pages/comm/classify/classify"

     },

     {

       "text": "课程",

       "iconPath": "images/tabicons/ic_bookshelf_default.png",

       "selectedIconPath": "images/tabicons/ic_bookshelf.png",

       "pagePath": "pages/comm/storePage1/storePage1"

     },

     {

       "text": "我",

       "iconPath": "images/tabicons/ic_my_default.png",

       "selectedIconPath": "images/tabicons/ic_my.png",

       "pagePath": "pages/comm/personal/personal"

     },

     {

       "text": "书架",

       "iconPath": "images/tabicons/ic_bookshelf_default.png",

       "selectedIconPath": "images/tabicons/ic_bookshelf.png",

       "pagePath": "pages/comm/bookshelf/bookshelf"

     }

   ]

 },

 "ext": {

   "templateId": "17",

   "appv": "123",

   "miniAppVersion": "2017-08-26 12:19:04",

   "baseHost": "https://wxmini-prepub.bookln.cn",

   "bizAppId": "3",

   "showLogo": "show",

   "channel": "wxMinApp"

 }

}






最后一次编辑于  2017-08-26
回答关注问题邀请回答
收藏

1 个回答

  • 阿白
    阿白
    2017-08-26

    或者说是pages没有替换成功?

    2017-08-26
    有用
    回复
登录 后发表内容