wx.createAnimation动画角度不旋转
安卓端没问题,但是ios端 请求后台实时坐标数据后设置rotate时没有效果刚开始转了一下后就还原图片不旋转了,下面是具体代码 self.data.setInter = setInterval(function() { wx.request({ url: app.globalData.baseUrl data: { car_id: self.data.id, api_token: wx.getStorageSync("token") }, method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT header: { 'content-type': 'application/json' }, // 设置请求的 header success: function(res) { if (res.statusCode == 200) { self.data.carPosition.push(res.data); console.log(res.data); } var postionData = self.data.carPosition.shift(); var pos_x = (postionData[0] - 82) * 0.417 / 750 * wx.getSystemInfoSync().windowWidth; var pos_y = (postionData[1] - 2630) * 0.455 / 750 * wx.getSystemInfoSync().windowWidth; if (postionData[2] > 250 && postionData[2] < 271) { self.animation.translate(pos_x, pos_y).step() self.animation.rotate(450).step() self.setData({ animation: self.animation.export(), }) } else { self.animation.translate(pos_x, pos_y).step() self.animation.rotate(90).step() self.setData({ animation: self.animation.export(), }) } }, 300)