You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
4.2 KiB
116 lines
4.2 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>账号解绑</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<!--标准mui.css-->
|
|
<link rel="stylesheet" href="../../lib/mui/css/mui.min.css">
|
|
<!--App自定义的css-->
|
|
<link rel="stylesheet" type="text/css" href="../../lib/mui/css/app.css"/>
|
|
<style>
|
|
h5 {
|
|
margin: 5px 7px;
|
|
}
|
|
.mui-btn {
|
|
font-size: 16px;
|
|
padding: 8px;
|
|
margin: 3px;
|
|
}
|
|
h5.mui-content-padded {
|
|
margin-left: 3px;
|
|
margin-top: 20px !important;
|
|
}
|
|
h5.mui-content-padded:first-child {
|
|
margin-top: 12px !important;
|
|
}
|
|
.ui-alert {
|
|
text-align: center;
|
|
padding: 20px 10px;
|
|
font-size: 16px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header class="mui-bar mui-bar-nav">
|
|
<h1 class="mui-title">账号解绑</h1>
|
|
</header>
|
|
<div class="mui-content">
|
|
<input id="wx_openid" type="hidden"/>
|
|
<form class="mui-input-group" id="form">
|
|
</form>
|
|
<div class="mui-button-row">
|
|
<button type="button" id="submit" class="mui-btn mui-btn-primary" style="width:80%;height:33px;">解除绑定</button>
|
|
</div>
|
|
</div>
|
|
<script src="../../lib/mui/js/mui.min.js"></script>
|
|
<script type="text/javascript">
|
|
mui.ready(function() {
|
|
var wx_openid = GetQueryString("wx_openid");
|
|
mui.ajax("/baseService/mobile/wx_user_unbound_select",{
|
|
data:{
|
|
wx_openid:wx_openid
|
|
},
|
|
type: "GET",
|
|
dataType:'json',
|
|
error:function(xhr,status,statusText){
|
|
alert("请求失败,状态:"+statusText+","+status);
|
|
},
|
|
success:function(json){
|
|
if(json.message){
|
|
mui.alert(json.message, function() {
|
|
WeixinJSBridge.call('closeWindow');
|
|
});
|
|
}else{
|
|
var li1 = "";
|
|
var obj = eval(json);
|
|
li1 += "<input id=\"person_id\" name=\"person_id\" type=\"hidden\" readonly=\"readonly\" value="+obj['person_id']+">";
|
|
li1 += "<div class=\"mui-input-row\">";
|
|
li1 += "<label>姓 名:</label>";
|
|
li1 += "<input id=\"name\" name=\"name\" type=\"text\" readonly=\"readonly\" value="+obj['person_name']+">";
|
|
li1 += "</div>"
|
|
li1 += "<div class=\"mui-input-row\">";
|
|
li1 += "<label>身份证号:</label>";
|
|
li1 += "<input id=\"idcard\" name=\"idcard\" type=\"text\" readonly=\"readonly\" value="+obj['idcard_code']+">";
|
|
li1 += "</div>"
|
|
document.getElementById("form").innerHTML+=li1;
|
|
}
|
|
}
|
|
});
|
|
})
|
|
var btn = document.getElementById("submit");
|
|
btn.addEventListener("tap",function () {
|
|
var person_id = mui("#person_id")[0].value;
|
|
var wx_openid = GetQueryString("wx_openid");
|
|
var url = "/baseService/mobile/wx_user_unbound";
|
|
mui.ajax(url,{
|
|
data:{
|
|
person_id:person_id,
|
|
wx_openid:wx_openid
|
|
},
|
|
type: "GET",
|
|
dataType:'json',
|
|
error:function(xhr,status,statusText){
|
|
alert("请求失败,状态:"+statusText);
|
|
},
|
|
success:function(json){
|
|
mui.alert(json.message, function() {
|
|
WeixinJSBridge.call('closeWindow');
|
|
});
|
|
}
|
|
});
|
|
});
|
|
function GetQueryString(name){
|
|
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
|
|
var r = window.location.search.substr(1).match(reg);//search,查询?后面的参数,并匹配正则
|
|
if(r!=null){
|
|
return unescape(r[2]);
|
|
}else{
|
|
return null;
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |