<view class="scroll_x">
<view></view>
<scroll-view class="scroll_box" scroll-x="true">
<view wx:for="{{listIamge}}" wx:key="index" class="image_list" style="left:{{item.x}}rpx;top:{{item.y}}rpx;z-index:{{item.Zindex}};">
<image src="{{item.img}}" class="{{index ==0||index ==1||index ==4||index ==5||index ==7||index ==3||index ==6?'shadow':''}}" animation="{{index ==0||index ==1||index ==4||index ==5||index ==7? animation1 : animation}}" style="width:{{item.wth}}rpx;height:{{item.ght}}rpx;"></image>
</view>
</scroll-view>
</view>
// 左右平移动画
touch: function () {
this.animation = wx.createAnimation({
duration: 30000,
timingFunction: 'linear',
delay: 0
})
this.animation.translate(-650).step()
this.animation.translate(-160).step()
this.setData({
animation: this.animation.export() //输出动画
})
setInterval(function () {
this.animation.translate(0).step()
this.animation.translate(-650).step()
this.setData({
animation: this.animation.export() //输出动画
})
}.bind(this), 30000)
this.animation1 = wx.createAnimation({
duration: 30000,
timingFunction: 'linear',
delay: 0
})
this.animation1.translate(-980).step()
this.animation1.translate(-160).step()
this.setData({
animation1: this.animation1.export() //输出动画
})
setInterval(function () {
this.animation1.translate(0).step()
this.animation1.translate(-980).step()
this.setData({
animation1: this.animation1.export() //输出动画
})
}.bind(this), 30000)
},
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
啥机型都有问题