Kaynağa Gözat

添加个人基本信息相关页面

lulihong 6 yıl önce
ebeveyn
işleme
67ad777b49
37 değiştirilmiş dosya ile 1944 ekleme ve 712 silme
  1. 63 0
      html/grzx/css/account-safe.css
  2. 82 0
      html/grzx/css/my-detail-bak.css
  3. 81 75
      html/grzx/css/my-detail.css
  4. 80 0
      html/grzx/css/real-name-authentication.css
  5. 88 0
      html/grzx/html/account-safe.html
  6. 98 0
      html/grzx/html/base-info.html
  7. 189 0
      html/grzx/html/my-detail-bak.html
  8. 98 183
      html/grzx/html/my-detail.html
  9. 58 0
      html/grzx/html/real-name-authentication.html
  10. 1 1
      html/grzx/html/update-ssc.html
  11. 11 4
      html/grzx/html/updateService.html
  12. 1 1
      html/grzx/html/xiugaidizhi.html
  13. BIN
      html/grzx/images/01weixin_icon.png
  14. BIN
      html/grzx/images/baogaochaxuan_icon.png
  15. BIN
      html/grzx/images/biaoqian_lvse_img.png
  16. BIN
      html/grzx/images/geduan_img.png
  17. BIN
      html/grzx/images/guanzhuyisheng_icon.png
  18. BIN
      html/grzx/images/houzhenchaxuan_icon.png
  19. BIN
      html/grzx/images/jiaofeichaxuan_icon.png
  20. BIN
      html/grzx/images/jiaren_icon.png
  21. BIN
      html/grzx/images/jiuzhenka_icon.png
  22. BIN
      html/grzx/images/kahao_bg_img.png
  23. BIN
      html/grzx/images/qiehuanjiaren02_icon.png
  24. BIN
      html/grzx/images/qiehuanjiaren_icon.png
  25. BIN
      html/grzx/images/tiaozhuan_icon.png
  26. BIN
      html/grzx/images/tuichu_icon.png
  27. BIN
      html/grzx/images/wode_bg_img.png
  28. BIN
      html/grzx/images/yijianfankui_icon.png
  29. BIN
      html/grzx/images/yuyuehao_icon.png
  30. BIN
      html/grzx/images/zhanghaoanquan_icon.png
  31. 24 0
      html/grzx/js/account-safe.js
  32. 466 0
      html/grzx/js/base-info.js
  33. 465 0
      html/grzx/js/my-detail-bak.js
  34. 65 448
      html/grzx/js/my-detail.js
  35. 56 0
      html/grzx/js/real-name-authentication.js
  36. 17 0
      js/head.js
  37. 1 0
      js/post.js

+ 63 - 0
html/grzx/css/account-safe.css

@ -0,0 +1,63 @@
.c-arrow-r {
	position: absolute;
	top: 50%;
	right: 10px;
	margin-top: -5px;
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border: solid #cdcdcd;
	border-width: 2px 2px 0 0;
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
}
.c-list .c-list-info>h4 {
	font-size: 17px;
}
.c-list .c-list-link .c-list-value,
.c-list .c-list-link .c-list-title {
	padding-right: 0;
	font-size: 14px;
	color: #4dcd70;
}
.c-list-link .c-t-right {
	padding-right: 10px !important
}
.vam {
	vertical-align: middle;
}
.mr5 {
	margin-right: 5px;
}
.c-ff5e6c {
	color: #FF5E6C;
}
.div-logout {
	position: fixed;
	bottom: 0;
	width: 100%;
	background: #ffffff;
	text-align: center;
	height: 45px;
	line-height: 45px;
}
.div-qiehuan-account {
	position: fixed;
	bottom: 55px;
	width: 100%;
	background: #ffffff;
	text-align: center;
	height: 45px;
	line-height: 45px;
}

+ 82 - 0
html/grzx/css/my-detail-bak.css

@ -0,0 +1,82 @@
.text-right{
		text-align: right;
	}
input[type="text"]{
	line-height: inherit;
    width: 100%;
    height: inherit;
    margin-bottom: 0px;
    padding: 0px;
    padding-right: 0px;
    border: none;
    border-radius: 0;
    outline: 0;
    background-color: #fff;
    -webkit-appearance: none;
    user-select: none;
    -webkit-user-select: none; 
}
input:focus{
    background-color: inherit;
}
input:active{
    background-color: inherit;
}
.img-sign{
	width: 54px;
	height: 45px;
}
.c-arrow-r{
	position: absolute;
	top: 50%;
	right: 10px;
	margin-top: -5px;
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border: solid #cdcdcd;
	border-width: 2px 2px 0 0;
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
}
.no-user-select{-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;}
div.pinch-zoom,
div.pinch-zoom img{
    width: 100%;
    -webkit-user-drag: none;
}
#clipPanel{
    width: 100%;
    height: 100%;
}
#clip{
    position: absolute;
    z-index: 100;
    outline: rgba(0, 0, 0, 0.5) solid 1000px;
    top: 50%;
    left: 0;
    -webkit-transform: translateY(-50%); 
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}
#memberContainer{
	position: fixed;
	top: 0px;
	width: 100%;
	z-index: 99;
}
.li-circle:before {
	content: " ";
	border: 3px solid #FF0606;
	/*设置红色*/
	border-radius: 3px;
	/*设置圆角*/
	position: absolute;
	z-index: 1000;
	right: 80px;
	margin-top: 8px;
}

+ 81 - 75
html/grzx/css/my-detail.css

@ -1,82 +1,88 @@
.text-right{
		text-align: right;
	}
input[type="text"]{
	line-height: inherit;
    width: 100%;
    height: inherit;
    margin-bottom: 0px;
    padding: 0px;
    padding-right: 0px;
    border: none;
    border-radius: 0;
    outline: 0;
    background-color: #fff;
    -webkit-appearance: none;
    user-select: none;
    -webkit-user-select: none; 
}
input:focus{
    background-color: inherit;
}
input:active{
    background-color: inherit;
}
.img-sign{
	width: 54px;
.c-f17 {
	font-size: 17px;
}
.c-333 {
	color: #333;
}
.mr16 {
	margin-right: 16px;
}
.div-type-content li {
	height: 45px;
}
.c-arrow-r{
	position: absolute;
	top: 50%;
	right: 10px;
	margin-top: -5px;
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border: solid #cdcdcd;
	border-width: 2px 2px 0 0;
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
}
.no-user-select{-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;}
div.pinch-zoom,
div.pinch-zoom img{
    width: 100%;
    -webkit-user-drag: none;
}
#clipPanel{
    width: 100%;
    height: 100%;
}
#clip{
    position: absolute;
    z-index: 100;
    outline: rgba(0, 0, 0, 0.5) solid 1000px;
    top: 50%;
    left: 0;
    -webkit-transform: translateY(-50%); 
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}
#memberContainer{
	position: fixed;
	top: 0px;
