|
|
@@ -27,7 +27,6 @@ Page({
|
|
|
myFormat: ['天', ':', ':', ' '],
|
|
|
list: [],
|
|
|
showNoMore: "没有更多信息...", //显示已无更多
|
|
|
- canIUse: wx.canIUse('button.open-type.getUserInfo'),
|
|
|
},
|
|
|
onLoad: function(options) {
|
|
|
|
|
|
@@ -35,6 +34,23 @@ Page({
|
|
|
onReady: function() {
|
|
|
|
|
|
},
|
|
|
+ onShow: function() {
|
|
|
+ this.start();
|
|
|
+ },
|
|
|
+ start() {
|
|
|
+ let cityName = wx.getStorageSync('city') || '无锡'
|
|
|
+ let cityCode = wx.getStorageSync('cityCode') || '320200';
|
|
|
+ console.log(cityName)
|
|
|
+ console.log(cityCode)
|
|
|
+ this.setData({
|
|
|
+ cityName: cityName,
|
|
|
+ cityCode: cityCode,
|
|
|
+ pageNo: 1, //当前分页
|
|
|
+ isScroll: true, //是否可以滚动
|
|
|
+ list: []
|
|
|
+ })
|
|
|
+ this.fetchList()
|
|
|
+ },
|
|
|
//下拉刷新
|
|
|
onPullDownRefresh: function() {
|
|
|
this.setData({
|
|
|
@@ -52,24 +68,6 @@ Page({
|
|
|
})
|
|
|
this.fetchList()
|
|
|
},
|
|
|
- onShow: function() {
|
|
|
- this.start();
|
|
|
- },
|
|
|
- start() {
|
|
|
- let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡'
|
|
|
- let cityCode = wx.getStorageSync('cityCode') || '320200';
|
|
|
- console.log(cityName)
|
|
|
- console.log(cityCode)
|
|
|
- this.setData({
|
|
|
- cityName: cityName,
|
|
|
- cityCode: cityCode,
|
|
|
- pageNo: 1, //当前分页
|
|
|
- isScroll: true, //是否可以滚动
|
|
|
- list: []
|
|
|
- })
|
|
|
- this.fetchList()
|
|
|
- },
|
|
|
-
|
|
|
//获取拼团列表数据
|
|
|
fetchList() {
|
|
|
if (!this.data.isScroll) {
|