hailu
2023-12-21 bacb43376528c54d2be88f12ab59fbeb534ea370
GoldC/pages/problemListwx/problemListwx.js
@@ -47,7 +47,6 @@
    info2: 0,
    info3: 0,
    info4: 0,
  },
  lifetimes: {
    // 在组件实例进入页面节点树时执行
@@ -106,20 +105,20 @@
  //更改页码点击事件
  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,
      })
@@ -137,6 +136,7 @@
    this.getList()
    this.triggerParent();
   
  },
  //下一页点击事件
  nextPage: function () {
@@ -162,7 +162,7 @@
    this.triggerParent();
    // 更新按钮状态
  },
  changeActive1(e) {
    console.log(e.detail.index);
@@ -396,8 +396,8 @@
    })
  },
  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: {
@@ -405,14 +405,13 @@
        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