Преглед изворни кода

Merge branch 'master' of http://192.168.1.220:10080/Amoy2/sr-iHealthwx

zhangyanfang пре 4 година
родитељ
комит
480b3a345a

+ 1 - 1
html/grzx/html/real-name-authentication.html

@ -27,7 +27,7 @@
						</span>						
					</div>	
					<div class="pt15 pb10 c-t-left pl15 c-333">
						{{baseInfo.idcard}}
						{{baseInfo.idcard}}<span class="fr c-f14 c-4dcd70 mr20" @tap="updateIdcard">修改</span>
					</div>
				</div>
				<div class="bgc-fff mt10 div-item c-radius-20 c-f14">

+ 149 - 0
html/grzx/html/update-idcard.html

@ -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>

+ 2 - 1
html/grzx/js/real-name-authentication.js

@ -49,7 +49,8 @@
				var jsonstr = $.parseJSON(userAgent);
				var openid = jsonstr.openid;
				window.location.href = "update-ssc.html?openid=" + openid + "&ssc="+ ssc + "&1=1";
			}
			},
			updateIdcard:function() {}
		},
	})

Разлика између датотеке није приказан због своје велике величине
+ 166 - 0
html/home/html/agreement.html


+ 141 - 0
html/home/html/improve-user-info.html

@ -0,0 +1,141 @@
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>变更手机号码申请</title>
    <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" type="text/css"/>
    <link rel="stylesheet" href="../../../css/cross.ui.css" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="../../../iconfont/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/ss-style.css">
    <script src="../../../js/jquery/2.1.3/jquery.js"></script>
    <style>
    	.edit-info.registered>li .n-list-key:first-child {
    		width: 6em;
    	}
    </style>
</head>
<body>
	<div class="pl15 ptb15 bgc-fff">
		<p style="font-size: 30px;">请完善个人信息</p>
		<div style="color: #c8c8c8;">需要您完善个人信息后才能继续</div>
	</div>
    <ul class="n-list edit-info registered c-border-tb c-f15 form-register">
        <li>
            <div class="n-list-key">
               	居民姓名
            </div>
            <div class="n-list-info">
                <input id="name" type="text" class="width-100 c-f16 c-5b5b5b" placeholder="请输入姓名"/>
            </div>
        </li>
        <li>
            <div class="n-list-key">
               	身份证号码
            </div>
            <div class="n-list-info">
                <input id="idcard" type="text" class="width-120 c-f16 c-5b5b5b" placeholder="请输入身份证号码"/>
            </div>
        </li>
        <li>
            <div class="n-list-key">
               	社保卡号
            </div>
            <div class="n-list-info">
                <input id="ssc" type="text" class="width-100 c-f16 c-5b5b5b" placeholder="请输入社保卡号"/>
            </div>
        </li>
    </ul>
    <div class="mb15 mlr15 mt20">
        <a id="commit" onclick="commit()" class="c-btn c-btn-4dcd70 c-btn-full c-btn-radius c-f18">保存</a>
    </div>
    <script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js" ></script>
	<script type="text/javascript" src="../../../js/common_http.js" ></script>
	<script type="text/javascript" src="../../../js/weixin_common.js" ></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 type="text/javascript" src="../../../js/commit_validate.js" ></script>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script type="text/javascript">
	    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 clock = "";
		var nums = 120;
		
		checkUserAgent();
		
        function commit(){
        	
        	var name = $("#name").val();
        	var idcard = $("#idcard").val();
        	var ssc = $("#ssc").val();
        	var userAgent = window.localStorage.getItem(agentName);
        	if(userAgent) {
				userAgent = JSON.parse(userAgent)
				var isValid = validate({
        				patient: userAgent.uid,
		        		name: name,
		        		idcard: idcard,
		        		ssc: ssc
		        	})
	        	if(isValid) {
	        		dd.showModal()
	        		sendPost("/weixin/savePatientInfo", data, "json", "post", submitFailed, submitSuccess);
	        	}
			}
        	
        }
        //验证信息
		function validate(data) {
			if (!data.name) {
			    dialog({contentType:'tipsbox', skin:'bk-popup' , content:'姓名不能为空'}).show();
				return false;
			}
			if (!data.idcard) {
			    dialog({contentType:'tipsbox', skin:'bk-popup' , content:'身份证号码不能为空'}).show();
				return false;
			}
			if (!isIdcard(data.idcard)) {
			    dialog({contentType:'tipsbox', skin:'bk-popup' , content:'身份证格式不正确'}).show();
				return false;
			}
			if (data.ssc == "") {
			    dialog({contentType:'tipsbox', skin:'bk-popup' , content:'社保卡号不能为空'}).show();
				return false;
			}
			
			return true;
		}
		
		function submitFailed(res) {
			dd.close();
			if (res && res.msg) {
				dialog({contentType:'tipsbox', skin:'bk-popup' , content:res.msg}).show();      
			} else {
				dialog({contentType:'tipsbox', skin:'bk-popup' , content:'提交失败'}).show(); 
			}
		}
		
		function submitSuccess(res) {
			if (res.status == 200) {
				dd.close();
				dialog({contentType:'tipsbox', skin:'bk-popup' , content:'提交成功'}).show(); 
				setTimeout(function() {
					history.back()
				}, 2000)
			} else {
				submitFailed(res);
			}
		}
    </script>
