mint-ui 的messagebox 点击完成后,怎么跳转路由?

发布于 2022-09-05 22:40:32 字数 990 浏览 18 评论 0

                        if (response.data.success) {
                            this.CLEAR_ALL_SETTLE()
                            MessageBox({
                                title: '支付成功',
                                message: '您的订单会尽快给您处理',
                                confirmButtonText: '完成'
                            }).alert().then(action => {
                                 this.$router.push({ path: '/center/mycenter'});
                                 //这里路由跳转没生效啊
                            });
                            
                        } else {
                            MessageBox({
                                title: '支付失败',
                                message: '支付遇到问题,请尝试重新支付',
                                showCancelButton: true,
                                confirmButtonText: '重新支付'
                            }).confirm().then(action => {

                            });

                        }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

忆离笙 2022-09-12 22:40:32

试试这样呢?

 if (response.data.success) {
    this.CLEAR_ALL_SETTLE()
    MessageBox({
        title: '支付成功',
        message: '您的订单会尽快给您处理',
        confirmButtonText: '完成'
    }).then(action => {
    if (action == 'confirm'){
         this.$router.push({ path: '/center/mycenter'});
         //这里路由跳转没生效啊
         }
    });
    
} 
记忆消瘦 2022-09-12 22:40:32
                 if (response.data.success) {
                        this.CLEAR_ALL_SETTLE()
                        MessageBox({
                            title: '支付成功',
                            message: '您的订单会尽快给您处理',
                            confirmButtonText: '完成'
                        }).then(action => {
                             this.$router.push({ path: '/center/mycenter'});
                             //给alert()去掉就好了
                        });
                        
                    } else {
                        MessageBox({
                            title: '支付失败',
                            message: '支付遇到问题,请尝试重新支付',
                            showCancelButton: true,
                            confirmButtonText: '重新支付'
                        }).then(action => {

                        });

                    }
                    
东北女汉子 2022-09-12 22:40:32

。。。。。。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文