小程序二:配置

1.app页面配置,放在最上面的,最先显示 control最先显示

 "pages":[
   "pages/control/control""pages/index/index"
    "pages/logs/logs",
   
  ],

2.tabBar配置  但是有个问题,就是直接安底部的时候,可以切换。

  "pages":[
    "pages/index/index",
    "pages/logs/logs",
    "pages/control/control"
  ],
  "tabBar": {
    "list": [{
      "pagePath": "pages/index/index",
      "text": "首页"
    }, {
      "pagePath": "pages/logs/logs",
      "text": "日志"
    }, {
      "pagePath": "pages/control/control",
      "text": "peiz"
    }
    ]
  },

 

index.wxml
<
view class="container"> <view class="usermotto" bindtap="bindViewTap"> <text class="user-motto">{{motto}}</text> </view> </view> <navigator url="../logs/logs">按钮</navigator>

index.js

  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  }

 

 

二:独立页面配置->control.json 的作用是为了覆盖app的全局配置。但好像现在只能覆盖window里面的属性

posted @ 2017-02-16 11:26  小货盘啦  阅读(163)  评论(0编辑  收藏  举报