wx.showModal({
title: '提示',
content: '暂无访问权限',
success(res) {
if (res.confirm) {
}
}
})
wx.showModal({
title: '提示',
content: '用户不存在!',
})
例子1
wx.showModal({
title: "2222步",
content: currentCache ? "确定为自己城市添加步数吗" : "确定取消为自己城市添加步数吗?",
showCancel: true,
cancelText: "取消111",
cancelColor: "#000",
confirmText: "确定",
confirmColor: "#0f0",
success: function (res) {
console.log(res)
if (res.confirm) {
// 重新设置缓存
//wx.setStorageSync(‘cache_key‘, cache);
// 更新数据绑定,从而切换图片
//that.setData({
//collection: currentCache
//})
}
}
})
例子2
wx.showModal({
title: "2222步",
content: currentCache ? "确定为自己城市添加步数吗" : "确定取消为自己城市添加步数吗?",
showCancel: false,
// cancelText: "取消111",
// cancelColor: "#000",
confirmText: "确定",
confirmColor: "#0f0",
success: function (res) {
console.log(res)
if (res.confirm) {
// 重新设置缓存
wx.setStorageSync(‘cache_key‘, cache);
// 更新数据绑定,从而切换图片
//that.setData({
//collection: currentCache
// })
}
}
})