Skip to content

Commit

Permalink
Merge pull request #550 from lwYU/master
Browse files Browse the repository at this point in the history
#5 157 第五次实验代码
  • Loading branch information
zengsn authored Dec 19, 2017
2 parents 24d33dc + 979adc8 commit 954e663
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions 1514080901111/pages/sy/sy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Page({
inputVal: "",
/************ */
ranks: [
{ title: 1, text: "类型1"},
/* { title: 1, text: "类型1"},
{ type: 2, text: "类型2" },
{ type: 3, text: "类型3" },
{ type: 4, text: "类型4" },
{ type: 5, text: "类型5" },

*/
],
//scroll-view变量start
windowHeight: 0,
Expand Down Expand Up @@ -67,6 +67,22 @@ Page({

}),
})
// 从服务器取回来 JSON
wx.request({
url: 'https://infoaas.com/data/1514080901128/ComicNew.json',
//仅为示例,并非真实的接口地址
data: {},
header: {
'content-type': 'application/json' // 默认值
},
success: function (res) {
//console.log(res.data.list)
that.setData({
hasError: true,
ranks: res.data.list
})
}
})
},


Expand Down
2 changes: 1 addition & 1 deletion 1514080901111/pages/sy/sy.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<scroll-view scroll-y style="height: {{windowHeight}}px;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">
<view class="weui-panel weui-panel_access">
<block wx:for="{{ranks}}" wx:key="{{item.type}}" >
<view class="weui-panel__hd">{{item.text}}</view>
<view class="weui-panel__hd">{{item.CNtitle}}</view>
<view class="weui-panel__bd">
<navigator url="" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
Expand Down

0 comments on commit 954e663

Please sign in to comment.