收藏
回答

onReachBottom 安卓端不触发

线上项目刚出现的问题,求官方解答


最后一次编辑于  2018-10-17  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员-娇华
    社区技术运营专员-娇华
    2018-10-17

    你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2018-10-17
    赞同
    回复
  • A  陈佳辉🏃跑步走
    A 陈佳辉🏃跑步走
    2018-10-17

    所有安卓机型 可关注非诚勿撩和鹿鹿Lite 两款小程序 ios可以滑动,安卓滑不了了

    //上滑加载更多

    onReachBottom: function () {

    var that = this;


    var systemp = that.data.systemmsg

    if (systemp.indexOf("iOS") != -1) {

    wx.pageScrollTo({

    scrollTop: 0,

    duration: 0

    })

    } else {

    wx.pageScrollTo({

    scrollTop: 0,

    duration: 300

    })

    }


    num++;

    if (num < that.data.peoplelist.length) {


    that.setData({

    isShowId: that.data.peoplelist[num],

    // huashow: false,

    });

    var token = wx.getStorageSync('token');

    var user_id = that.data.peoplelist[num - 1].id;


    if (token == '') {

    that.setData({

    videoplay: false,

    status: 1

    })

    //that.markAsRead();

    } else {

    server.post(server.like_reject_others, {

    token: token,

    user_id: user_id,

    status: 2,

    }).then(res => {

    if (res.data.key == 1000) {


    that.setData({

    videoplay: false,

    status: 1

    })

    //that.markAsRead();

    } else if (res.data.key == 1001) {

    that.setData({

    videoplay: false,

    status: 1

    })

    //that.markAsRead();


    } else if (res.data.key == 1200) {

    that.setData({


    modal2Hidden: true,

    modalHiddenb: true,

    })

    } else if (res.data.key == 1245) {

    wx.showModal({

    content: res.data.message,

    showCancel: false,

    });

    return false;

    } else {

    wx.showModal({

    content: res.data.message,

    showCancel: false,

    });


    //that.markAsRead()

    }

    })

    }

    var systemp= that.data.systemmsg

    if (systemp.indexOf("iOS") != -1)  {

    wx.pageScrollTo({

    scrollTop: 0,

    duration: 0

    })

    }else{

    wx.pageScrollTo({

    scrollTop: 0,

    duration: 300

    })

    }

    } else {


    num = that.data.peoplelist.length - 1

    that.reloadCurrent();

    // feedbackApi.showToast({ title: '没有更多了呦!' })


    var systemp = that.data.systemmsg


    if (systemp.indexOf("iOS") != -1) {

    wx.pageScrollTo({

    scrollTop: 0,

    duration: 0

    })

    } else {

    wx.pageScrollTo({

    scrollTop: 0,

    duration: 300

    })

    }


    }

    console.log(num)

    console.log(that.data.peoplelist.length)



    },


    2018-10-17
    赞同
    回复 1
    • A  陈佳辉🏃跑步走
      A 陈佳辉🏃跑步走
      2018-10-17

      编辑器上触发,真机上不触发

      2018-10-17
      回复