搞了好久原來是位置的原因唉鬧心
直接上代碼:
出不來的代碼:
-
[html] view plain copy print?在CODE上查看代碼片派生到我的代碼片
-
{
-
"pages": [
-
"pages/splash/splash",
-
"pages/zhuye/zhuye",
-
"pages/list/list",
-
"pages/item/item",
-
"pages/search/search",
-
"pages/profile/profile"
-
],
-
"window": {
-
"navigationBarBackgroundColor": "#35495e",
-
"navigationBarTextStyle": "white",
-
"navigationBarTitleText": "電影 « 豆瓣",
-
"backgroundColor": "#fff",
-
"backgroundTextStyle": "dark",
-
"enablePullDownRefresh": true
-
},
-
"tabBar": {
-
"color": "#ccc",
-
"selectedColor": "#35495e",
-
"borderStyle": "white",
-
"backgroundColor": "#f9f9f9",
-
"list": [
-
{
-
-
"pagePath": "pages/zhuye/zhuye",
-
"iconPath": "images/board.png",
-
"selectedIconPath": "images/board-actived.png",
-
"text": "榜單"
-
},
-
{
-
-
"pagePath": "pages/search/search",
-
"iconPath": "images/search.png",
-
"selectedIconPath": "images/search-actived.png",
-
"text": "搜索"
-
},
-
{
-
-
"pagePath": "pages/profile/profile",
-
"iconPath": "images/profile.png",
-
"selectedIconPath": "images/profile-actived.png",
-
"text": "我的"
-
}
-
]
-
},
-
"networkTimeout": {
-
"request": 10000,
-
"connectSocket": 10000,
-
"uploadFile": 10000,
-
"downloadFile": 10000
-
},
-
"debug": true
-
}
解決方案一:把 tabBar配置中的 "pagePath": "pages/zhuye/zhuye",換成 配置為首頁的pages/splash/splash就可以了;
方案二:完美解決方案 在wxml里 加入 open-type="switchTab"
-
[html] view plain copy print?在CODE上查看代碼片派生到我的代碼片
-
<navigator url="../zhuye/zhuye" open-type="switchTab" >
-
<button class="btn" bindtap="start" wx:if="{{index == movies.length - 1}}" >立即體驗</button>
-
</navigator>
方案三: js里面用這個跳轉(zhuǎn)帶bar的頁面

|