<form report-submit="true" @submit="receiveHandler">
...
<button class="receive-btn" form-type="submit" :style="'margin-top:' + (activity.rule ? '20rpx':'30rpx')">立即领取</button>
...
</form>
receiveHandler(e){
wx.showToast({
title: "请前往小程序使用完整服务",
duration: 1500
})
...
}
从朋友圈进入单页模式,点击该页面的立即领取,不会触发showToast,修改为以下代码后正常,为什么?
<form report-submit="true">
...
<button class="receive-btn" @tap="receiveHandler" :style="'margin-top:' + (activity.rule ? '20rpx':'30rpx')">立即领取</button>
...
</form>
receiveHandler(){
wx.showToast({
title: "请前往小程序使用完整服务",
duration: 1500
})
...
}
发现是小弟阅读文档不仔细,打扰了~