有人写过小程序摇一摇吗!求教!
wx.onAccelerometerChange(function (e) { if (e.x > 0.2 && e.y > 0.2) { request(api.lootery, 'post', { openid: wx.getStorageSync('openid') }).then((res) => { console.log(res) that.setData({ show: true, message: res.data.Message }) }) } }) |
现在这种情况摇晃的时候会一直请求接口
