确认信息框
uni.showModal({
title: '提示',
confirmText: '注册账号',
cancelText: '登录绑定',
content: '当前微信还未绑定账号,请使用账号密码登录进行绑定或注册',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
使用实例删除用户
uniapp删除操作确认信息框
deleteuser() {
uni.showNavigationBarLoading();
this.$minApi.GetCustomerDetail(this.id).then(res => {
uni.hideNavigationBarLoading();
if (res.code == 1) {
uni.showToast({
title: res.msg,
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
//删除确认框
deleteusers() {
var that = this;
uni.showModal({
title: '确定要删除此用户吗?',
content: ' ',
success: function(res) {
if (res.confirm) {
that.deleteuser();
}
}
});
},