You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
51 lines
1.5 KiB
// index.js |
|
// 获取应用实例 |
|
const app = getApp() |
|
|
|
Page({ |
|
data: { |
|
active: 1, |
|
refresher: false, |
|
tabList:[{id:1,name:'已挂牌'},{id:2,name:'拟挂牌'},{id:3,name:'土地推介'},{id:4,name:'报告'},{id:5,name:'研究'}], |
|
list:[], |
|
}, |
|
onReady(){ |
|
this.refresh() |
|
}, |
|
comeDetail(e){ |
|
let id = e.currentTarget.dataset.id |
|
wx.navigateTo({ |
|
url: `../air-report/air-report?id=${id}`, |
|
}) |
|
}, |
|
onShow(){ |
|
if (typeof this.getTabBar === 'function' && |
|
this.getTabBar()) { |
|
this.getTabBar().setData({ |
|
selected: 2 |
|
}) |
|
} |
|
}, |
|
tabDowm(e){ |
|
let active = e.currentTarget.dataset.id |
|
if(active!==this.data.active){ |
|
this.setData({active,list:[]}) |
|
this.refresh() |
|
} |
|
}, |
|
getList(){ |
|
let list = this.data.list.concat(this.data.list); |
|
this.setData({list}) |
|
}, |
|
refresh(){ |
|
let list = [ |
|
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:1}, |
|
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:2}, |
|
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:3}, |
|
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:2}, |
|
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:3}, |
|
{title:'CQ210003-九龙坡区大桥石S区十组245-2',timer:'2021/01/01',state:1}, |
|
] |
|
setTimeout(()=>{this.setData({list,refresher:false})},200) |
|
} |
|
})
|
|
|