| | |
| | | info2: 0, |
| | | info3: 0, |
| | | info4: 0, |
| | | |
| | | }, |
| | | lifetimes: { |
| | | // 在组件实例进入页面节点树时执行 |
| | |
| | | //更改页码点击事件 |
| | | onChangePage: function (e) { |
| | | //console.log("更改页码事件:",e); |
| | | |
| | | |
| | | this.setData({ |
| | | pageMask: false, |
| | | index: e.currentTarget.dataset.index //点击的页数 |
| | | }) |
| | | this.getList() |
| | | // 先判断当前页数,是否需要更新disabled的状态 |
| | | |
| | | |
| | | this.triggerParent(); |
| | | }, |
| | | //上一页点击事件 |
| | | prevPage: function () { |
| | | |
| | | if (this.data.index <= 1) { |
| | | if (this.data.index <= 1) { |
| | | this.setData({ |
| | | prevBtnDis: false, |
| | | }) |
| | |
| | | this.getList() |
| | | this.triggerParent(); |
| | | |
| | | |
| | | }, |
| | | //下一页点击事件 |
| | | nextPage: function () { |
| | |
| | | this.triggerParent(); |
| | | |
| | | // 更新按钮状态 |
| | | |
| | | |
| | | }, |
| | | changeActive1(e) { |
| | | console.log(e.detail.index); |
| | |
| | | }) |
| | | }, |
| | | goAddress(e) { |
| | | let that=this |
| | | var address = e.currentTarget.dataset.base.address |
| | | console.log(e.currentTarget.dataset); |
| | | wx.request({ |
| | | url: 'https://apis.map.qq.com/ws/geocoder/v1/', |
| | | data: { |
| | |
| | | key: 'SRGBZ-FLCKU-2TIVH-BFHUM-D5CTO-LFBHQ' |
| | | }, |
| | | success: function (res) { |
| | | if (res.data.status != 200) { |
| | | if (res.data.status != 0) { |
| | | wx.showToast({ |
| | | title: res.data.message, |
| | | icon: 'error' |
| | | }) |
| | | return false |
| | | } |
| | | console.log(res.data.result.location); // 打印出经纬度 |
| | | let params = res.data.result.location |
| | | params.name = e.currentTarget.dataset.base.userName |
| | | params.address = e.currentTarget.dataset.base.address |