小程序
小游戏
企业微信
微信支付
扫描小程序码分享
按钮的转发会触发wx.pageScrollTo? 页面内在一个方法里有个wx.pageScrollTo,然后点击button的open-type:share的分享按钮会触发到wx.pageScrollTo执行,代码逻辑完全不会相碰,但是会出现这个意想不到的bug,请明察bug。
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
所有机型都有吗?我这边未复现
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
js代码:
Page({
aaa() {
wx.pageScrollTo({
scrollTop: '400',
duration: 800
})
},
html代码:
<button style="height:200rpx;background:red;" open-type="share">转发1</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发2</button>
<button style="height:200rpx;background:red;" open-type="share">转发3</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发4</button>
<button style="height:200rpx;background:red;" open-type="share">转发5</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发6</button>
<button style="height:200rpx;background:red;" open-type="share">转发7</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发8</button>
<button style="height:200rpx;background:red;" open-type="share">转发9</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发10</button>
<button style="height:200rpx;background:red;" open-type="share">转发11</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发12</button>
<button style="height:200rpx;background:red;" open-type="share">转发13</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发14</button>
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
所有机型都有吗?我这边未复现
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
js代码:
Page({
aaa() {
wx.pageScrollTo({
scrollTop: '400',
duration: 800
})
},
})
html代码:
<button style="height:200rpx;background:red;" open-type="share">转发1</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发2</button>
<button style="height:200rpx;background:red;" open-type="share">转发3</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发4</button>
<button style="height:200rpx;background:red;" open-type="share">转发5</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发6</button>
<button style="height:200rpx;background:red;" open-type="share">转发7</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发8</button>
<button style="height:200rpx;background:red;" open-type="share">转发9</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发10</button>
<button style="height:200rpx;background:red;" open-type="share">转发11</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发12</button>
<button style="height:200rpx;background:red;" open-type="share">转发13</button>
<button style="height:200rpx;background:yellow;" open-type="share">转发14</button>