z***@gmail.com
z***@gmail.com
  • 发布:2020-01-07 11:21
  • 更新:2020-01-07 16:31
  • 阅读:826

Hbuilder 更新到2.5.1之后App,微信小程序运行均出现问题。

分类:HBuilderX

将 Hbuilder 更新到2.5.1之后 运行微信小程序 编译后的app.json 在page属性前面会莫名奇妙的出现一个“}”。


运行App 出现的错误

似乎是pages.json的原因,我把分包给注释之后 发现有时候可以运行。
代码如下

{  
    "pages": [{  
            "path": "pages/index/index",  
            "style": {  
                "app-plus": {  
                    "titleNView": false  
                }  
            }  
        },  
        {  
            "path": "pages/login/index",  
            "style": {  
                "navigationBarTitleText": "登陆页面"  
            }  
        }, {  
            "path": "pages/shopping/index",  
            "style": {  
                "navigationBarTitleText": "商城",  
                "app-plus": {  
                    "titleNView": false  
                }  
            }  
        }, {  
            "path": "pages/mine/index",  
            "style": {  
                "app-plus": {  
                    "titleNView": false  
                }  
            }  
        }, {  
            "path": "pages/neighbour/index",  
            "style": {  
                "navigationBarTitleText": "邻里"  
            }  
        }, {  
            "path": "pages/noticeList/index",  
            "style": {  
                "navigationBarTitleText": "公告通知",  
                "enablePullDownRefresh": true  
            }  
        }, {  
            "path": "pages/noticeInfo/index",  
            "style": {  
                "navigationBarTitleText": "公告详情"  
            }  
        }, {  
            "path": "pages/points/index",  
            "style": {  
                "navigationBarTitleText": "我的美豆",  
                "app-plus": {  
                    "titleNView": false  
                }  
            }  
        }, {  
            "path": "pages/complaint/index",  
            "style": {  
                "navigationBarTitleText": "投诉"  
            }  
        },  
        {  
            "path": "pages/provideThings/index",  
            "style": {  
                "navigationBarTitleText": "报事"  
            }  
        },  
        {  
            "path": "pages/provideRepair/index",  
            "style": {  
                "navigationBarTitleText": "报修"  
            }  
        },  
        {  
            "path": "pages/messageInfo/index",  
            "style": {  
                "navigationBarTitleText": "消息详情",  
                "enablePullDownRefresh": true  
            }  
        }, {  
            "path": "pages/messageList/index",  
            "style": {  
                "navigationBarTitleText": "消息列表"  
            }  
        }, {  
            "path": "pages/outPage/index"  
        }  
    ],  
    "tabBar": {  
        "color": "#BBBBBB",  
         //#ifdef APP-PLUS  
        "borderStyle": "#eeeeee",  
        // #endif  
        "backgroundColor": "#ffffff",  
        "selectedColor":"#FF5741",  
        "list": [{  
                "pagePath": "pages/index/index",  
                "iconPath": "static/tabBar/shouye-weixuanzhong.png",  
                "selectedIconPath": "static/tabBar/shouye.png",  
                "text": "首页"  
            }, {  
                "pagePath": "pages/shopping/index",  
                "iconPath": "static/tabBar/shopping.png",  
                "selectedIconPath": "static/tabBar/shopping-active.png",  
                "text": "商城"  
            },  
            {  
                "pagePath": "pages/neighbour/index",  
                "iconPath": "static/tabBar/linli-weixuanzhong.png",  
                "selectedIconPath": "static/tabBar/linli.png",  
                "text": "邻里"  
            },  
            {  
                "pagePath": "pages/mine/index",  
                "iconPath": "static/tabBar/wode-weixuanzhong.png",  
                "selectedIconPath": "static/tabBar/wode.png",  
                "text": "我的"  
            }  
        ]  
    },  
    "globalStyle": {  
        "navigationBarTextStyle": "black",  
        "navigationBarTitleText": "居居鸟",  
        "navigationBarBackgroundColor": "#FFFFFF",  
        "backgroundColor": "#F7F7F7"  
    },  
    "subPackages": [{  
        "root": "shopping",  
        "pages": [{  
                "path": "paymentList/index",  
                "style": {  
                    "navigationBarTitleText": "缴费列表"  
                }  
            }, {  
                "path": "payment/index",  
                "style": {  
                    "navigationBarTitleText": "缴费"  
                }  
            },  
            {  
                "path": "payFail/index",  
                "style": {  
                    "navigationBarTitleText": "支付失败"  
                }  
            }, {  
                "path": "paySuccess/index",  
                "style": {  
                    "navigationBarTitleText": "支付成功"  
                }  
            },  
            {  
                "path": "commodityList/index",  
                "style": {  
                    "enablePullDownRefresh": true,  
                    "navigationBarTitleText": "商品列表",  
                    "app-plus": {  
                        "titleNView": {  
                            "searchInput": {  
                                "placeholder": "请输入",  
                                "backgroundColor": "#F7F7F7",  
                                "borderRadius": "2px"  
                            }  
                        }  
                    }  
                }  
            }, {  
                "path": "commodityInfo/index",  
                "style": {  
                    "navigationBarTitleText": "商品详情",  
                    "app-plus": {  
                        "titleNView": false  
                    }  
                }  
            }, {  
                "path": "addOrder/index",  
                "style": {  
                    "navigationBarTitleText": "确认订单"  
                }  
            }, {  
                "path": "shoppingCart/index",  
                "style": {  
                    "navigationBarTitleText": "购物车"  
                }  
            }, {  
                "path": "addAddress/index",  
                "style": {  
                    "navigationBarTitleText": "添加收货地址"  
                }  
            }, {  
                "path": "deliveryAddress/index",  
                "style": {  
                    "navigationBarTitleText": "收货地址管理"  
                }  
            }, {  
                "path": "evaluation/index",  
                "style": {  
                    "navigationBarTitleText": "商品评价"  
                }  
            }  
        ]  
    }, {  
        "root": "neighbour",  
        "pages": [{  
            "path": "addBbs/index",  
            "style": {  
                "navigationBarTitleText": "发布话题"  
            }  
        }, {  
            "path": "bbsInfo/index",  
            "style": {  
                "navigationBarTitleText": "详情"  
            }  
        }, {  
            "path": "hotBBs/index",  
            "style": {  
                "navigationBarTitleText": "热门话题"  
            }  
        }]  
    }, {  
        "root": "mine",  
        "pages": [{  
                "path": "aboutUs/index",  
                "style": {  
                    "navigationBarTitleText": "关于我们"  
                }  
            },  
            {  
                "path": "userInfo/index",  
                "style": {  
                    "navigationBarTitleText": "个人信息"  
                }  
            },  
            {  
                "path": "editUserImg/index",  
                "style": {  
                    "navigationBarTitleText": "修改头像"  
                }  
            },  
            {  
                "path": "editPhoneNumber/index",  
                "style": {  
                    "navigationBarTitleText": "修改手机号"  
                }  
            },  
            {  
                "path": "editNickName/index",  
                "style": {  
                    "navigationBarTitleText": "修改昵称"  
                }  
            },  
            {  
                "path": "bindHouse/index",  
                "style": {  
                    "navigationBarTitleText": "我的房产"  
                }  
            },  
            {  
                "path": "paymentBill/index",  
                "style": {  
                    "navigationBarTitleText": "缴费记录"  
                }  
            },  
            {  
                "path": "getVillage/index",  
                "style": {  
                    "navigationBarTitleText": "选择社区"  
                }  
            },  
            {  
                "path": "selectUnit/index",  
                "style": {  
                    "navigationBarTitleText": "选择座栋单元"  
                }  
            },  
            {  
                "path": "operationHouse/index",  
                "style": {  
                    "navigationBarTitleText": "房产详情"  
                }  
            },  
            {  
                "path": "houseIdentity/index",  
                "style": {  
                    "navigationBarTitleText": "身份选择"  
                }  
            },  
            {  
                "path": "complaintList/index",  
                "style": {  
                    "navigationBarTitleText": "我的投诉"  
                }  
            },  
            {  
                "path": "setUp/index",  
                "style": {  
                    "navigationBarTitleText": "设置"  
                }  
            },  
            {  
                "path": "myOrderList/index",  
                "style": {  
                    "navigationBarTitleText": "订单列表"  
                }  
            },{  
                "path": "appraise/index",  
                "style": {  
                    "navigationBarTitleText": "管家评价"  
                }  
            }  
        ]  
    }, {  
        "root": "house",  
        "pages": [{  

                "path": "index/index",  
                "style": {  
                    "navigationBarTitleText": "美住宅"  
                }  
            },  
            {  
                "path": "newHouse/index",  
                "style": {  
                    "navigationBarTitleText": "新房"  
                }  
            },  
            {  
                "path": "erHouse/index",  
                "style": {  
                    "navigationBarTitleText": "二手房"  
                }  
            },  
            {  
                "path": "rentHouse/index",  
                "style": {  
                    "navigationBarTitleText": "租房"  
                }  
            },  
            {  
                "path": "erDetail/index",  
                "style": {  
                    "navigationBarTitleText": "房屋详情"  
                }  
            },  
            {  
                "path": "newDetail/index",  
                "style": {  
                    "navigationBarTitleText": "房屋详情"  
                }  
            },  
            {  
                "path": "rentDetail/index",  
                "style": {  
                    "navigationBarTitleText": "房屋详情"  
                }  
            },  
            {  
                "path": "sellHouse/index",  
                "style": {  
                    "navigationBarTitleText": "我要卖房"  
                }  
            },  
            {  
                "path": "trust/index",  
                "style": {  
                    "navigationBarTitleText": "我的委托"  
                }  
            },  
            {  
                "path": "rentOut/index",  
                "style": {  
                    "navigationBarTitleText": "我要出租"  
                }  
            },  
            {  
                "path": "map/index",  
                "style": {  
                    "navigationBarTitleText": "地图"  
                }  
            }  
        ]  
    }],  
    "preloadRule": {  
        "pages/index/index": {  
            "network": "all",  
            "packages": ["house"]  
        },  
        "pages/shopping/index": {  
            "network": "all",  
            "packages": ["shopping"]  
        },  
        "pages/mine/index": {  
            "network": "all",  
            "packages": ["mine"]  
        },  
        "pages/neighbour/index": {  
            "network": "all",  
            "packages": ["neighbour"]  
        }  
    }  
}  
2020-01-07 11:21 负责人:无 分享
已邀请:
DCloud_uni-ad_HDX

DCloud_uni-ad_HDX

这个问题需要提供测试工程

该问题目前已经被锁定, 无法添加新回复