AJAX: 对话框大全

编程入门 行业动态 更新时间:2024-10-23 19:27:05

AJAX: <a href=https://www.elefans.com/category/jswz/34/1761322.html style=对话框大全"/>

AJAX: 对话框大全



AJAX:$.ajax({url: "/admin/cutting/getDataWeek",type: "GET",data:{},dataType:'json',success: function (res) {if (res.code == 1) {}},error:function (error) {console.log('请求失败');console.log(error);}});      	$('.sub').unbind('click').click(function() {var id = $(this).data('id');swal({title: "确认完成后,数据将不可再修改?",type: "warning",showCancelButton: true,confirmButtonColor: "#DD6B55",confirmButtonText: "确认",showLoaderOnConfirm: true,cancelButtonText: "取消",preConfirm: function() {return new Promise(function(resolve) {$.ajax({method: 'post',url: '/admin/patfabric/checksuccess',data: {id:id,type:2,_token:LA.token,},success: function (data) {$.pjax.reload('#pjax-container');resolve(data);}});});}}).then(function(result) {var data = result.value;if (typeof data === 'object') {if (data.status) {swal(data.message, '', 'success');} else {swal(data.message, '', 'error');}}});
});	supplyCheck:function () {this.$confirm('确认审批通过, 是否继续?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {$.ajax({url:"/feed_check_store",data:{'_token':'{{ csrf_token() }}','user_id':this.user_id)},type:'POST',cache:false,dataType:'json',success: function (res) {location.reload();},error: function (xhr, textStatus, errorThrown) {}});this.$message({type: 'success',message: '审批通过!'});}).catch(() => {this.$message({type: 'info',message: '取消操作'});});},checkBack:function () {this.$prompt('请输入驳回原因', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',}).then(({ value }) => {$.ajax({url:"/feed_check_store",data:{'_token':'{{ csrf_token() }}','user_id':this.user_id,'id':this.feed_id,'reject_remark': value},type:'POST',cache:false,dataType:'json',success: function (res) {location.reload();},error: function (xhr, textStatus, errorThrown) {}});this.$message({type: 'success',message: '驳回完成!'});}).catch(() => {this.$message({type: 'info',message: '取消操作'});// this.$notify({//   title: '警告',//   message: data.message,//   type: 'warning'// });//this.$alert(res.msg, '提示', {//       confirmButtonText: '确定',//});//sweetAlert(res.msg);//swal(data.msg, '', 'error');});},

更多推荐

AJAX: 对话框大全

本文发布于:2023-12-06 09:49:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1667201.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:对话框   大全   AJAX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!