在网上找的资料说是 在app.json中修改就可以了,但按照网上的方法修改后出现了问题:
在开发工具中 初始页面会在MainP中。但真机测试的时候,初始页面就回到userInfo中了。
app.json代码如下:
{
"pages": [
"pages/mainP/mainP",
"pages/userInfo/userInfo",
"pages/machine/machine",
"pages/searching/searching",
"pages/medicineDetail/medicineDetail",
"pages/forceDeletePage/forceDeletePage"
],
"permission": {
"scope.userLocation": {
"desc": "是否允许授权获取当前位置"
}
},
"window": {
"backgroundColor": "#F6F6F6",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#F6F6F6",
"navigationBarTitleText": "BZ",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#a0a0a0",
"selectedColor": "#ec5c30",
"backgroundColor": "#f2f2f2",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/mainP/mainP",
"text": "首页",
"iconPath" : "images/mainPage.png",
"selectedIconPath" : "images/mainPage@selected.png"
},
{
"pagePath": "pages/userInfo/userInfo",
"text": "我的",
"iconPath" : "images/mine.png",
"selectedIconPath": "images/mine@selected.png"
}
]
},
"sitemapLocation": "sitemap.json",
"style": "v2"
}
有没有大佬可以教我如何解决?
https://developers.weixin.qq.com/s/hcvJK7mN7TuQ
看着没什么问题,你要不整段代码片段上来 我们自己扫码测试下