1.遮罩层穿透事件
<view class="content1"><uni-popup @touchmove.stop.prevent="preventHandler"></uni-popup></view>
<view class="content1-content"></view>
preventHandler(){
return false
}
.content1 {
height: 100vh;
overflow: hidden;
}
.content1-content{
height: 100vh;
overflow: auto;
}
2.支付宝小程序升级/更新
onShow: function(options) {
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function (res) {
console.log(res.hasUpdate);
});
updateManager.onUpdateReady(function (res) {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
showCancel: false,
success(res) {
if (res.confirm) {
updateManager.applyUpdate();
}
}
});
});
}
3.支付宝小程序扫描普通二维码进入小程序获取参数
onLaunch: function(options) {
if (options.query && options.query.xxx) {
uni.setStorageSync("xxx", options.query.xxx);
}else{
uni.setStorageSync("xxx", "0");
}
}