|
@ -0,0 +1,149 @@
|
|
|
<!doctype html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<title>修改身份证号</title>
|
|
|
<meta name="author" content="yihu.com" />
|
|
|
<meta name="format-detection" content="telephone=no" />
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
|
|
<link rel="stylesheet" href="../../../css/cross.css">
|
|
|
<link rel="stylesheet" href="../../../css/cross.ui.css">
|
|
|
<link rel="stylesheet" href="../css/shenfenyanzheng.css" type="text/css" />
|
|
|
</head>
|
|
|
|
|
|
<body style="background: #f3f3f3;">
|
|
|
|
|
|
<div class="c-main mui-content">
|
|
|
<div id="update">
|
|
|
<ul class="n-list edit-list c-border-tb mt10">
|
|
|
<li class="n-list-cover" style="height: 50px;">
|
|
|
<div class="n-list-info pl10 mui-input-row">
|
|
|
<input id='idcard' type="text" class="ajax c-input width-100 mui-input-clear pr40 c-f16" placeholder="请输入身份证号" />
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
|
|
|
<div class="plr10 mt15 pb20">
|
|
|
<a onclick="submit()" class="c-btn c-btn-full c-btn-4dcd70 border-radius-rounded" id="next_step">保存</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script src="../../../js/jquery/2.1.3/jquery.js"></script>
|
|
|
<script type="text/javascript" src="../../../js/mui.min.js"></script>
|
|
|
<script type="text/javascript" src="../../../js/app.js" ></script>
|
|
|
<script type="text/javascript" src="../../../js/weixin_common.js" ></script>
|
|
|
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
|
|
<script src="../../../js/common_http.js" type="text/javascript" charset="utf-8"></script>
|
|
|
<script src="../../../js/security.js" type="text/javascript" charset="utf-8"></script>
|
|
|
<link rel="stylesheet" type="text/css" href="../../../widget/artDialog/6.0.5/css/ui-dialog.min.css">
|
|
|
<script src="../../../widget/artDialog/6.0.5/js/dialog-plus.min.js?11=11"></script>
|
|
|
<script>
|
|
|
var dd = dialog({contentType:'load', skin:'bk-popup', content:'修改中...'});
|
|
|
var Request = new Object();
|
|
|
Request = GetRequest();
|
|
|
var openid = Request["openid"];
|
|
|
var type = Number(Request["type"]);
|
|
|
var idcard = Request["idcard"];
|
|
|
var userAgent;
|
|
|
$("#idcard").val(idcard);
|
|
|
$(function (){
|
|
|
userAgent = window.localStorage.getItem(agentName);
|
|
|
if(userAgent){
|
|
|
var paurl = "";
|
|
|
if(type == 0){
|
|
|
paurl = "wx/html/home/html/login.html?type=0&openid=" + openid;
|
|
|
}
|
|
|
else{
|
|
|
if(idcard){
|
|
|
paurl = "wx/html/home/html/login.html?type=" + type + "&openid=" + openid + "&idcard=" + idcard;
|
|
|
}
|
|
|
else{
|
|
|
paurl = "wx/html/home/html/login.html?type=" + type + "&openid=" + openid;
|
|
|
}
|
|
|
}
|
|
|
//从后台那边获取签名等信息
|
|
|
var params = {};
|
|
|
params.pageUrl = window.location.href;
|
|
|
$.ajax(server + "weixin/getSign", {
|
|
|
data: params,
|
|
|
dataType: "json",
|
|
|
type: "post",
|
|
|
success: function(res){
|
|
|
if (res.status == 200) {
|
|
|
var t = res.data.timestamp;
|
|
|
var noncestr = res.data.noncestr;
|
|
|
var signature = res.data.signature;
|
|
|
wx.config({
|
|
|
//debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
appId: appId, // 必填,公众号的唯一标识
|
|
|
timestamp: t, // 必填,生成签名的时间戳
|
|
|
nonceStr: noncestr, // 必填,生成签名的随机串
|
|
|
signature: signature,// 必填,签名,见附录1
|
|
|
jsApiList: [
|
|
|
// 'closeWindow'
|
|
|
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
else{
|
|
|
if(!openid){
|
|
|
dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'openid获取失败'}).show();
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
function submit(){
|
|
|
var userAgent = window.localStorage.getItem(agentName);
|
|
|
var idcard = $.trim($('#idcard').val());
|
|
|
if(idcard == ""){
|
|
|
dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请输入身份证号!'}).show();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
dd.showModal();
|
|
|
|
|
|
if(userAgent) {
|
|
|
userAgent = JSON.parse(userAgent)
|
|
|
//修改身份证号
|
|
|
sendPost("weixin/updatePatientIdCard", {patient: userAgent.uid,idcard:idcard}, "json", "post", operateFailed, operateSuccesss);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//失败
|
|
|
function operateFailed(res) {
|
|
|
dd.close();
|
|
|
if (res && res.msg) {
|
|
|
dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:res.msg}).show();
|
|
|
} else {
|
|
|
dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'修改失败'}).show();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//成功调用登录接口
|
|
|
function operateSuccesss(res) {
|
|
|
if (res.status == 200) {
|
|
|
dd.close();
|
|
|
dialog({
|
|
|
content: '修改身份证号成功',
|
|
|
okValue:'确定',
|
|
|
ok: function (){
|
|
|
window.location.href = "real-name-authentication.html";
|
|
|
}
|
|
|
}).showModal();
|
|
|
} else {
|
|
|
//非200则为失败
|
|
|
operateFailed(res);
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|