-
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.
Merge pull request #549 from fengdejiyi712/master
- Loading branch information
Showing
4 changed files
with
28 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Page({ | ||
data: { | ||
|
||
}, | ||
onLoad: function () { | ||
var that = this//这句很重要 | ||
wx.request({ | ||
url: 'https://infoaas.com/data/1514080901222/history.json', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
success: function (res) { | ||
//将获取到的json数据,存在名字叫images的这个数组中 | ||
that.setData({ | ||
images: res.data.imagelist, | ||
//res代表success函数的事件对,data是固定的,imagelist是是上面json数据中imagelist | ||
|
||
}) | ||
} | ||
}) | ||
|
||
|
||
} | ||
}) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<view wx:for="{{images}}"mode="aspecFill" style="width: 100%; margin:1rem 0;"> | ||
<image src="{{item.image}}"></image> | ||
</view> |
Empty file.