123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <!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" 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 type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
- <script type="text/javascript" src="../../../js/mui.min.js"></script>
- <script src="../../../js/app.js" type="text/javascript" charset="utf-8"></script>
- <link rel="stylesheet" type="text/css" href="../../../widget/artDialog/6.0.5/css/ui-dialog.min.css">
- <script src="../../../widget/artDialog/6.0.5/js/dialog-plus.min.js"></script>
- </head>
- <body>
- <div class="main">
- <div class="h45">
- <div class="demo-comtop">
- <!--<a class="mui-action-back"></a>-->
- <h1 class="c-f18">最近一次记录如下</h1>
- </div>
- </div>
- <div class="bgc-fff c-border-b mb20">
- <ul class="n-list tz-record-list" id="index_list">
- <li class="n-list-function n-list-link list-arrow-r" data-href='health-index-bloodsugar-'>
- <div class="n-list-key">
- <div class="n-avatar-m health-border-1">血糖</div>
- </div>
- <div class="n-list-flex ptb12">
- <div class="n-list-info">
- <div onclick="window.open('health-index-bloodsugar-chart.html')"id="zb_xt" class="c-t-right c-f18 pr10 c-909090">请先进行记录</div>
- </div>
- </div>
- </li>
- <li class="n-list-function n-list-link list-arrow-r" data-href='health-index-bloodpressure-'>
- <div class="n-list-key">
- <div class="n-avatar-m health-border-2">血压</div>
- </div>
- <div class="n-list-flex">
- <div class="n-list-info">
- <div onclick="window.open('health-index-bloodpressure-chart.html')" id="zb_xy" class="c-t-right c-f18 pr10 c-909090">请先进行记录</div>
- </div>
- </div>
- </li>
- <li class="n-list-function n-list-link list-arrow-r" data-href='health-index-weight-'>
- <div class="n-list-key">
- <div class="n-avatar-m health-border-6">体重</div>
- </div>
- <div class="n-list-flex">
- <div class="n-list-info">
- <div onclick="window.open('health-index-weight-chart.html')"id="zb_tz" class="c-t-right c-f18 pr10 c-909090">请先进行记录</div>
- </div>
- </div>
- </li>
- <li class="n-list-function n-list-link list-arrow-r" data-href='health-index-waistline-'>
- <div class="n-list-key">
- <div class="n-avatar-m health-border-4">腰围</div>
- </div>
- <div class="n-list-flex">
- <div class="n-list-info">
- <div onclick="window.open('health-index-waistline-chart.html')"id="zb_yw" class="c-t-right c-f18 pr10 c-909090">请先进行记录</div>
- </div>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </body>
- <script type="text/javascript" src="../../../js/common_http.js" ></script>
- <script type="text/javascript" src="../../../js/weixin_common.js" ></script>
- <script type="text/javascript">
- var d = dialog({contentType:'load', skin:'bk-popup'});
- var pagetype = 8;
- $(function() {
- checkUserAgent();
- });
-
- function queryInit(){
- d.show();
- sendPost("patient/health_index/recent", "","JSON","POST" ,queryFailed, success);
- }
-
- function success(data){
- if(data.status!=-1){
- var D_booldsugar = null;
- var D_booldpressure = null;
- var D_weight = null;
- var D_waisline = null;
- for(var i=0; i < data.list.length; i++){
- var listee = data.list[i];
- if(listee.type == 1){
- D_booldsugar = listee;
- }else if(listee.type == 2){
- D_booldpressure = listee;
- }else if(listee.type == 3){
- D_weight = listee;
- }else{
- D_waisline = listee;
- }
- }
-
- if(D_booldsugar==null || D_booldsugar==""){
- $("#zb_xt").html("请先进行记录");
- }else{
- if(D_booldsugar.value1){
- $("#zb_xt").html("空腹血糖值:" + toIntValue(D_booldsugar.value1)+"mmol/L");
- };
- if(D_booldsugar.value2){
- $("#zb_xt").html("早餐后血糖值:" + toIntValue(D_booldsugar.value2)+"mmol/L");
- };
- if(D_booldsugar.value3){
- $("#zb_xt").html("午餐前血糖值:" + toIntValue(D_booldsugar.value3)+"mmol/L");
- };
- if(D_booldsugar.value4){
- $("#zb_xt").html("午餐后血糖值:" + toIntValue(D_booldsugar.value4)+"mmol/L");
- };
- if(D_booldsugar.value5){
- $("#zb_xt").html("晚餐前血糖值:" + toIntValue(D_booldsugar.value5)+"mmol/L");
- };
- if(D_booldsugar.value6){
- $("#zb_xt").html("晚餐后血糖值:" + toIntValue(D_booldsugar.value6)+"mmol/L");
- };
- if(D_booldsugar.value7){
- $("#zb_xt").html("睡前血糖值:" + toIntValue(D_booldsugar.value7)+"mmol/L");
- };
- }
-
- if(D_booldpressure==null || D_booldpressure==""){
- $("#zb_xy").html("请先进行记录");
- }else{
- $("#zb_xy").html("收缩压:" + toIntValue(D_booldpressure.value1) + "mmHg<br />舒张压:" + toIntValue(D_booldpressure.value2) + "mmHg");
- }
-
- if(D_weight==null || D_weight==""){
- $("#zb_tz").html("请先进行记录");
- }else{
- $("#zb_tz").html(toIntValue(D_weight.value1)+"kg");
- }
- if(D_waisline==null || D_waisline==""){
- $("#zb_yw").html("请先进行记录");
- }else{
- $("#zb_yw").html(toIntValue(D_waisline.value1)+"cm");
- }
- d.close().remove();
- }else{
- queryFailed(data);
- }
- }
-
- function queryFailed(res) {
- d.close().remove();
- if (res && res.msg) {
- dialog({contentType:'tipsbox', skin:'bk-popup' , content:res.msg}).show();
- } else {
- dialog({contentType:'tipsbox', skin:'bk-popup' , content:'加载失败'}).show();
- }
- }
-
- function toIntValue(value){
- if(parseInt(value) == value){
- return parseInt(value);
- }else{
- return Math.round(value*Math.pow(10, 1))/Math.pow(10, 1);
- }
- }
- </script>
- </html>
|