|
@@ -15,6 +15,10 @@ Page({
|
|
|
if (route) wx.redirectTo({ url: `/${route}` })
|
|
|
},
|
|
|
toView: function (e) {
|
|
|
+ const that = this;
|
|
|
+ that.setData({ skip: 0 })
|
|
|
+ that.setData({ page: 0 })
|
|
|
+ that.setData({ list: [] })
|
|
|
let { item } = e.currentTarget.dataset;
|
|
|
wx.navigateTo({ url: `/pages/topic/info?id=${item._id}` })
|
|
|
},
|
|
@@ -40,12 +44,10 @@ Page({
|
|
|
// 监听用户是否登录
|
|
|
watchLogin: async function () {
|
|
|
const that = this;
|
|
|
- let searchInfo = that.data.searchInfo;
|
|
|
wx.getStorage({
|
|
|
key: 'user',
|
|
|
success: async (res) => {
|
|
|
- let info = { skip: that.data.skip, limit: that.data.limit };
|
|
|
- if (searchInfo && searchInfo.title) info.title = searchInfo.title;
|
|
|
+ let info = { skip: that.data.skip, limit: that.data.limit, is_show: '0' };
|
|
|
const arr = await app.$get(`/newCourt/api/topic`, { ...info });
|
|
|
if (arr.errcode == '0') { that.setData({ list: [...that.data.list, ...arr.data] }); that.setData({ total: arr.total }); }
|
|
|
else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
|