</body>
</html>

+ 2 - 2
html/home/html/login.html

@ -77,7 +77,7 @@
						  <!--<i class="iconfont icon-shouji1"></i>-->
					  </div>
					  <div class="n-list-info">
						  <input id="txtMobile2" maxlength="18" minlength="11" type="text" class="width-100 c-f16 c-5b5b5b" placeholder="身份证号/手机号"/>
						  <input id="txtMobile2" maxlength="18" minlength="11" type="text" class="width-100 c-f16 c-5b5b5b" placeholder="手机号"/>
						  <a href="#" class="searchbar-clear"></a>
					  </div>
					</li>
@ -86,7 +86,7 @@
						  <i class="iconfont icon-yanzhengma01"></i>
					  </div>
					  <div class="n-list-info">
						  <input id="txtCode2" type="password" class="width-100 c-f16 c-5b5b5b" placeholder="初始密码为身份证后6位"/>
						  <input id="txtCode2" type="password" class="width-100 c-f16 c-5b5b5b" placeholder="初始密码为手机号码后6位"/>
							 <a href="#" class="searchbar-clear"></a>
					  </div>
					  <div class="n-list-key fc" >

Разлика између датотеке није приказан због своје велике величине
+ 20 - 159
html/home/html/regist-info.html


BIN
html/home/images/tishi_icon.png


+ 2 - 0
html/profile/html/index_0.html

@ -71,6 +71,8 @@
	}
	
	function queryInit(){
		// 验证居民信息是否完善
		checkBaseInfo()
		
		getReqPromises([
			{

+ 3 - 1
html/profile/html/index_1.html

@ -69,7 +69,9 @@
	}
	
	function queryInit(){
		// 验证居民信息是否完善
		checkBaseInfo()
		
		getReqPromises([
			{
				url: profileServer+'/gateway/authentication/oauth/login',

+ 3 - 1
html/profile/html/index_2.html

@ -69,7 +69,9 @@
	}
	
	function queryInit(){
		// 验证居民信息是否完善
		checkBaseInfo()
		
		getReqPromises([
			{
				url: profileServer+'/gateway/authentication/oauth/login',

+ 3 - 0
html/yszd/js/doctor-guidance.js

@ -90,6 +90,9 @@ appendFamilyMember($('#memberContainer'),function(){
 * 界面数据初始化
 */
function queryInit(){
	// 验证居民信息是否完善
	checkBaseInfo()
	
	var data = {};
	data.id = id;
	data.pagesize = pageSize;

+ 3 - 0
html/yszx/js/doctor-consultation_new.js

@ -26,6 +26,9 @@ $(function(){
});
function queryInit(){
	// 验证居民信息是否完善
	checkBaseInfo()
	
    initScroller();
    initFamilyData();
    initPageData();

+ 3 - 0
html/yszx/js/focused-doctor.js

@ -13,6 +13,9 @@ $(function(){
});
function queryInit(){
	// 验证居民信息是否完善
	checkBaseInfo()
		
    userAgent = JSON.parse(userAgent);
    initScroller();
    getDoctorList(true);

+ 4 - 0
html/yszx/js/select-consult-doctor.js

@ -26,6 +26,10 @@ $(function(){
})
function queryInit(){
	
	// 验证居民信息是否完善
	checkBaseInfo()
	
    initScroller();
    if(deptId){
        $(".inp-search").val(deptName);

+ 19 - 1
js/weixin_common.js

@ -1,6 +1,6 @@
//切换发布版本 true:正式版,连接生产环境;false:测试版,连接测试环境。
var publish_version = true;
var publish_version = false;
//var publish_version = false;
if(publish_version){
	//正式环境(城市爱健康)
   var server = "http://srijk.yihu.com/wlyy/";
@ -169,6 +169,24 @@ function GetRequest() {
   }
   return theRequest;
}
// 验证居民信息是否完善
function checkBaseInfo() {
	var userAgent = window.localStorage.getItem(agentName);
	if(userAgent) {
		userAgent = JSON.parse(userAgent)
		sendPost('weixin/checkBaseInfo', {patient: userAgent.uid}, 'json', 'post', function(res) {
			dialog({contentType:'tipsbox', skin:'bk-popup' , content:res.msg || "信息获取失败!",bottom:true}).show();  
		}, function(res){
			console.log(res)
			if(!res.data) {
				window.location.href = "../../home/html/improve-user-info.html"
			}
		})
	}
	
}
//新的判断用户是否登录的方法,先校验openid是否一致
function checkUserAgent(){
    var Request = new Object();