ringo_sheena
ringo_sheena
  • 发布:2023-09-23 19:46
  • 更新:2023-09-23 19:49
  • 阅读:451

Error: pages.json解析失败,不符合 json 规范 19:42:08.638 Unexpected end of JSON input

分类:HBuilderX

pages.json 修改一下,保存就报这个错,真是无语了,这个文件的检测是读取的缓存吗?
没错也要报错,重启软件都没用

{  
    "tabBar": {  
        "color": "#333333",  
        "selectedColor": "#f67c2b",  
        "borderStyle": "black",  
        "backgroundColor": "#ffffff",  
        "fontSize": "12px",  
        "iconWidth": "20px",  
        "spacing": "3px",  
        "list": [{  
                "pagePath": "pages/index/index",  
                "iconPath": "static/tabbar/home.png",  
                "selectedIconPath": "static/tabbar/home-active.png",  
                "text": "%page.title.index%"  
            },  
            {  
                "pagePath": "pages/vip/vip",  
                "iconPath": "static/tabbar/vip.png",  
                "selectedIconPath": "static/tabbar/vip-active.png",  
                "text": "%page.title.vip%"  
            },  
            {  
                "pagePath": "pages/my/my",  
                "iconPath": "static/tabbar/my.png",  
                "selectedIconPath": "static/tabbar/my-active.png",  
                "text": "%page.title.my%"  
            }  
        ]  
    },  
    "pages": [{  
            "path": "pages/index/index",  
            "style": {  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/vip/vip",  
            "style": {  
                "enablePullDownRefresh": true  
            }  
        },  
        {  
            "path": "pages/vip/open",  
            "style": {  
                "navigationBarTitleText": "%page.title.vipOpen%",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/vip/rule",  
            "style": {  
                "navigationBarTitleText": "%page.title.vipRule%",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/my/my",  
            "style": {  
                "navigationStyle": "custom",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/notice/notice",  
            "style": {  
                "navigationBarTitleText": "%page.title.notice%",  
                "enablePullDownRefresh": true  
            }  
        },  
        // {  
        //  "path": "pages/notice/detail",  
        //  "style": {  
        //      "navigationBarTitleText": "详情",  
        //      "enablePullDownRefresh": false,  
        //      "app-plus": {  
        //          "bounce": "none"  
        //      }  
        //  }  
        // },  
        {  
            "path": "pages/sign/sign",  
            "style": {  
                "navigationBarTitleText": "%page.title.sign%",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/wallet/wallet",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.wallet%"  
            }  
        },  
        {  
            "path": "pages/wallet/detail",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.walletDetail%"  
            }  
        },  
        {  
            "path": "pages/wallet/bank",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.bank%"  
            }  
        },  
        // #ifdef APP-PLUS  
        {  
            "path": "pages/wallet/pay",  
            "style": {  
                "navigationBarTitleText": "%page.title.recharge%",  
                "enablePullDownRefresh": false  
            }  
        },  
        // #endif  
        {  
            "path": "pages/recharge/recharge",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.recharge%"  
            }  
        },  
        {  
            "path": "pages/withdraw/withdraw",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.withdarw%"  
            }  
        },  
        {  
            "path": "pages/team/team",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.team%"  
            }  
        },  
        {  
            "path": "pages/invite/invite",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.invite%"  
            }  
        },  
        {  
            "path": "pages/invite/logs",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.inviteList%"  
            }  
        },  
        {  
            "path": "pages/setting/setting",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.setting%"  
            }  
        },  
        {  
            "path": "pages/setting/nickname",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.updateNick%"  
            }  
        },  
        {  
            "path": "pages/setting/pwd",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.updatePwd%"  
            }  
        },  
        {  
            "path": "pages/webview/webview",  
            "style": {  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/guide/guide",  
            "style": {  
                "navigationBarTitleText": "%page.title.guide%",  
                "enablePullDownRefresh": false  
            }  
        },  
        {  
            "path": "pages/login/login",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.login%"  
            }  
        },  
        {  
            "path": "pages/reg/reg",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.reg%"  
            }  
        },  
        {  
            "path": "pages/agr/agr",  
            "style": {  
                "enablePullDownRefresh": false,  
                "navigationBarTitleText": "%page.title.agr%"  
            }  
        }  
        // , {  
        //  "path": "pages/pet/pet",  
        //  "style": {  
        //      "enablePullDownRefresh": false,  
        //      "navigationBarTitleText": "%page.title.pet%"  
        //  }  
        // }  
    ],  
    "globalStyle": {  
        // #ifdef H5  
        "maxWidth": 750,  
        "rpxCalcMaxDeviceWidth": 750, // rpx 计算所支持的最大设备宽度,单位 px,默认值为 960  
        "rpxCalcBaseDeviceWidth": 560, // rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位 px,默认值为 375  
        "rpxCalcIncludeWidth": 9999, // rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位 rpx,默认值为 750  
        // #endif  
        "navigationBarTextStyle": "black",  
        "navigationBarTitleText": "%app.name%",  
        "navigationBarBackgroundColor": "#fff",  
        "backgroundColor": "#fff"  
    },  
    "easycom": {  
        "autoscan": true,  
        "custom": {  
            "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"  
        }  
    },  
    "condition": { //模式配置,仅开发期间生效  
    },  
    "uniIdRouter": {}  
}
2023-09-23 19:46 负责人:无 分享
已邀请:
ringo_sheena

ringo_sheena (作者)

我拿vscode 打开项目,保存了一下 pages.json,再用 HbuilderX 打开就好了
这个检测机制是不是有问题,麻烦优化下吧
这种bug,简直让人摸不着头脑,没错也报错

要回复问题请先登录注册