|
|
@ -6,6 +6,7 @@ Page({ |
|
|
* 页面的初始数据 |
|
|
* 页面的初始数据 |
|
|
*/ |
|
|
*/ |
|
|
data: { |
|
|
data: { |
|
|
|
|
|
loading: true, |
|
|
repos: [], |
|
|
repos: [], |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
pageSize: 10, |
|
|
pageSize: 10, |
|
|
@ -54,12 +55,14 @@ Page({ |
|
|
//最后一页数据添加
|
|
|
//最后一页数据添加
|
|
|
that.setData({ |
|
|
that.setData({ |
|
|
repos: lists.concat(respList), |
|
|
repos: lists.concat(respList), |
|
|
|
|
|
loading: false, |
|
|
hasMoreData: false |
|
|
hasMoreData: false |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
repos: lists.concat(respList), |
|
|
repos: lists.concat(respList), |
|
|
hasMoreData: true, |
|
|
hasMoreData: true, |
|
|
|
|
|
loading: false, |
|
|
pageNum: that.data.pageNum + 1 |
|
|
pageNum: that.data.pageNum + 1 |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -69,6 +72,9 @@ Page({ |
|
|
icon: 'none', |
|
|
icon: 'none', |
|
|
duration: 1000 |
|
|
duration: 1000 |
|
|
}); |
|
|
}); |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
loading: false, |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
fail: function (e) { |
|
|
fail: function (e) { |
|
|
@ -78,9 +84,13 @@ Page({ |
|
|
icon: 'none', |
|
|
icon: 'none', |
|
|
duration: 1000 |
|
|
duration: 1000 |
|
|
}); |
|
|
}); |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
loading: false, |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
complete: function (res) { |
|
|
complete: function (res) { |
|
|
// complete
|
|
|
// complete
|
|
|
|
|
|
that.data.loading = false |
|
|
wx.hideNavigationBarLoading() //完成停止加载
|
|
|
wx.hideNavigationBarLoading() //完成停止加载
|
|
|
wx.stopPullDownRefresh() //停止下拉刷新
|
|
|
wx.stopPullDownRefresh() //停止下拉刷新
|
|
|
}, |
|
|
}, |
|
|
@ -117,17 +127,16 @@ Page({ |
|
|
|
|
|
|
|
|
switchType: function (activityType) { |
|
|
switchType: function (activityType) { |
|
|
switch (activityType) { |
|
|
switch (activityType) { |
|
|
case 10: return '拼团' |
|
|
|
|
|
case 20: return '砍价' |
|
|
|
|
|
case 30: return '抽奖' |
|
|
|
|
|
|
|
|
case 10: return '../../images/icon_pintuan.png' |
|
|
|
|
|
case 20: return '../../images/icon_kanjia.png' |
|
|
|
|
|
case 30: return '../../images/icon_duobao.png' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
switchImg: function (status) { |
|
|
switchImg: function (status) { |
|
|
switch (status) { |
|
|
switch (status) { |
|
|
case 0: return '../../images/icon_task_finish.png' |
|
|
|
|
|
case 20: return '../../images/icon_task_finish.png' |
|
|
case 20: return '../../images/icon_task_finish.png' |
|
|
case 90: return '../../images/icon_task_finish.png' |
|
|
|
|
|
|
|
|
case 90: return '../../images/icon_task_fail.png' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|