微信小程序点击按钮提交,弹框提示之后显示状态并跳转页面

按钮:

    提交

 

按钮wxss:

.bottom-btn {position: fixed; padding-left: 3rem; /* padding-right: 8%; */padding-top: 1rem;padding-bottom: 3rem;bottom: 0;width: 75%;height: 2rem;text-align: center; background-color: #ffffff;
}
.van-button{width:50%;
}

js代码:

 /** 跳转到首页页面 */jumpToDetail() {wx.showModal({title: '提示',content: '是否确认提交',success: function (res) {if (res.confirm) {console.log('用户点击确定')wx.showToast({title: '成功',duration: 1000,success: function () {setTimeout(function () {wx.reLaunch({url: '../index/index',})}, 1000);}})}else{console.log('用户点击取消')}}})},

 

确认之后

 

然后就跳转

 

 


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部