import {dwdEventEventList} from "../../../../utils/statisticsApi"; const App = getApp() Page({ data: { tabList: { addressEvent: { label: "同地点同类型", value: 'addressEvent', type: 1 }, addressMobileEvents: { label: '同区域不同类型', value: 'addressMobileEvents', type: 3 }, mobileEvent: { label: '同一人员', value: 'mobileEvent', type: 2 }, }, pageNo: 1, pageSize: 20, type: "", list: [], total: 0, }, onLoad(options) { this.setData({ type: options.type, data: options.data ? JSON.parse(options.data) : '' }) wx.setNavigationBarTitle({ title: this.data.tabList[options.type].label }) this.getList() }, getList() { dwdEventEventList({ pageNo:this.data.pageNo, pageSize:this.data.pageSize, type: this.data.tabList[this.data.type].type }).then(res => { this.setData({ list: this.data.list.concat(res.data.list), total: res.data.total }) }) }, gotopage(e) { console.log(e) let data = e.currentTarget.dataset.obj if (data.content) { delete data.content } wx.navigateTo({ url: '/subpages/statistics/pages/problem/problem?type='+this.data.type+'&data='+JSON.stringify(data) }) }, onReachBottom() { if (this.data.list.length < this.data.total) { this.setData({ pageNo: this.data.pageNo + 1 }) this.getList() } } });