Skip to content

Commit

Permalink
add data
Browse files Browse the repository at this point in the history
  • Loading branch information
jjz committed Mar 27, 2017
1 parent 499745d commit 8bed451
Showing 10 changed files with 78 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@
"pages/icon/icon",
"pages/text/text",
"pages/progress/progress",
"pages/calculator/calculator"
"pages/calculator/calculator",
"pages/data/data"
],
"window": {
"backgroundTextStyle": "light",
41 changes: 41 additions & 0 deletions pages/data/data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Page({
data:{
String1
},
onLoad:function(options){
// 生命周期函数--监听页面加载
String2
},
onReady:function(){
// 生命周期函数--监听页面初次渲染完成
String3
},
onShow:function(){
// 生命周期函数--监听页面显示
String4
},
onHide:function(){
// 生命周期函数--监听页面隐藏
String5
},
onUnload:function(){
// 生命周期函数--监听页面卸载
String6
},
onPullDownRefresh: function() {
// 页面相关事件处理函数--监听用户下拉动作
String7
},
onReachBottom: function() {
// 页面上拉触底事件的处理函数
String8
},
onShareAppMessage: function() {
// 用户点击右上角分享
return {
title: 'title', // 分享标题
desc: 'desc', // 分享描述
path: 'path' // 分享路径
}
}
})
3 changes: 3 additions & 0 deletions pages/data/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "data"
}
Empty file added pages/data/data.wxml
Empty file.
Empty file added pages/data/data.wxss
Empty file.
3 changes: 0 additions & 3 deletions pages/flex/flex.js
Original file line number Diff line number Diff line change
@@ -13,8 +13,5 @@ Page({
},
onHide:function(){
// 页面隐藏
},
onUnload:function(){
// 页面关闭
}
})
6 changes: 5 additions & 1 deletion pages/flex/flex.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"navigationBarTitleText":"flex布局"
"navigationBarTitleText":"flex布局",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle":"white",
"backgroundTextStyle":"dark",
"enablePullDownRefresh":"true"
}
26 changes: 25 additions & 1 deletion pages/index/index.js
Original file line number Diff line number Diff line change
@@ -37,6 +37,11 @@ Page({
url: "../calculator/calculator"
})
},
onDataClick:function(){
wx.navigateTo({
url: '../data/data',
})
},
onLoad: function () {
console.log('onLoad')
var that = this
@@ -47,5 +52,24 @@ Page({
userInfo: userInfo
})
})
}
},onReady:function(){
// 页面渲染完成
},
onShow:function(){
// 页面显示
},
onHide:function(){
// 页面隐藏
},
onUnload:function(){
// 页面关闭
},
onPullDownRefresh: function() {

},onReachBottom: function() {
// Do something when page reach bottom.
},
onShareAppMessage: function () {
// return custom share data when user share.
},
})
1 change: 1 addition & 0 deletions pages/index/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions pages/index/index.wxml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
<button type="default" bindtap="onTextClick">text</button>
<button type="default" bindtap="onProgressClick">progress</button>
<button type="default" bindtap="onCalculator">Calculator</button>
<button type="default" bindtap="onDataClick">Data</button>
</view>

<view class="usermotto">

0 comments on commit 8bed451

Please sign in to comment.