qlg.frontend/js/hhrrz.js
2019-09-06 10:45:33 +08:00

45 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mui.plusReady(function() {
window.addEventListener('reload', function(e) { //执行刷新
location.reload();
});
var self = plus.webview.currentWebview();
mui('.block').on('tap', '.bj', function() {
JZL.openWindow('addhhrrz.html', 'addhhrrz.html');
})
$('.con').on('tap', '.del', function() {
var data_addressId = $(this).parent().attr('data-addressId');
if (confirm('确认删除信息?')) {
mui.ajax(qlgUrl('app/Useraddress/del'), {
data: {
id: data_addressId
},
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
var data = toJson(data, 1);
if (data.status == 1) {
location.reload()
} else {
mui.alert(data.msg)
}
},
error: function(xhr, type, errorThrown) { //异常处理;
// mui.alert(type);
}
});
}
})
$('.add1').on('tap', function() {
JZL.openWindow('addhhrrz.html', 'addhhrrz.html');
})
})