.div-type-content.c-list .cur-pit {
	padding-right: 0;
}
.div-type-content.c-list .c-list-info {
	border-bottom: 1px solid #dcdcdc;
	padding-right: 0;
}
.div-type-content.c-list li:last-child .c-list-info {
	border-bottom: 0;
}
.div-type-content.c-list>li,
.div-type-content.c-list>.c-list-div {
	border-top: 0;
}
.c-list .c-list-key {
	margin-top: 15px;
}
.div-head-content {
	width: 100%;
	z-index: 99;
	height: 105px;
	background: url(../images/wode_bg_img.png) no-repeat;
	background-size: 100% 105px;
	display: -webkit-box;
	position: relative;
}
.portrait-img {
	border-radius: 60px;
	margin: 22px;
}
.mt25 {
	margin-top: 25px;
}
.mt5 {
	margin-top: 5px;
}
.li-circle:before {
	content: " ";
	border: 3px solid #FF0606;
	/*设置红色*/
	border-radius: 3px;
	/*设置圆角*/
.qiehuan-jiaren {
	position: absolute;
	z-index: 1000;
	right: 80px;
	margin-top: 8px;
	top: 50%;
	right: 15px;
	margin-top: -17px;
}
.app-list {
	background-color: #fff;
	overflow: hidden;
	border-bottom: 1px solid #e1e1e1;
}
.app-list li {
	float: left;
	text-align: center;
	width: calc((100% - 3px) / 4);
	padding: 13px 0;
	font-size: 14px;
	color: #666;
}
.app-list li:nth-child(4n) {
	border-right: 0;
}
.weixing-icon{
	display: none;
}

+ 80 - 0
html/grzx/css/real-name-authentication.css

@ -0,0 +1,80 @@
.bgc-f2f3f4{
	background-color: #f2f3f4;
}
.c-ff9526{
	color: #ff9526;
}
.c-ff5e6c{
	color: #ff5e6c;	
}
.c-4dcd70{
	color: #4dcd70;
}
.c-f25{
	font-size: 25px;
}
.plr35{
	padding-left: 35px;
	padding-right: 35px;	
}
.p30{
	padding: 30px;
}
.p15{
	padding: 15px;
}
.pb25{
	padding-bottom: 25px;
}
.c-95{
	width: 92%;
}
.c-radius-5{
	border-radius: 5px;
}
.c-c8c8c8{
	color: #c8c8c8;	
}
.c-t-lr-radius-20{
	border-top-left-radius: 20px;
	border-top-right-radius: 20px;
}
.c-b-lr-radius-20{
	border-bottom-left-radius: 20px;
	border-bottom-right-radius: 20px;
}
.c-radius-20{
	border-radius: 10px;
}
.ptb13{
	padding-top: 13px;
	padding-bottom: 13px;	
}
.mt7{
	margin-top: 7px;
}
.pt12{
	padding-top: 12px;
}
[v-cloak] {
  display: none;
}
.div-item{
	width:100%;
	height: 90px;
	background:url(../images/kahao_bg_img.png) no-repeat;
	background-size:100% 90px;
}
.card-icon{
   background-repeat: no-repeat;
   background-image: url(../images/biaoqian_lvse_img.png);
   background-size: 100% 100%;
   padding:1px  10px 1px 18px;
   color:#ffffff;
}

+ 88 - 0
html/grzx/html/account-safe.html

@ -0,0 +1,88 @@
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<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" type="text/css" href="../../../css/mui.min.css" />
		<link rel="stylesheet" href="../../../css/cross.css">
		<link rel="stylesheet" href="../../../css/cross.ui.css">
		<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<link rel="stylesheet" href="../css/account-safe.css" />
	</head>
	<body class="bgc-f3f3f3 no-user-select" onselectstart="return false">
		<div id="memberContainer"></div>
		<div id="content" style="padding-top: 0px;padding-bottom: 30px;">
			<ul class="c-list c-border-tb mt10">
				<li class="c-list-text c-list-link" onclick="goPage('../../grzx/html/base-info.html')">
					<div class="c-list-info" style="width: 180px;">
						<h4>基本信息</h4>
					</div>
					<div class="c-list-info c-t-right">
						<div class="c-list-value">修改</div>
						<div class="c-arrow-r"></div>
					</div>
				</li>
				<li class="c-list-text c-list-link" onclick="goPage('../../grzx/html/real-name-authentication.html')">
					<div class="c-list-info" style="width: 180px;">
						<h4>实名认证</h4>
					</div>
					<div class="c-list-info c-t-right">
						<div class="c-list-value">修改</div>
						<div class="c-arrow-r"></div>
					</div>
				</li>
				<li class="c-list-text c-list-link" onclick="goPage('../../grzx/html/shenfenyz.html')">
					<div class="c-list-info" style="width: 180px;">
						<h4>绑定手机</h4>
					</div>
					<div class="c-list-info c-t-right">
						<div class="c-list-value">修改</div>
					</div>
					<div class="c-arrow-r"></div>
				</li>
				<li class="c-list-text c-list-link" onclick="goPage('../../grzx/html/shezhimima.html')">
					<div class="c-list-info" style="width: 180px;">
						<h4>登录密码</h4>
					</div>
					<div class="c-list-info c-t-right">
						<div class="c-list-value">修改</div>
					</div>
					<div class="c-arrow-r"></div>
				</li>
				<li class="c-list-text c-list-link" onclick="goPage('../../grzx/html/updateService.html')">
					<div class="c-list-info" style="width: 180px;">
						<h4>服务类型</h4>
					</div>
					<div class="c-list-info c-t-right">
						<div class="c-list-value">修改</div>
					</div>
					<div class="c-arrow-r"></div>
				</li>
			</ul>
			<div class="mt20 div-qiehuan-account" onclick="goPage('../../grzx/html/change-login.html')">
				<img src="../images/qiehuanjiaren02_icon.png" width="18" height="18" class="vam mr5">
				<span class="c-f17 c-333">切换家人账号</span>
			</div>
			<div class="mt20 div-logout">
				<img src="../images/tuichu_icon.png" width="18" height="18" class="vam mr5">
				<span class="c-f17 c-ff5e6c">退出当前账号</span>
			</div>
		</div>
		<script type="text/javascript" src="../../../js/post.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  src="../../../js/family-members.js"></script>
		<script type="text/javascript" src="../js/account-safe.js"></script>
	</body>
</html>

+ 98 - 0
html/grzx/html/base-info.html

@ -0,0 +1,98 @@
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<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" type="text/css" href="../../../css/mui.min.css" />
	<link rel="stylesheet" href="../../../css/cross.css">
	<link rel="stylesheet" href="../../../css/cross.ui.css">
	<link rel="stylesheet" href="../css/style.css">
	<link rel="stylesheet" type="text/css" href="../../../css/ss-style.css">
	<link rel="stylesheet" href="../css/my-detail.css">
	<link rel="stylesheet" type="text/css" href="../../../css/select-committee.css"/>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
	<link rel="stylesheet" href="../css/account-safe.css" />
	<style>
    	.mui-scroll{
    		width: auto!important;
    	}
    	a{
    	    color: #fff;
    	}
    	.c-list .c-list-link .c-list-value,
		.c-list .c-list-link .c-list-title {
			padding-right: 0;
			font-size: 14px;
			color: #999;
		}
    </style>
</head>
<body class="bgc-f3f3f3 no-user-select" onselectstart="return false">
	<div id="memberContainer"></div>
	<div id="content" style="padding-top: 0px;padding-bottom: 30px;">
		<ul class="c-list c-border-b">
			<li class="c-list-link" id="add-btn">
				<div class="c-list-info" onclick="file_head.click()" id="chooseImage">
					<h4 class="c-nowrap">头像</h4>
					<input type="file" class="c-hide" id="file_head" accept="image/*" onchange="clip_photo()">
				</div>
				<div class="c-list-value">
					<div class="c-avatar-m c-images-cycle">
						<img id="photo" class="img-sign" src="" onclick="viewImg(this)">
					</div>
				</div>
			</li>
			<li class="c-list-text c-list-link">
				<div class="c-list-info" style="width: 150px;">
					<h4>姓名</h4>
				</div>
				<div class="c-list-value c-f14 c-999" id="name"></div>
				<div class="c-list-value" id="mobile" style="display: none;"></div>
			</li>
			<li class="c-list-text c-list-link">
				<div class="c-list-info">
					<h4 class="c-nowrap">性别</h4>
				</div>
				<div class="c-list-value c-f14 c-999" id="sex"></div>
			</li>
			<li class="c-list-text c-list-link" onclick="updateAddress()">
				<div class="c-list-info" style="width: 180px;">
					<h4>详细地址</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value c-f14 c-333" style="padding-right: 0;" id="address"></div>
				</div>
				<div class="c-arrow-r"></div>
			</li>
	    </ul>
		<!--<div class="mb15 mlr15 mt20">
			<a href="javascript:;" style="font-size: 18px;" class="c-btn c-btn-4dcd70 c-btn-full c-btn-radius c-f16" onclick="saveData()">保存</a>
		</div>-->
	</div>
	
	<script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
    <script type="text/javascript" src="../../../js/app.js" ></script>
    <script type="text/javascript" src="../../../js/mui.min.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 src="../../../js/underscore.js"></script>
	<script src="../../../js/es6-promise.js"></script>
	<script src="../js/transform.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/alloy_finger.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/alloy_crop.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/lrz.all.bundle.js" type="text/javascript" charset="utf-8"></script>
    <!--<script src="../../../js/family-members.js"></script>-->
    <script src="../js/select-committee.js"></script>
    <!--<script src="../../../js/isRepresented.js"></script>-->
	<script type="text/javascript" src="../js/base-info.js" ></script>	
</body>
</html>

+ 189 - 0
html/grzx/html/my-detail-bak.html

@ -0,0 +1,189 @@
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<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" type="text/css" href="../../../css/mui.min.css" />
	<link rel="stylesheet" href="../../../css/cross.css">
	<link rel="stylesheet" href="../../../css/cross.ui.css">
	<link rel="stylesheet" href="../css/style.css">
	<link rel="stylesheet" type="text/css" href="../../../css/ss-style.css">
	<link rel="stylesheet" href="../css/my-detail.css">
	<link rel="stylesheet" type="text/css" href="../../../css/select-committee.css"/>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
	<style>
    	.mui-scroll{
    		width: auto!important;
    	}
    	a{
    	    color: #fff;
    	}
    </style>
</head>
<body class="bgc-f3f3f3 no-user-select" onselectstart="return false">
	<div id="memberContainer"></div>
	<div id="content" style="padding-top: 0px;padding-bottom: 30px;">
		<!-- 头像、签约信息开始 -->
		<ul class="c-list c-border-b">
			<li class="c-list-link" id="add-btn">
				<div class="c-list-info" onclick="file_head.click()" id="chooseImage">
					<h4 class="c-nowrap">头像</h4>
					<input type="file" class="c-hide" id="file_head" accept="image/*" onchange="clip_photo()">
				</div>
				<div class="c-list-value">
					<div class="c-avatar-m c-images-cycle">
						<img id="photo" class="img-sign" src="" onclick="viewImg(this)">
					</div>
				</div>
			</li>
			<li class="c-list-text c-list-link">
				<div class="c-list-info" style="width: 150px;">
					<h4>姓名</h4>
				</div>
				<div class="c-list-info c-t-right" >
				    <input type="text" id="name" class="width-100 text-right" placeholder="" value="" readonly="readonly"/>
				</div>
			</li>
			<li class="c-list-text c-list-link">
				<div class="c-list-info">
					<h4 class="c-nowrap">性别</h4>
				</div>
				<div class="c-list-value" id="sex"></div>
			</li>
	    </ul>
		<!-- 头像、签约信息 结束 -->
		<!-- 姓名等基本信息 开始 -->
		<ul class="c-list c-border-tb mt10">
			<li class="c-list-text c-list-link" onclick="updateMobile()">
				<div class="c-list-info">
					<h4 class="c-nowrap">手机号码</h4>
				</div>
				<div class="c-list-value" id="mobile"></div>
				<div class="c-arrow-r"></div>
			</li>
			
			<li class="c-list-text c-list-link" onclick="updatePwd()">
				<div class="c-list-info">
					<h4 class="c-nowrap">登录密码</h4>
				</div>
				<div class="c-list-value" id="pwd">更换</div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!-- 姓名等基本信息 结束 -->
		<!-- 身份证号码 各种号码 开始 -->
		<ul class="c-list c-border-tb mt10">
			
			<li class="c-list-text c-list-link">
				<div class="c-list-info">
					<h4 class="c-nowrap">身份证号</h4>
				</div>
				<div class="c-list-value" id="idcard"></div>
			</li>
			<li class="c-list-text c-list-link" onclick="updateSSC()">
				<div class="c-list-info" style="width: 180px;">
					<h4>医保卡号</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" id="ssc"></div>
					<div class="c-arrow-r"></div>
				</div>
			</li>
			<!--<li class="c-list-text c-list-link" id="elecard">
				<div class="c-list-info">
                    <h4 class="c-nowrap">电子社保卡</h4>
                </div>
                <div class="c-list-value" id="elecardStatus"></div>
                <div class="c-arrow-r"></div>
			</li>
		    <li class="c-list-text c-list-link" id="healthcard">
                <div class="c-list-info">
                    <h4 class="c-nowrap">电子健康卡</h4>
                </div>
                <div class="c-list-value"></div>
                <div class="c-arrow-r"></div>
            </li>-->
			<!--<li class="c-list-text c-list-link" id="selectType">
				<div class="c-list-info" style="width: 140px;">
					<h4>所属居委会</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" style="padding-right: 0;" id="committee"></div>
				</div>
				<div class="c-arrow-r"></div>
			</li>-->
			<li class="c-list-text c-list-link" onclick="updateAddress()">
				<div class="c-list-info" style="width: 180px;">
					<h4>详细地址</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" style="padding-right: 0;" id="address"></div>
				</div>
				<div class="c-arrow-r"></div>
			</li>
			<li class="c-list-text c-list-link" onclick="updateService()">
				<div class="c-list-info" style="width: 180px;">
					<h4>服务类型</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" style="padding-right: 0;" id="service"></div>
				</div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!-- 身份证号码 各种号码 结束 -->
		
		<ul class="c-list c-border-tb mt10 c-hide" id="myMedicine">
			<li class="c-list-text c-list-link" onclick="myMedicine()">
				<div class="c-list-info">
					<h4 class="c-nowrap">我的取药码</h4>
				</div>
				<div class="c-list-value" id="medicine"></div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!--1.4.3电子健康卡入口迁移至首页2级菜单入口 ,替换现有"意见反馈"入口。意见反馈入口移入“我的资料”-->
		<ul class="c-list c-border-tb mt10">
			<li class="c-list-text c-list-link" onclick="myFeedback()">
				<div class="c-list-info">
					<h4 class="c-nowrap">意见反馈</h4>
				</div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!--<div class="mt20 mlr15" id="divChangeLogin">
	        <a id="changeLogin" href="change-login.html" class="c-btn c-btn-full c-btn-radius c-f18" style="background-color: #ff9526">切换家人账号</a>
	    </div>-->
	    <div class="mlr15 mt20">
	        <a id="backLogin" href="javascript:;" class="c-btn c-btn-full c-btn-radius c-f18" style="background-color: #ff6a56">退出当前账号</a>
	    </div>
	</div>
	
	<script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
    <script type="text/javascript" src="../../../js/app.js" ></script>
    <script type="text/javascript" src="../../../js/mui.min.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 src="../../../js/underscore.js"></script>
	<script src="../../../js/es6-promise.js"></script>
	<script src="../js/transform.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/alloy_finger.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/alloy_crop.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/lrz.all.bundle.js" type="text/javascript" charset="utf-8"></script>
    <!--<script src="../../../js/family-members.js"></script>-->
    <script src="../js/select-committee.js"></script>
    <!--<script src="../../../js/isRepresented.js"></script>-->
	<script type="text/javascript" src="../js/my-detail-bak.js" ></script>	
</body>
</html>

+ 98 - 183
html/grzx/html/my-detail.html

@ -1,189 +1,104 @@
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<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" type="text/css" href="../../../css/mui.min.css" />
	<link rel="stylesheet" href="../../../css/cross.css">
	<link rel="stylesheet" href="../../../css/cross.ui.css">
	<link rel="stylesheet" href="../css/style.css">
	<link rel="stylesheet" type="text/css" href="../../../css/ss-style.css">
	<link rel="stylesheet" href="../css/my-detail.css">
	<link rel="stylesheet" type="text/css" href="../../../css/select-committee.css"/>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
	<style>
    	.mui-scroll{
    		width: auto!important;
    	}
    	a{
    	    color: #fff;
    	}
    </style>
</head>
<body class="bgc-f3f3f3 no-user-select" onselectstart="return false">
	<div id="memberContainer"></div>
	<div id="content" style="padding-top: 0px;padding-bottom: 30px;">
		<!-- 头像、签约信息开始 -->
		<ul class="c-list c-border-b">
			<li class="c-list-link" id="add-btn">
				<div class="c-list-info" onclick="file_head.click()" id="chooseImage">
					<h4 class="c-nowrap">头像</h4>
					<input type="file" class="c-hide" id="file_head" accept="image/*" onchange="clip_photo()">
				</div>
				<div class="c-list-value">
					<div class="c-avatar-m c-images-cycle">
						<img id="photo" class="img-sign" src="" onclick="viewImg(this)">
					</div>
				</div>
			</li>
			<li class="c-list-text c-list-link">
				<div class="c-list-info" style="width: 150px;">
					<h4>姓名</h4>
				</div>
				<div class="c-list-info c-t-right" >
				    <input type="text" id="name" class="width-100 text-right" placeholder="" value="" readonly="readonly"/>
				</div>
			</li>
			<li class="c-list-text c-list-link">
				<div class="c-list-info">
					<h4 class="c-nowrap">性别</h4>
				</div>
				<div class="c-list-value" id="sex"></div>
			</li>
	    </ul>
		<!-- 头像、签约信息 结束 -->
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<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">
		<script src="../../../js/head.js"></script>
		<link rel="stylesheet" type="text/css" href="../css/my-detail.css" />
	</head>
		<!-- 姓名等基本信息 开始 -->
		<ul class="c-list c-border-tb mt10">
			<li class="c-list-text c-list-link" onclick="updateMobile()">
				<div class="c-list-info">
					<h4 class="c-nowrap">手机号码</h4>
				</div>
				<div class="c-list-value" id="mobile"></div>
				<div class="c-arrow-r"></div>
			</li>
			
			<li class="c-list-text c-list-link" onclick="updatePwd()">
				<div class="c-list-info">
					<h4 class="c-nowrap">登录密码</h4>
				</div>
				<div class="c-list-value" id="pwd">更换</div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!-- 姓名等基本信息 结束 -->
	<body class="bgc-f3f3f3 no-user-select" onselectstart="return false">
		<!--<div id="memberContainer"></div>-->
		<div id="content" style="padding-top: 0px;padding-bottom: 30px;">
			<div class="div-head-content">
				<img id="photo" src="" width="60" height="60" class="portrait-img" />
				<div>
					<div class="c-f18 c-fff mt25" id="name">张三</div>
					<img src="../images/01weixin_icon.png" width="20" height="20" class="mt5 weixing-icon" />
				</div>
				<img src="../images/qiehuanjiaren_icon.png" width="33" height="33" class="qiehuan-jiaren" onclick="goPage('../../grzx/html/change-login.html')" />
			</div>
			<div class="mb10">
				<ul class="app-list list-bg-1">
					<li onclick="goPage('../../wdyy/html/yuyuejilu.html')">
						<img src="../images/yuyuehao_icon.png" width="40">
						<div class="mt10">预约号</div>
					</li>
					<li onclick="goPage('../../payment/html/PatientIDCards.html')">
						<img src="../images/jiuzhenka_icon.png" width="40">
						<div class="mt10">我的卡包</div>
					</li>
					<li onclick="goPage('../../jtgx/html/family.html')">
						<img src="../images/jiaren_icon.png" width="40">
						<div class="mt10">我的家人</div>
					</li>
					<li onclick="goPage('../../yszx/html/focused-doctor.html')">
						<img src="../images/guanzhuyisheng_icon.png" width="40">
						<div class="mt10">我的医生</div>
					</li>
				</ul>
			</div>
			<ul class="bgc-fff div-type-content c-list c-border-t">
				<li class="cur-pit clearfix" onclick="goPage('../../grzx/html/account-safe.html')">
					<div class="c-list-key">
						<img src="../images/zhanghaoanquan_icon.png" width="14" height="16" class="" />
					</div>
					<div class="c-list-info">
						<span class="c-f17 c-333">账户和安全</span>
						<img src="../images/tiaozhuan_icon.png" width="7" height="14" class="fr mr15" />
					</div>
				</li>
				<li class="cur-pit clearfix" onclick="goPage('../../payment/html/paymentList.html')">
					<div class="c-list-key">
						<img src="../images/jiaofeichaxuan_icon.png" width="14" height="16" class="" />
					</div>
					<div class="c-list-info">
						<span class="c-f17 c-333">缴费查询</span>
						<img src="../images/tiaozhuan_icon.png" width="7" height="14" class="mr15 fr" />
					</div>
				</li>
				<li class="cur-pit clearfix" onclick="goPage('../../informationSearch/html/waitingDoctorList.html')">
					<div class="c-list-key">
						<img src="../images/houzhenchaxuan_icon.png" width="14" height="16" class="" />
					</div>
					<div class="c-list-info">
						<span class="c-f17 c-333">候诊查询</span>
						<img src="../images/tiaozhuan_icon.png" width="7" height="14" class="mr15 fr" />
					</div>
				</li>
				<!--<li class="cur-pit clearfix" onclick="goPage('../../personal/html/safeIndex.html')">
					<div class="c-list-key">
						<img src="../images/baogaochaxuan_icon.png" width="14" height="16" class="" />
					</div>
					<div class="c-list-info">
						<span class="c-f17 c-333">报告查询</span>
						<img src="../images/tiaozhuan_icon.png" width="7" height="14" class="mr15 fr" />
					</div>
				</li>-->
				<li class="cur-pit clearfix" onclick="goPage('../../yjfk/html/feedback.html')">
					<div class="c-list-key">
						<img src="../images/yijianfankui_icon.png" width="14" height="16" class="" />
					</div>
					<div class="c-list-info">
						<span class="c-f17 c-333">意见反馈</span>
						<img src="../images/tiaozhuan_icon.png" width="7" height="14" class="mr15 fr" />
					</div>
				</li>
			</ul>
		</div>
		<script type="text/javascript" src="../../../js/post.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  src="../../../js/family-members.js"></script>
		<script type="text/javascript" src="../js/my-detail.js" ></script>
	</body>
		<!-- 身份证号码 各种号码 开始 -->
		<ul class="c-list c-border-tb mt10">
			
			<li class="c-list-text c-list-link">
				<div class="c-list-info">
					<h4 class="c-nowrap">身份证号</h4>
				</div>
				<div class="c-list-value" id="idcard"></div>
			</li>
			<li class="c-list-text c-list-link" onclick="updateSSC()">
				<div class="c-list-info" style="width: 180px;">
					<h4>医保卡号</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" id="ssc"></div>
					<div class="c-arrow-r"></div>
				</div>
			</li>
			<!--<li class="c-list-text c-list-link" id="elecard">
				<div class="c-list-info">
                    <h4 class="c-nowrap">电子社保卡</h4>
                </div>
                <div class="c-list-value" id="elecardStatus"></div>
                <div class="c-arrow-r"></div>
			</li>
		    <li class="c-list-text c-list-link" id="healthcard">
                <div class="c-list-info">
                    <h4 class="c-nowrap">电子健康卡</h4>
                </div>
                <div class="c-list-value"></div>
                <div class="c-arrow-r"></div>
            </li>-->
			<!--<li class="c-list-text c-list-link" id="selectType">
				<div class="c-list-info" style="width: 140px;">
					<h4>所属居委会</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" style="padding-right: 0;" id="committee"></div>
				</div>
				<div class="c-arrow-r"></div>
			</li>-->
			<li class="c-list-text c-list-link" onclick="updateAddress()">
				<div class="c-list-info" style="width: 180px;">
					<h4>详细地址</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" style="padding-right: 0;" id="address"></div>
				</div>
				<div class="c-arrow-r"></div>
			</li>
			<li class="c-list-text c-list-link" onclick="updateService()">
				<div class="c-list-info" style="width: 180px;">
					<h4>服务类型</h4>
				</div>
				<div class="c-list-info c-t-right" >
					<div class="c-list-value" style="padding-right: 0;" id="service"></div>
				</div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!-- 身份证号码 各种号码 结束 -->
		
		<ul class="c-list c-border-tb mt10 c-hide" id="myMedicine">
			<li class="c-list-text c-list-link" onclick="myMedicine()">
				<div class="c-list-info">
					<h4 class="c-nowrap">我的取药码</h4>
				</div>
				<div class="c-list-value" id="medicine"></div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!--1.4.3电子健康卡入口迁移至首页2级菜单入口 ,替换现有"意见反馈"入口。意见反馈入口移入“我的资料”-->
		<ul class="c-list c-border-tb mt10">
			<li class="c-list-text c-list-link" onclick="myFeedback()">
				<div class="c-list-info">
					<h4 class="c-nowrap">意见反馈</h4>
				</div>
				<div class="c-arrow-r"></div>
			</li>
		</ul>
		<!--<div class="mt20 mlr15" id="divChangeLogin">
	        <a id="changeLogin" href="change-login.html" class="c-btn c-btn-full c-btn-radius c-f18" style="background-color: #ff9526">切换家人账号</a>
	    </div>-->
	    <div class="mlr15 mt20">
	        <a id="backLogin" href="javascript:;" class="c-btn c-btn-full c-btn-radius c-f18" style="background-color: #ff6a56">退出当前账号</a>
	    </div>
	</div>
	
	<script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
    <script type="text/javascript" src="../../../js/app.js" ></script>
    <script type="text/javascript" src="../../../js/mui.min.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 src="../../../js/underscore.js"></script>
	<script src="../../../js/es6-promise.js"></script>
	<script src="../js/transform.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/alloy_finger.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/alloy_crop.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/lrz.all.bundle.js" type="text/javascript" charset="utf-8"></script>
    <!--<script src="../../../js/family-members.js"></script>-->
    <script src="../js/select-committee.js"></script>
    <!--<script src="../../../js/isRepresented.js"></script>-->
	<script type="text/javascript" src="../js/my-detail.js" ></script>	
</body>
</html>

+ 58 - 0
html/grzx/html/real-name-authentication.html

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge">
		<title>实名认证</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="shortcut icon" href="../../../favicon.ico">
		<link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
		<link rel="stylesheet" href="../css/real-name-authentication.css" />		
	</head>
	<body class="bgc-f2f3f4">
		<div id="app" v-cloak>
			<div  class="plr15">				
				<div class="bgc-fff mt10 div-item c-radius-20 c-f14">
					<div class="pt12 pb5 pl15">
						<span class="c-999">身份证号</span>
						<span  class="fr">
							<span class="card-icon c-f14">已认证</span>
						</span>						
					</div>	
					<div class="pt15 pb10 c-t-left pl15 c-333">
						{{baseInfo.idcard}}
					</div>
				</div>
				<div class="bgc-fff mt10 div-item c-radius-20 c-f14">
					<div class="pt12 pb5 pl15">
						<span class="c-999">医保卡号</span>
						<span  class="fr">
							<span class="card-icon c-f14" v-if="baseInfo.ssc">已绑定</span>
							<span class="card-icon c-f14" v-if="!baseInfo.ssc">未绑定</span>
						</span>						
					</div>	
					<div class="pt15 pb10 c-t-left pl15 c-333">
						{{baseInfo.ssc}}<span class="fr c-f14 c-4dcd70 mr20" @tap="updateSsc">修改</span>
					</div>
				</div>
				<!--<div class="mb15 mlr15 mt20">
					<a href="javascript:;" style="font-size: 18px;" class="c-btn c-btn-4dcd70 c-btn-full c-btn-radius c-f16" onclick="history.back()">返回</a>
				</div>-->
			</div>
			
		</div>
		<script src="../../../js/post.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 src="../js/real-name-authentication.js"></script>
	</body>
</html>

+ 1 - 1
html/grzx/html/update-ssc.html

@ -127,7 +127,7 @@
						    content: '修改医保卡号成功',
						    okValue:'确定',
						    ok: function (){				            		
						      	window.location.href = "my-detail.html?type=" + type + "&openid=" + openid;
						      	window.location.href = "real-name-authentication.html";
						    }
				   	}).showModal();
				} else {

+ 11 - 4
html/grzx/html/updateService.html

@ -63,15 +63,22 @@
			Request = GetRequest();
			var openid = Request["openid"];
			var type = Number(Request["type"]);
			var service = Request["service"];
			var service = "";
			var doctor = Request["doctor"];
			var userAgent = window.localStorage.getItem(agentName);
			$(function() {
				var paramAgent = $.parseJSON(window.localStorage.getItem("paramAgent", paramAgent))
				if(!service){service=1}
				checkUserAgent();
				getServices();
				getBaseInfo();
			})
			
			function getBaseInfo(){
				sendPost("/patient/baseinfo", {}, 'JSON', 'post', queryFailed, function(res) {
					service = res.data.label;
					if(!service){service=1}
					getServices();
				})
			}
			function getServices() {
				d.show();
@ -156,7 +163,7 @@
				dd.showModal();
				var _active = $("#_service li.active");
				var params = {
					patient: window.localStorage.getItem("firstUid"),
					patient: JSON.parse(window.localStorage.getItem(agentName)).represented || JSON.parse(window.localStorage.getItem(agentName)).uid,
					name: window.localStorage.getItem("firstName"),
					label: _active.attr("data-code"),
					labelName: _active.attr("data-name"),

+ 1 - 1
html/grzx/html/xiugaidizhi.html

@ -124,7 +124,7 @@
						    content: '修改地址成功',
						    okValue:'确定',
						    ok: function (){	            		
						      	window.location.href = "my-detail.html?type=" + type + "&openid=" + openid;
						      	window.location.href = "base-info.html?type=" + type + "&openid=" + openid;
						    }
				   	}).showModal();
				} else {

BIN
html/grzx/images/01weixin_icon.png


BIN
html/grzx/images/baogaochaxuan_icon.png


BIN
html/grzx/images/biaoqian_lvse_img.png


BIN
html/grzx/images/geduan_img.png


BIN
html/grzx/images/guanzhuyisheng_icon.png


BIN
html/grzx/images/houzhenchaxuan_icon.png


BIN
html/grzx/images/jiaofeichaxuan_icon.png


BIN
html/grzx/images/jiaren_icon.png


BIN
html/grzx/images/jiuzhenka_icon.png


BIN
html/grzx/images/kahao_bg_img.png


BIN
html/grzx/images/qiehuanjiaren02_icon.png


BIN
html/grzx/images/qiehuanjiaren_icon.png


BIN
html/grzx/images/tiaozhuan_icon.png


BIN
html/grzx/images/tuichu_icon.png


BIN
html/grzx/images/wode_bg_img.png


BIN
html/grzx/images/yijianfankui_icon.png


BIN
html/grzx/images/yuyuehao_icon.png


BIN
html/grzx/images/zhanghaoanquan_icon.png


+ 24 - 0
html/grzx/js/account-safe.js

@ -0,0 +1,24 @@
var userAgent = window.localStorage.getItem(agentName);
var firstUid = window.localStorage.getItem("firstUid");
if(firstUid == null || firstUid == undefined){
	$('.div-qiehuan-account').hide()
}
appendFamilyMember($('#memberContainer'), function() {
	var jsonstr = $.parseJSON(window.localStorage.getItem(agentName));
	if(jsonstr.uid == jsonstr.represented) {
		$('.div-qiehuan-account').show()
	} else {
		$('.div-qiehuan-account').hide()
	}
}, function() {
	//判断有授权家人,修改样式
	if($('#memberContainer').is(':hidden')) {
		$('#content').css('padding-top', '0px');
	} else {
		$('#content').css('padding-top', '90px');
	}
});
function goPage(url){
	window.location.href = url
}

+ 466 - 0
html/grzx/js/base-info.js

@ -0,0 +1,466 @@
var d = dialog({contentType:'load', skin:'bk-popup'});
var d1 = dialog({contentType:'load', skin:'bk-popup',content:'退出中..'});
var pagetype = 4;
var openid =null;
var userAgent = window.localStorage.getItem(agentName);
var firstUid = window.localStorage.getItem("firstUid");
var serviceLabel="";
var bindCardUrl = "",
    bindCardStatus;
$(function() {	
	checkUserAgent();
});	
//appendFamilyMember($('#memberContainer'),function(){
//	queryInit();
//	clearCommittee()
//	var jsonstr = $.parseJSON(window.localStorage.getItem(agentName));
//	if(jsonstr.uid == jsonstr.represented){
//		$('#divChangeLogin').show()
//		//判断是否可以在线支付
//      if(canPayOnline){
//          $("#elecard").show();
//      }else{
//          $("#elecard").hide();
//      }
//	}else{
//		$('#divChangeLogin').hide()
//		$("#elecard").hide();
//	}
//},function(){
//	//判断有授权家人,修改样式
//	if($('#memberContainer').is(':hidden')){
//		$('#content').css('padding-top','0px');
//	}else{
//		$('#content').css('padding-top','90px');
//	}
//});
function queryInit(){
	d.show();
	var jsonstr = $.parseJSON(userAgent);
    openid = jsonstr.openid;
    if(firstUid == null || firstUid == undefined){
        document.getElementById("divChangeLogin").style.display='none';
    }
//	isRepresent(function() {
		//查询用户信息
		query();
		
	    getWeixinSign();
	    bindEvents();
	    //选择居委会
	    selectCommittee()
//	})
    
}
//获得微信sdk信息
function getWeixinSign(){
    var params1 = {};
    params1.pageUrl = server + "wx/html/grzx/html/my-detail.html&state=STATE";
    
    $.ajax(server + "weixin/getSign", {
        data: params1,
        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: [
                        'chooseImage',
                        'uploadImage'
                    ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
                });
            } 
        }
    }); 
}
//跳转到三师信息
function changeSanshi(){
	window.location.href = "../../qygl/html/signing-doctors.html";
}
//跳转到家庭签约信息
function changeJtqy(signedStatus){
	if(signedStatus) {
		window.location.href = "../../ssgg/html/doctor-homepage-new.html"
	} else {
		window.location.href = "../../qygl/html/signing-doctors.html"
	}
}
//查询列表
function query() {
//	var data={};
//	sendPost('patient/baseinfo', data, 'json', 'post', queryFailed, querySuccess);
    //初始查询患者基本信息,然后调用接口判断该患者是否已绑定电子社保卡
    var reqParams = [{
        url: "patient/baseinfo",
        data: {},
        reqType: 'post'
    }]
    getReqPromises(reqParams).then(function(ress){
        querySuccess(ress[0]);
        //处理绑卡
//      var res2 = ress[1];
//      if(res2.data.bindStatus == '030007'){
//          bindCardStatus = false;
//          bindCardUrl = res2.data.sicardUrl;
//      }else if(res2.data.bindStatus == '000000'){
//          bindCardStatus = true;
//          bindCardUrl = res2.data.sicardUrl;
//      }else{
//          dialog({contentType:'tipsbox', skin:'bk-popup' , content:res2.msg}).show();
//      }
//      //判断是否可以在线支付
//      if(canPayOnline){
//          $("#elecard").show();
//          $("#elecardStatus").text(bindCardStatus? "已绑定" : "未绑定");
//      }else{
//          $("#elecard").hide();
//      }
    });
}
function queryFailed(res) {
	d.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 querySuccess(res) {
	d.close();
	if (res.status == 200) {
		setValue(res.data);	
//		if($("#ssc").val() != ""){
//			$("#ssc").attr("readonly","readonly");
//		}
		//取药码
		if(res.data.prescription == 1){
			$('#myMedicine').show()
		}else{
			$('#myMedicine').hide()
		}
	}
}
function  bindEvents(){
    $("#backLogin").click(function (){
        dialog({
            content:'您确定继续退出登录吗?',
            ok: function (){
                d1.show()
                sendPost("patient/wxloginout",{},"JSON","POST",function(res){
                    d1.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(res){
                    d1.close()
                    if(res.status==200){
                        clearAgent();
                        window.localStorage.removeItem("isTiXingVideoFaSong");//清除咨询详情移动网络下,用户点击不再提醒后的处理,换账号登陆后,还可以重新提醒
                        var url = window.location.href;
                        saveAgentPage(url);
                        location.replace("../../home/html/login.html?openid="+openid+"&loginType=password");
                    }else{
                        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(); 
                        }   
                    }
                })
            
            },
            cancel: function () {
                return;
            }
        }).showModal();
    });
    
    //绑定电子社保卡
    $('#elecard').on('tap',function(){
        if(!bindCardStatus){
            dialog({
                content: '当前未绑定电子社保卡,无法进行线上缴费,是否立即绑定',
                cancelValue: '不了,谢谢',
                cancel: function () {},
                okValue:'是',
                ok: function (){
                    window.location.href = bindCardUrl;
                }
            }).showModal();
        }else {
            window.location.href = bindCardUrl;
        }
    });
    
    //电子健康卡点击事件
    $("#healthcard").on('tap', function(){
    	window.location.href = "my-health-card.html"
//      d.show();
//      var url = "/patient/ehc/redirecturl";
//      sendPost(url, {}, 'json', 'post', queryFailed, function(res){
//          if(res.status == 200){
//              d.close();
//              window.location.href = res.data;
//          }else{
//              queryFailed(res);
//          }
//      })
    })
}
//初始化页面数据
function setValue(data){
	var photo = data.photo;
	var name = data.name;
	var sex = data.sex;
	var mobile = data.mobile;
	var idcard = data.idcard;
	var ssc = data.ssc;
	var address = data.address;
	var sign = Number(data.sign);
	var service=data.labelName;
	serviceLabel=data.label;
	var sexName = "女";
	if(sex == 1) {
		sexName = "男";
	}
	if(!photo){
		photo = "../../../images/p-default.png";
	}	
	if(!name) name = "";
	if(!mobile) mobile = "";
	if(!idcard) idcard = "";
	if(!ssc) ssc = "";
	if(!address) address = "";
	if(!service) {service="必填";$("#service").addClass("li-circle");}else{
		$("#service").removeClass("li-circle");
	}
	
	document.getElementById("photo").src = getImgUrl(photo);
	document.getElementById("name").innerHTML = name;			
	document.getElementById("sex").innerHTML = sexName;
	document.getElementById("mobile").innerHTML = mobile;
//	document.getElementById("idcard").innerHTML = idcard;
//	document.getElementById("ssc").innerHTML = ssc;
	document.getElementById("address").innerHTML = address;
//	document.getElementById("service").innerHTML = service;
	$('#committee').text(data.countryName);
}
// 添加文件
function appendFile(p) {
	document.getElementById("photo").src = p;
	$("#photo").attr("data-src",p);
}
//获取需要上传的图片
function getImages() {
	var images = [];
	var imgSrc = $("#photo").attr("data-src");
	images.push(imgSrc);
	return images;
}
//剪切图片
function clip_photo(){
    $("#content").addClass("c-hide");
    $("#clipPanel").removeClass("c-hide");
    var photo = document.getElementById('file_head');
    lrz(photo.files[0]).then(function (rst) {
        var url = rst.base64;
        new AlloyCrop({
            image_src: url,
            width: document.documentElement.clientWidth,
            height: document.documentElement.clientWidth,
            ok_text: "保存",
            cancel_text: "取消",
            ok: function (base64, canvas) {
                $("#content").removeClass("c-hide");
                var data=base64.split(',')[1];
                data=window.atob(data);
                var ia = new Uint8Array(data.length);
                for (var i = 0; i < data.length; i++) {
                    ia[i] = data.charCodeAt(i);
                }
                var blob=new Blob([ia],{type:"image/png",endings:'transparent'});
                var fd=new FormData();
                fd.append('file',blob,'image.png');
                
                var new_url = URL.createObjectURL(blob);
                appendFile(new_url);
                $.ajax(server + 'upload/image', {
                    data: fd,
                    dataType: 'json',
                    contentType: false,
                    cache: false,
                    processData: false,
                    beforeSend: function(request) {
                        request.setRequestHeader("userAgent", userAgent);
                    },
                    type: 'post',
                    error: function(res) {
                        if(res.status == 999 || res.status == 998 || res.status == 997){
                            loginUrl(res.status);
                            return;
                        }
                        clickCount = 0;
                    },
                    success: function(res) {
                        if(res.status == 999 || res.status == 998 || res.status == 997){
                            loginUrl(res.status);
                            return;
                        }
                        var params = {};
                        params.photo = res.urls;
                        var patientUrl = res.urls;
                        sendPost('patient/save', params, 'json', 'post', submitFailed, submitSuccess);
                        clickCount = 0;
                    }
                });
            },
            cancel: function () {
                $("#content").removeClass("c-hide");
                window.location.reload();
            }
        });
    })
    .catch(function (err){
        // 处理失败会执行
        console.log(err);
    });
    
}
// 上传头像
var serverId = "";
function chooseImage(){
	wx.chooseImage({
	  count: 1, 
      success: function (res) {
      	appendFile(res.localIds[0]);
        uploadImage();
      }
    });
}	
//获取微信上传图片的媒体ID
function uploadImage(){
	var images = getImages();
	if (images.length == 0) {
      return;
    }
    var i = 0, length = images.length;
    serverId = "";
    function upload() {
      wx.uploadImage({
        localId: images[i],
        success: function (res) {
          i++;
          if(serverId.length == 0){
          	serverId = res.serverId;
          }
          else{
          	serverId =serverId + "," + res.serverId;
          }          
          if (i < length) {
            upload();
          }
          if(i == images.length){
          	update_photo();
          }          
        },
        fail: function (res) {
          alert(JSON.stringify(res));
        }
      });
    }
    upload();
}	
//上传图片到服务器上
function update_photo(){
	var params = {};
	params.mediaIds = serverId;	
	sendPost('patient/save', params, 'json', 'post', submitFailed, submitSuccess);
}
//上传失败
function submitFailed(res) {
	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 submitSuccess(res) {
	if (res.status == 200) {
	    $("#content").removeClass("c-hide");
	    $("#clipPanel").addClass("c-hide");
	    dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:"修改成功"}).show();      
	} else {
		submitFailed(res);
	}
}	
//查看图片
function viewImg(dom) {
	var $img = $(dom);
	var thissrc = $img.attr("data-src");
	var mWid = $(window).width();
	var mHei = $(window).height();
	var nHtml = '<div class="delimgpop"><div class="del-img-box"><div class="del-img-con"><img class="del-pop-img" src="' + thissrc + '" style="max-width:' + mWid + 'px; max-height:' + mHei + 'px;"></div></div></div>';
	$("body").append(nHtml);
	$(".delimgpop").click(function() {
		$(this).remove()
	});
};
function myMedicine(){
	window.location.href = "../../prescription/html/my-medicine-code.html";
}
function myFeedback(){
	window.location.href = "../../yjfk/html/feedback.html";
}
function updatePwd(){
	var mobile = $('#mobile').html();
	window.location.href = "shezhimima.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateAddress(){
	var address = $('#address').html();
	var mobile = $('#mobile').html();
	var paramAgent = "{\"type\":" + pagetype + ",\"openid\":\"" + openid + "\",\"address\":\"" + encodeURI(address) + "\"}";
	window.localStorage.setItem("paramAgent", paramAgent);
	window.location.href = "xiugaidizhi.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateMobile(){
	var mobile = $.trim($('#mobile').html());
	if(mobile.length==0)
		window.location.href = "bangdingsj.html?type=" + pagetype + "&openid=" + openid + "&1=1";
	else
		window.location.href = "shenfenyz.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateSSC(){
	var ssc = $.trim($('#ssc').html());
	window.location.href = "update-ssc.html?type=" + pagetype + "&openid=" + openid + "&ssc="+ ssc + "&1=1";
}
function updateService(){
	window.location.href = "updateService.html?type=" + pagetype + "&openid=" + openid + "&service=" + serviceLabel + "&1=1";
}

