记录微信小程序掉起半屏失效问题
·
uniapp 开发微信小程序掉起半屏
由于想加一个防抖就很草率的使用lodash 这种写法
const handlePayment = debounce(async () => {}, 500)
经排查警告如下

所以必须要用点击事件,不能用回调去掉起

代码如下
<view class="footer" @click="handlePayment">立即支付</view>
const handlePayment = async () => {
uni.openEmbeddedMiniProgram({
appId: res.wxAppId,
path: res.wxPath,
extraData: {
'data1': 'test',
},
success(res) {
console.log("--res-777--", res)
// 打开成功
console.log("--打开成功---")
}
})
}
更多推荐
所有评论(0)