uniapp确认信息框

uniapp yekong 830℃

确认信息框


uni.showModal({
                title: '确定要删除此用户吗?',
                content: ' ',
                success: function(res) {
                    if (res.confirm) {
                        that.deleteuser();
                    }
                }
            });

使用实例删除用户

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();
                    }
                }
            });
        },
喜欢 (0)