在A页面对a订单操作后跳转到B页面 自动定位到B页面的a订单位置
.js
Page({
data: {
height: (wx.getSystemInfoSync().windowHeight),
orderList:''
},
onLoad: function (options) {
this.setData({
orderId: "goto" + options.orderid
})
}
})
从A页面把orderId传到B页面
.wxml
<scroll-view class="content"
scroll-y="true"
style="height: {{height}}px;"
scroll-into-view="{{ orderId }}"
scroll-with-animation="true">
<view class="item"
wx:for="{{orderList}}"
id="goto{{item.id}}"
wx:key='key'></view>
</scroll-view>