var xhr = $.ajax(baseUrl + 'modules/mobile/receipt/redemption/csh_pay_receive_redemption.svc', {
data: query_info,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
async: false,
timeout: 2000, //超时时间设置
beforeSend: function() {
plus.nativeUI.showWaiting('loading', {
loading: {
display: 'block',
height: '32px'
}
})
mask.show(); //显示遮罩层
},
complete: function() {
plus.nativeUI.closeWaiting();
mask.close();
},
success: function(data) {
// console.log('data:' + JSON.stringify(data));
var obj = JSON.stringify(data.result.redemption_info.record);
if (obj) {
var query_list = data.result.redemption_info.record;
generate(query_list);
$('#result')[0].style.display = 'block';
$('.info')[0].style.display = 'none';
} else {
$('#result')[0].style.display = 'none';
$('.info')[0].style.display = 'block';
}
},
error: function(xhr, type, errorThrown) {
//异常处理;
console.error(type);
$.toast('连接服务器失败 请重新登录');
}
});
c***@163.com
- 发布:2019-06-14 10:07
- 更新:2019-06-14 10:07
- 阅读:731
0 个回复