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.

52 lines
1.5 KiB

// index.js
// 获取应用实例
const app = getApp()
Page({
data: {
4 years ago
active: 1,
refresher: false,
4 years ago
tabList:[{id:1,name:'已挂牌'},{id:2,name:'拟挂牌'},{id:3,name:'土地推介'},{id:4,name:'报告'},{id:5,name:'研究'}],
list:[],
},
onReady(){
this.refresh()
},
4 years ago
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
})
}
4 years ago
},
tabDowm(e){
let active = e.currentTarget.dataset.id
if(active!==this.data.active){
this.setData({active,list:[]})
this.refresh()
4 years ago
}
},
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)
}
})