// ajax传递数据方式一
var data = {
"smsPushId":smsPushId,
"content_":val,
"isAutoPush_":"1",
"autoPushType_":autoPushType_
}
if (autoSetType){
$.ajax({
url: "http://1.18.1.162:9/SmsPush/Set_SMS_AutoPush",
data:data,
type:"POST",
async: false,
success: function (data) {
console.log(data)
swal({
title: "提交成功",
}, function () {
$('#bs-table').bootstrapTable("load",{data: ajaxGetAutoPushList()});
cancle_autoPush();
});
}
})
} else {
swal({
title: "请勿输入。。。。",
}, function () {
});
}
// 方式二
$.ajax({
url: "http://1.18.1.162:9/SmsPush/DetSmsAutoPush?smsPushContentId="+ item.SmsPushContentId,
type:"GET",
async: false,
success: function (data) {
console.log(data)
swal({
title: "删除成功",
}, function () {
$('#bs-table').bootstrapTable("load",{data: ajaxGetAutoPushList()});
});
}
})
// 截取页面地址传递的参数
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
return (r != null && r.length >= 2) ? decodeURI(r[2]) : null;
}
今天只写这些,后续继续更新。