Skip to content

Commit

Permalink
Merge pull request #549 from fengdejiyi712/master
Browse files Browse the repository at this point in the history
#5 #36 第5次实验代码
  • Loading branch information
zengsn authored Dec 19, 2017
2 parents 77b9517 + c9ea23f commit 24d33dc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions 1514080901222/pages/visit/visit.js
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

})
}
})


}
})
1 change: 1 addition & 0 deletions 1514080901222/pages/visit/visit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions 1514080901222/pages/visit/visit.wxml
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.

0 comments on commit 24d33dc

Please sign in to comment.