-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,7 @@ Page({ | |
scrollTop: 100, | ||
windowHeight: 0, | ||
inputVal:'', | ||
moodList: [{ id: 0, content: '开心,今天真的是元气满满的一天。', img: '', time: '2016年10月2日 00:80' }, | ||
{ id: 1, content: '啊,好像要下雨了,我可以选择品读一本书静静地听雨了', img: '', time: '2012年10月2日 00:80' }, | ||
{ id: 2, content: '[email protected],这个是我的邮箱哦', img: '', time: '2010年10月2日 00:80' }, | ||
{ id: 2, content: '[email protected],这个是我的邮箱哦', img: '', time: '2010年10月2日 00:80' }, | ||
{ id: 2, content: '[email protected],这个是我的邮箱哦', img: '', time: '2010年10月2日 00:80' }, | ||
{ id: 2, content: '[email protected],这个是我的邮箱哦', img: '', time: '2010年10月2日 00:80' }, | ||
{ id: 2, content: '[email protected],这个是我的邮箱哦', img: '', time: '2010年10月2日 00:80' }] | ||
moodList: [] | ||
}, | ||
showInput: function () { | ||
this.setData({ | ||
|
@@ -46,6 +40,19 @@ Page({ | |
}, | ||
onLoad: function (options) { | ||
var _this = this; | ||
wx.request({ | ||
url: 'https://infoaas.com/data/1514080901221/moodList.json', | ||
header: { | ||
'content-type': 'application/json' // 默认值 | ||
}, | ||
success: function (res) { | ||
console.log(res.data); | ||
_this.setData({ | ||
moodList: res.data.moodList | ||
}); | ||
} | ||
}) | ||
|
||
wx.getSystemInfo({ | ||
success: function (res) { | ||
console.log(res.windowHeight); | ||
|