$.ajax({
type: "POST",
url: "{:url('Index/pick')}",
data: $('#handleposition').serialize(),
dataType: "json",
error: function () {
alert('操作失敗');
},
success: function (data) {
if (data.status == 1) {
layer.msg(data.msg, {icon: 1, anim: 0, time: 2000});
} else {
layer.msg(data.msg, {icon: 2, anim: 0, time: 2000});
// window.location.reload();
}
}
});
var url = "{:url('Index/pick')}";
var datas = $('#handleposition').serialize();
jq.getJSON(url,datas,function(data){
if (data.status == 1) {
layer.msg(data.msg, {icon: 1, time: 3000}, function(){
window.location.reload();
});
} else {
// layer.msg(data.msg, {icon: 2, anim: 0, time: 2000});
layer.msg(data.msg, {icon: 2, time: 3000}, function(){
window.location.reload();
});
// window.location.reload();
}
});