onShareAppMessage分享成功后如何返回指定页面?
<view wx:if="{{showTenantButton}}"> <button open-type="share" class="button" size="mini" style="position: relative; left: 35rpx; top: -5rpx; width: 185rpx; height: 56rpx; display: inline-block; box-sizing: border-box">发给朋友</button> </view> onShareAppMessage: function () { return { title: `你的朋友`, path: `pages/buffet/buffet?Id=${this.data.Id}`, success: () => { wx.redirectTo({ url: '/pages/index/index' // 分享成功返回 }); console.log('分享成功,已跳转'); }, fail: (res) => { console.log('分享失败', res); } }; },