+ 465 - 0
html/grzx/js/my-detail-bak.js

@ -0,0 +1,465 @@
var d = dialog({contentType:'load', skin:'bk-popup'});
var d1 = dialog({contentType:'load', skin:'bk-popup',content:'退出中..'});
var pagetype = 4;
var openid =null;
var userAgent = window.localStorage.getItem(agentName);
var firstUid = window.localStorage.getItem("firstUid");
var serviceLabel="";
var bindCardUrl = "",
    bindCardStatus;
$(function() {	
	checkUserAgent();
});	
//appendFamilyMember($('#memberContainer'),function(){
//	queryInit();
//	clearCommittee()
//	var jsonstr = $.parseJSON(window.localStorage.getItem(agentName));
//	if(jsonstr.uid == jsonstr.represented){
//		$('#divChangeLogin').show()
//		//判断是否可以在线支付
//      if(canPayOnline){
//          $("#elecard").show();
//      }else{
//          $("#elecard").hide();
//      }
//	}else{
//		$('#divChangeLogin').hide()
//		$("#elecard").hide();
//	}
//},function(){
//	//判断有授权家人,修改样式
//	if($('#memberContainer').is(':hidden')){
//		$('#content').css('padding-top','0px');
//	}else{
//		$('#content').css('padding-top','90px');
//	}
//});
function queryInit(){
	d.show();
	var jsonstr = $.parseJSON(userAgent);
    openid = jsonstr.openid;
    if(firstUid == null || firstUid == undefined){
        document.getElementById("divChangeLogin").style.display='none';
    }
//	isRepresent(function() {
		//查询用户信息
		query();
		
	    getWeixinSign();
	    bindEvents();
	    //选择居委会
	    selectCommittee()
//	})
    
}
//获得微信sdk信息
function getWeixinSign(){
    var params1 = {};
    params1.pageUrl = server + "wx/html/grzx/html/my-detail.html&state=STATE";
    
    $.ajax(server + "weixin/getSign", {
        data: params1,
        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: [
                        'chooseImage',
                        'uploadImage'
                    ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
                });
            } 
        }
    }); 
}
//跳转到三师信息
function changeSanshi(){
	window.location.href = "../../qygl/html/signing-doctors.html";
}
//跳转到家庭签约信息
function changeJtqy(signedStatus){
	if(signedStatus) {
		window.location.href = "../../ssgg/html/doctor-homepage-new.html"
	} else {
		window.location.href = "../../qygl/html/signing-doctors.html"
	}
}
//查询列表
function query() {
//	var data={};
//	sendPost('patient/baseinfo', data, 'json', 'post', queryFailed, querySuccess);
    //初始查询患者基本信息,然后调用接口判断该患者是否已绑定电子社保卡
    var reqParams = [{
        url: "patient/baseinfo",
        data: {},
        reqType: 'post'
    }]
    getReqPromises(reqParams).then(function(ress){
        querySuccess(ress[0]);
        //处理绑卡
//      var res2 = ress[1];
//      if(res2.data.bindStatus == '030007'){
//          bindCardStatus = false;
//          bindCardUrl = res2.data.sicardUrl;
//      }else if(res2.data.bindStatus == '000000'){
//          bindCardStatus = true;
//          bindCardUrl = res2.data.sicardUrl;
//      }else{
//          dialog({contentType:'tipsbox', skin:'bk-popup' , content:res2.msg}).show();
//      }
//      //判断是否可以在线支付
//      if(canPayOnline){
//          $("#elecard").show();
//          $("#elecardStatus").text(bindCardStatus? "已绑定" : "未绑定");
//      }else{
//          $("#elecard").hide();
//      }
    });
}
function queryFailed(res) {
	d.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 querySuccess(res) {
	d.close();
	if (res.status == 200) {
		setValue(res.data);	
//		if($("#ssc").val() != ""){
//			$("#ssc").attr("readonly","readonly");
//		}
		//取药码
		if(res.data.prescription == 1){
			$('#myMedicine').show()
		}else{
			$('#myMedicine').hide()
		}
	}
}
function  bindEvents(){
    $("#backLogin").click(function (){
        dialog({
            content:'您确定继续退出登录吗?',
            ok: function (){
                d1.show()
                sendPost("patient/wxloginout",{},"JSON","POST",function(res){
                    d1.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(res){
                    d1.close()
                    if(res.status==200){
                        clearAgent();
                        window.localStorage.removeItem("isTiXingVideoFaSong");//清除咨询详情移动网络下,用户点击不再提醒后的处理,换账号登陆后,还可以重新提醒
                        var url = window.location.href;
                        saveAgentPage(url);
                        location.replace("../../home/html/login.html?openid="+openid+"&loginType=password");
                    }else{
                        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(); 
                        }   
                    }
                })
            
            },
            cancel: function () {
                return;
            }
        }).showModal();
    });
    
    //绑定电子社保卡
    $('#elecard').on('tap',function(){
        if(!bindCardStatus){
            dialog({
                content: '当前未绑定电子社保卡,无法进行线上缴费,是否立即绑定',
                cancelValue: '不了,谢谢',
                cancel: function () {},
                okValue:'是',
                ok: function (){
                    window.location.href = bindCardUrl;
                }
            }).showModal();
        }else {
            window.location.href = bindCardUrl;
        }
    });
    
    //电子健康卡点击事件
    $("#healthcard").on('tap', function(){
    	window.location.href = "my-health-card.html"
//      d.show();
//      var url = "/patient/ehc/redirecturl";
//      sendPost(url, {}, 'json', 'post', queryFailed, function(res){
//          if(res.status == 200){
//              d.close();
//              window.location.href = res.data;
//          }else{
//              queryFailed(res);
//          }
//      })
    })
}
//初始化页面数据
function setValue(data){
	var photo = data.photo;
	var name = data.name;
	var sex = data.sex;
	var mobile = data.mobile;
	var idcard = data.idcard;
	var ssc = data.ssc;
	var address = data.address;
	var sign = Number(data.sign);
	var service=data.labelName;
	serviceLabel=data.label;
	
	var sexName = "女";
	if(sex == 1) {
		sexName = "男";
	}
	if(!photo){
		photo = "../../../images/p-default.png";
	}	
	if(!name) name = "";
	if(!mobile) mobile = "";
	if(!idcard) idcard = "";
	if(!ssc) ssc = "";
	if(!address) address = "";
	if(!service) {service="必填";$("#service").addClass("li-circle");}else{
		$("#service").removeClass("li-circle");
	}
	
	document.getElementById("photo").src = getImgUrl(photo);
	document.getElementById("name").value = name;			
	document.getElementById("sex").innerHTML = sexName;
	document.getElementById("mobile").innerHTML = mobile;
	document.getElementById("idcard").innerHTML = idcard;
	document.getElementById("ssc").innerHTML = ssc;
	document.getElementById("address").innerHTML = address;
	document.getElementById("service").innerHTML = service;
	$('#committee').text(data.countryName);
}
// 添加文件
function appendFile(p) {
	document.getElementById("photo").src = p;
	$("#photo").attr("data-src",p);
}
//获取需要上传的图片
function getImages() {
	var images = [];
	var imgSrc = $("#photo").attr("data-src");
	images.push(imgSrc);
	return images;
}
//剪切图片
function clip_photo(){
    $("#content").addClass("c-hide");
    $("#clipPanel").removeClass("c-hide");
    var photo = document.getElementById('file_head');
    lrz(photo.files[0]).then(function (rst) {
        var url = rst.base64;
        new AlloyCrop({
            image_src: url,
            width: document.documentElement.clientWidth,
            height: document.documentElement.clientWidth,
            ok_text: "保存",
            cancel_text: "取消",
            ok: function (base64, canvas) {
                $("#content").removeClass("c-hide");
                var data=base64.split(',')[1];
                data=window.atob(data);
                var ia = new Uint8Array(data.length);
                for (var i = 0; i < data.length; i++) {
                    ia[i] = data.charCodeAt(i);
                }
                var blob=new Blob([ia],{type:"image/png",endings:'transparent'});
                var fd=new FormData();
                fd.append('file',blob,'image.png');
                
                var new_url = URL.createObjectURL(blob);
                appendFile(new_url);
                $.ajax(server + 'upload/image', {
                    data: fd,
                    dataType: 'json',
                    contentType: false,
                    cache: false,
                    processData: false,
                    beforeSend: function(request) {
                        request.setRequestHeader("userAgent", userAgent);
                    },
                    type: 'post',
                    error: function(res) {
                        if(res.status == 999 || res.status == 998 || res.status == 997){
                            loginUrl(res.status);
                            return;
                        }
                        clickCount = 0;
                    },
                    success: function(res) {
                        if(res.status == 999 || res.status == 998 || res.status == 997){
                            loginUrl(res.status);
                            return;
                        }
                        var params = {};
                        params.photo = res.urls;
                        var patientUrl = res.urls;
                        sendPost('patient/save', params, 'json', 'post', submitFailed, submitSuccess);
                        clickCount = 0;
                    }
                });
            },
            cancel: function () {
                $("#content").removeClass("c-hide");
                window.location.reload();
            }
        });
    })
    .catch(function (err){
        // 处理失败会执行
        console.log(err);
    });
    
}
// 上传头像
var serverId = "";
function chooseImage(){
	wx.chooseImage({
	  count: 1, 
      success: function (res) {
      	appendFile(res.localIds[0]);
        uploadImage();
      }
    });
}	
//获取微信上传图片的媒体ID
function uploadImage(){
	var images = getImages();
	if (images.length == 0) {
      return;
    }
    var i = 0, length = images.length;
    serverId = "";
    function upload() {
      wx.uploadImage({
        localId: images[i],
        success: function (res) {
          i++;
          if(serverId.length == 0){
          	serverId = res.serverId;
          }
          else{
          	serverId =serverId + "," + res.serverId;
          }          
          if (i < length) {
            upload();
          }
          if(i == images.length){
          	update_photo();
          }          
        },
        fail: function (res) {
          alert(JSON.stringify(res));
        }
      });
    }
    upload();
}	
//上传图片到服务器上
function update_photo(){
	var params = {};
	params.mediaIds = serverId;	
	sendPost('patient/save', params, 'json', 'post', submitFailed, submitSuccess);
}
//上传失败
function submitFailed(res) {
	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 submitSuccess(res) {
	if (res.status == 200) {
	    $("#content").removeClass("c-hide");
	    $("#clipPanel").addClass("c-hide");
	} else {
		submitFailed(res);
	}
}	
//查看图片
function viewImg(dom) {
	var $img = $(dom);
	var thissrc = $img.attr("data-src");
	var mWid = $(window).width();
	var mHei = $(window).height();
	var nHtml = '<div class="delimgpop"><div class="del-img-box"><div class="del-img-con"><img class="del-pop-img" src="' + thissrc + '" style="max-width:' + mWid + 'px; max-height:' + mHei + 'px;"></div></div></div>';
	$("body").append(nHtml);
	$(".delimgpop").click(function() {
		$(this).remove()
	});
};
function myMedicine(){
	window.location.href = "../../prescription/html/my-medicine-code.html";
}
function myFeedback(){
	window.location.href = "../../yjfk/html/feedback.html";
}
function updatePwd(){
	var mobile = $('#mobile').html();
	window.location.href = "shezhimima.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateAddress(){
	var address = $('#address').html();
	var paramAgent = "{\"type\":" + pagetype + ",\"openid\":\"" + openid + "\",\"address\":\"" + encodeURI(address) + "\"}";
	window.localStorage.setItem("paramAgent", paramAgent);
	window.location.href = "xiugaidizhi.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateMobile(){
	var mobile = $.trim($('#mobile').html());
	if(mobile.length==0)
		window.location.href = "bangdingsj.html?type=" + pagetype + "&openid=" + openid + "&1=1";
	else
		window.location.href = "shenfenyz.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateSSC(){
	var ssc = $.trim($('#ssc').html());
	window.location.href = "update-ssc.html?type=" + pagetype + "&openid=" + openid + "&ssc="+ ssc + "&1=1";
}
function updateService(){
	window.location.href = "updateService.html?type=" + pagetype + "&openid=" + openid + "&service=" + serviceLabel + "&1=1";
}

+ 65 - 448
html/grzx/js/my-detail.js

@ -1,465 +1,82 @@
var d = dialog({contentType:'load', skin:'bk-popup'});
var d1 = dialog({contentType:'load', skin:'bk-popup',content:'退出中..'});
var d = dialog({
	contentType: 'load',
	skin: 'bk-popup'
});
var d1 = dialog({
	contentType: 'load',
	skin: 'bk-popup',
	content: '退出中..'
});
var pagetype = 4;
var openid =null;
var openid = null;
var userAgent = window.localStorage.getItem(agentName);
var firstUid = window.localStorage.getItem("firstUid");
var serviceLabel="";
var bindCardUrl = "",
    bindCardStatus;
$(function() {	
$(function() {
	checkUserAgent();
});	
//appendFamilyMember($('#memberContainer'),function(){
//	queryInit();
//	clearCommittee()
//	var jsonstr = $.parseJSON(window.localStorage.getItem(agentName));
//	if(jsonstr.uid == jsonstr.represented){
//		$('#divChangeLogin').show()
//		//判断是否可以在线支付
//      if(canPayOnline){
//          $("#elecard").show();
//      }else{
//          $("#elecard").hide();
//      }
//	}else{
//		$('#divChangeLogin').hide()
//		$("#elecard").hide();
//	}
//},function(){
//	//判断有授权家人,修改样式
//	if($('#memberContainer').is(':hidden')){
//		$('#content').css('padding-top','0px');
//	}else{
//		$('#content').css('padding-top','90px');
//	}
//});
})
function queryInit(){
function queryInit() {
	d.show();
	var jsonstr = $.parseJSON(userAgent);
    openid = jsonstr.openid;
    if(firstUid == null || firstUid == undefined){
        document.getElementById("divChangeLogin").style.display='none';
    }
//	isRepresent(function() {
		//查询用户信息
		query();
		
	    getWeixinSign();
	    bindEvents();
	    //选择居委会
	    selectCommittee()
//	})
    
}
//获得微信sdk信息
function getWeixinSign(){
    var params1 = {};
    params1.pageUrl = server + "wx/html/grzx/html/my-detail.html&state=STATE";
    
    $.ajax(server + "weixin/getSign", {
        data: params1,
        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: [
                        'chooseImage',
                        'uploadImage'
                    ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
                });
            } 
        }
    }); 
}
//跳转到三师信息
function changeSanshi(){
	window.location.href = "../../qygl/html/signing-doctors.html";
}
//跳转到家庭签约信息
function changeJtqy(signedStatus){
	if(signedStatus) {
		window.location.href = "../../ssgg/html/doctor-homepage-new.html"
	} else {
		window.location.href = "../../qygl/html/signing-doctors.html"
	openid = jsonstr.openid;
	if(openid) {
		$(".weixing-icon").show();
	}
}
//查询列表
function query() {
//	var data={};
//	sendPost('patient/baseinfo', data, 'json', 'post', queryFailed, querySuccess);
    //初始查询患者基本信息,然后调用接口判断该患者是否已绑定电子社保卡
    var reqParams = [{
        url: "patient/baseinfo",
        data: {},
        reqType: 'post'
    }]
    getReqPromises(reqParams).then(function(ress){
        querySuccess(ress[0]);
        //处理绑卡
//      var res2 = ress[1];
//      if(res2.data.bindStatus == '030007'){
//          bindCardStatus = false;
//          bindCardUrl = res2.data.sicardUrl;
//      }else if(res2.data.bindStatus == '000000'){
//          bindCardStatus = true;
//          bindCardUrl = res2.data.sicardUrl;
//      }else{
//          dialog({contentType:'tipsbox', skin:'bk-popup' , content:res2.msg}).show();
//      }
//      //判断是否可以在线支付
//      if(canPayOnline){
//          $("#elecard").show();
//          $("#elecardStatus").text(bindCardStatus? "已绑定" : "未绑定");
//      }else{
//          $("#elecard").hide();
//      }
    });
}
function queryFailed(res) {
	d.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(); 
	var firstUid = window.localStorage.getItem("firstUid");
	if(firstUid == null || firstUid == undefined){
		$('.qiehuan-jiaren').hide()
	}
	queryUserInfo(); //查询用户信息
	getWeixinSign(); //获取微信签名
}
function querySuccess(res) {
	d.close();
	if (res.status == 200) {
		setValue(res.data);	
//		if($("#ssc").val() != ""){
//			$("#ssc").attr("readonly","readonly");
//		}
		//取药码
		if(res.data.prescription == 1){
			$('#myMedicine').show()
		}else{
			$('#myMedicine').hide()
//获得微信sdk信息
function getWeixinSign() {
	var params1 = {};
	params1.pageUrl = server + "wx/html/grzx/html/my-detail.html&state=STATE";
	$.ajax(server + "weixin/getSign", {
		data: params1,
		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: [
						'chooseImage',
						'uploadImage'
					] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
				});
			}
		}
	}
}
function  bindEvents(){
    $("#backLogin").click(function (){
        dialog({
            content:'您确定继续退出登录吗?',
            ok: function (){
                d1.show()
                sendPost("patient/wxloginout",{},"JSON","POST",function(res){
                    d1.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(res){
                    d1.close()
                    if(res.status==200){
                        clearAgent();
                        window.localStorage.removeItem("isTiXingVideoFaSong");//清除咨询详情移动网络下,用户点击不再提醒后的处理,换账号登陆后,还可以重新提醒
                        var url = window.location.href;
                        saveAgentPage(url);
                        location.replace("../../home/html/login.html?openid="+openid+"&loginType=password");
                    }else{
                        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(); 
                        }   
                    }
                })
            
            },
            cancel: function () {
                return;
            }
        }).showModal();
    });
    
    //绑定电子社保卡
    $('#elecard').on('tap',function(){
        if(!bindCardStatus){
            dialog({
                content: '当前未绑定电子社保卡,无法进行线上缴费,是否立即绑定',
                cancelValue: '不了,谢谢',
                cancel: function () {},
                okValue:'是',
                ok: function (){
                    window.location.href = bindCardUrl;
                }
            }).showModal();
        }else {
            window.location.href = bindCardUrl;
        }
    });
    
    //电子健康卡点击事件
    $("#healthcard").on('tap', function(){
    	window.location.href = "my-health-card.html"
//      d.show();
//      var url = "/patient/ehc/redirecturl";
//      sendPost(url, {}, 'json', 'post', queryFailed, function(res){
//          if(res.status == 200){
//              d.close();
//              window.location.href = res.data;
//          }else{
//              queryFailed(res);
//          }
//      })
    })
}
//初始化页面数据
function setValue(data){
	var photo = data.photo;
	var name = data.name;
	var sex = data.sex;
	var mobile = data.mobile;
	var idcard = data.idcard;
	var ssc = data.ssc;
	var address = data.address;
	var sign = Number(data.sign);
	var service=data.labelName;
	serviceLabel=data.label;
	
	var sexName = "女";
	if(sex == 1) {
		sexName = "男";
	}
	if(!photo){
		photo = "../../../images/p-default.png";
	}	
	if(!name) name = "";
	if(!mobile) mobile = "";
	if(!idcard) idcard = "";
	if(!ssc) ssc = "";
	if(!address) address = "";
	if(!service) {service="必填";$("#service").addClass("li-circle");}else{
		$("#service").removeClass("li-circle");
	}
	
	document.getElementById("photo").src = getImgUrl(photo);
	document.getElementById("name").value = name;			
	document.getElementById("sex").innerHTML = sexName;
	document.getElementById("mobile").innerHTML = mobile;
	document.getElementById("idcard").innerHTML = idcard;
	document.getElementById("ssc").innerHTML = ssc;
	document.getElementById("address").innerHTML = address;
	document.getElementById("service").innerHTML = service;
	$('#committee').text(data.countryName);
}
// 添加文件
function appendFile(p) {
	document.getElementById("photo").src = p;
	$("#photo").attr("data-src",p);
}
//获取需要上传的图片
function getImages() {
	var images = [];
	var imgSrc = $("#photo").attr("data-src");
	images.push(imgSrc);
	return images;
}
//剪切图片
function clip_photo(){
    $("#content").addClass("c-hide");
    $("#clipPanel").removeClass("c-hide");
    var photo = document.getElementById('file_head');
    lrz(photo.files[0]).then(function (rst) {
        var url = rst.base64;
        new AlloyCrop({
            image_src: url,
            width: document.documentElement.clientWidth,
            height: document.documentElement.clientWidth,
            ok_text: "保存",
            cancel_text: "取消",
            ok: function (base64, canvas) {
                $("#content").removeClass("c-hide");
                var data=base64.split(',')[1];
                data=window.atob(data);
                var ia = new Uint8Array(data.length);
                for (var i = 0; i < data.length; i++) {
                    ia[i] = data.charCodeAt(i);
                }
                var blob=new Blob([ia],{type:"image/png",endings:'transparent'});
                var fd=new FormData();
                fd.append('file',blob,'image.png');
                
                var new_url = URL.createObjectURL(blob);
                appendFile(new_url);
                $.ajax(server + 'upload/image', {
                    data: fd,
                    dataType: 'json',
                    contentType: false,
                    cache: false,
                    processData: false,
                    beforeSend: function(request) {
                        request.setRequestHeader("userAgent", userAgent);
                    },
                    type: 'post',
                    error: function(res) {
                        if(res.status == 999 || res.status == 998 || res.status == 997){
                            loginUrl(res.status);
                            return;
                        }
                        clickCount = 0;
                    },
                    success: function(res) {
                        if(res.status == 999 || res.status == 998 || res.status == 997){
                            loginUrl(res.status);
                            return;
                        }
                        var params = {};
                        params.photo = res.urls;
                        var patientUrl = res.urls;
                        sendPost('patient/save', params, 'json', 'post', submitFailed, submitSuccess);
                        clickCount = 0;
                    }
                });
            },
            cancel: function () {
                $("#content").removeClass("c-hide");
                window.location.reload();
            }
        });
    })
    .catch(function (err){
        // 处理失败会执行
        console.log(err);
    });
    
}
// 上传头像
var serverId = "";
function chooseImage(){
	wx.chooseImage({
	  count: 1, 
      success: function (res) {
      	appendFile(res.localIds[0]);
        uploadImage();
      }
    });
}	
//获取微信上传图片的媒体ID
function uploadImage(){
	var images = getImages();
	if (images.length == 0) {
      return;
    }
    var i = 0, length = images.length;
    serverId = "";
    function upload() {
      wx.uploadImage({
        localId: images[i],
        success: function (res) {
          i++;
          if(serverId.length == 0){
          	serverId = res.serverId;
          }
          else{
          	serverId =serverId + "," + res.serverId;
          }          
          if (i < length) {
            upload();
          }
          if(i == images.length){
          	update_photo();
          }          
        },
        fail: function (res) {
          alert(JSON.stringify(res));
        }
      });
    }
    upload();
}	
//上传图片到服务器上
function update_photo(){
	var params = {};
	params.mediaIds = serverId;	
	sendPost('patient/save', params, 'json', 'post', submitFailed, submitSuccess);
}
//上传失败
function submitFailed(res) {
	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 submitSuccess(res) {
	if (res.status == 200) {
	    $("#content").removeClass("c-hide");
	    $("#clipPanel").addClass("c-hide");
	} else {
		submitFailed(res);
	}
}	
//查看图片
function viewImg(dom) {
	var $img = $(dom);
	var thissrc = $img.attr("data-src");
	var mWid = $(window).width();
	var mHei = $(window).height();
	var nHtml = '<div class="delimgpop"><div class="del-img-box"><div class="del-img-con"><img class="del-pop-img" src="' + thissrc + '" style="max-width:' + mWid + 'px; max-height:' + mHei + 'px;"></div></div></div>';
	$("body").append(nHtml);
	$(".delimgpop").click(function() {
		$(this).remove()
	});
};
function myMedicine(){
	window.location.href = "../../prescription/html/my-medicine-code.html";
}
function myFeedback(){
	window.location.href = "../../yjfk/html/feedback.html";
}
function updatePwd(){
	var mobile = $('#mobile').html();
	window.location.href = "shezhimima.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateAddress(){
	var address = $('#address').html();
	var paramAgent = "{\"type\":" + pagetype + ",\"openid\":\"" + openid + "\",\"address\":\"" + encodeURI(address) + "\"}";
	window.localStorage.setItem("paramAgent", paramAgent);
	window.location.href = "xiugaidizhi.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateMobile(){
	var mobile = $.trim($('#mobile').html());
	if(mobile.length==0)
		window.location.href = "bangdingsj.html?type=" + pagetype + "&openid=" + openid + "&1=1";
	else
		window.location.href = "shenfenyz.html?type=" + pagetype + "&openid=" + openid + "&mobile="+ mobile + "&1=1";
}
function updateSSC(){
	var ssc = $.trim($('#ssc').html());
	window.location.href = "update-ssc.html?type=" + pagetype + "&openid=" + openid + "&ssc="+ ssc + "&1=1";
//查询用户信息
function queryUserInfo() {
	var reqParams = [{
		url: "patient/baseinfo",
		data: {},
		reqType: 'post'
	}]
	getReqPromises(reqParams).then(function(ress) {
		var res = ress[0];
		d.close();
		if(res.status == 200) {
			var data = res.data;
			$("#photo").attr("src", getImgUrl(data.photo))
			$("#name").html(data.name)
		}
	});
}
function updateService(){
	window.location.href = "updateService.html?type=" + pagetype + "&openid=" + openid + "&service=" + serviceLabel + "&1=1";
function goPage(url){
	window.location.href = url;
}

+ 56 - 0
html/grzx/js/real-name-authentication.js

@ -0,0 +1,56 @@
(function() {
	var dd = dialog({
		contentType: 'load',
		skin: 'bk-popup',
		content: '保存中...'
	});
	var d = dialog({
		contentType: 'load',
		skin: 'bk-popup'
	});
	new Vue({
		el: "#app",
		data: {
			baseInfo:{}
		},
		mounted:function(){
			this.initData();
		},
		methods: {
			initData:function(){
				var vm = this;
				d.show();
				sendPost("/patient/baseinfo", {}, 'JSON', 'post', this.queryFailed, function(res) {
					vm.baseInfo = res.data;
					d.close();
				})				
			},
			queryFailed:function(res){
				d.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();
				}
			},
			updateSsc:function(){
				var ssc = this.baseInfo.ssc;
				var userAgent = window.localStorage.getItem(agentName);
				var jsonstr = $.parseJSON(userAgent);
				var openid = jsonstr.openid;
				window.location.href = "update-ssc.html?openid=" + openid + "&ssc="+ ssc + "&1=1";
			}
		},
	})
})()

+ 17 - 0
js/head.js

@ -0,0 +1,17 @@
(function() {
	var version = "1.0"
	headcss([
		"../../../css/mui.css",
		"../../../css/cross.css",
		"../../../css/cross.ui.css",
		"../../../css/flex.css",
	])
	
	function headcss(links) {
		var arr = []
		for(var i=0,len=links.length; i<len; i++) {
			arr.push('<link rel="stylesheet" type="text/css" href="'+links[i]+'?v='+version+'" />')
		}
		document.write(arr.join(''))
	}
})()

+ 1 - 0
js/post.js

@ -8,6 +8,7 @@
		"../../../js/common_http.js",
		"../../../js/es6-promise.js",
		"../../../js/app.js",
		"../../../js/weixin_common.js"
	])
	
	function headjs(srcipts) {