45 lines
1.1 KiB
JavaScript
Executable File
45 lines
1.1 KiB
JavaScript
Executable File
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');
|
||
})
|
||
|
||
})
|