| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 | <!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">			<ul class="n-list edit-list c-border-tb mt10">				<li class="n-list-cover">					<div class="n-list-key w3em c-f16">详细地址</div>					<div class="n-list-info pl10 mui-input-row">						<input id='address' type="text" class="ajax c-input width-100 mui-input-clear pr40 c-f16" placeholder="" />					</div>				</li>			</ul>						<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"></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 mobile1 = Request["mobile"];			$(function (){				var paramAgent = $.parseJSON(window.localStorage.getItem("paramAgent", paramAgent));		        $('#address').val(decodeURI(paramAgent.address));		        				var 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(mobile1){		        			paurl = "wx/html/home/html/login.html?type=" + type + "&openid=" + openid + "&mobile=" + mobile1;		        		}		        		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(){				dd.showModal();				var params = {};				params.address = $("#address").val();				sendPost('patient/save', params, '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 = "my-detail.html?type=" + type + "&openid=" + openid;						    }				   	}).showModal();				} else {					//非200则为失败					operateFailed(res);				}			}		</script>		</body></html>
 |