index_1.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>检查检验</title>
  6. <meta name="format-detection" content="telephone=no"/>
  7. <meta name="viewport"
  8. content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
  9. <meta name="apple-mobile-web-app-capable" content="yes"/>
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
  11. <link rel="stylesheet" href="../../../css/cross.css" type="text/css"/>
  12. <link rel="stylesheet" href="../../../css/cross.ui.css" type="text/css"/>
  13. <link rel="stylesheet" type="text/css" href="../../../css/ss-style.css">
  14. <link rel="stylesheet" type="text/css" href="../../../iconfont/iconfont.css" />
  15. </head>
  16. <body>
  17. </body>
  18. <script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
  19. <script type="text/javascript" src="../../../js/app.js" ></script>
  20. <script type="text/javascript" src="../../../js/mui.min.js" ></script>
  21. <script type="text/javascript" src="../../../js/common_http.js" ></script>
  22. <script type="text/javascript" src="../../../js/weixin_common.js" ></script>
  23. <link rel="stylesheet" type="text/css" href="../../../widget/artDialog/6.0.5/css/ui-dialog.min.css">
  24. <script src="../../../widget/artDialog/6.0.5/js/dialog-plus.min.js"></script>
  25. <script src="../../../js/underscore.js"></script>
  26. <script src="../../../js/es6-promise.js"></script>
  27. <script type="text/javascript">
  28. var queryParam = GetRequest()
  29. var redirectUrl = ""
  30. var pagetype = 5;
  31. var d = dialog({contentType:'load', skin:'bk-popup'});
  32. var accessToken = ""
  33. var target = "wx", idCard = ""
  34. if(queryParam.target == "app") {
  35. target = queryParam.target
  36. }
  37. if(target == "wx") {
  38. checkUserAgent();
  39. } else {
  40. idCard = queryParam.demographic_id
  41. getReqPromises([
  42. {
  43. url: profileServer+'/gateway/authentication/oauth/login',
  44. data: {client_id:'P7dIRS0FvX', username: 'tourists', password: 'tourists123'},
  45. reqType: 'post'
  46. }
  47. ]).then(function(ress) {
  48. var res0 = ress[0];
  49. accessToken = res0.accessToken
  50. redirect()
  51. }).catch(function(e) {
  52. console && console.error(e)
  53. })
  54. }
  55. function redirect() {
  56. var state = encodeURIComponent(JSON.stringify({
  57. itemIndex: 1,
  58. target: target,
  59. filter: "org_code%3D49229004X"
  60. }))
  61. redirectUrl = profileServer+'/gateway/authentication/oauth/sso?response_type=token&client_id=P7dIRS0FvX&state='
  62. +state+'&scope=read&redirect_uri=http://jksr.srswjw.gov.cn:1235/profile/app/mprofile/html/signin.html?idCardNo='+idCard+'&token='+accessToken
  63. location.replace(redirectUrl)
  64. }
  65. function queryInit(){
  66. // 验证居民信息是否完善
  67. checkBaseInfo()
  68. getReqPromises([
  69. {
  70. url: profileServer+'/gateway/authentication/oauth/login',
  71. data: {client_id:'P7dIRS0FvX', username: 'tourists', password: 'tourists123'},
  72. reqType: 'post'
  73. },
  74. {
  75. url: 'patient/baseinfo',
  76. data: {},
  77. reqType: 'post'
  78. }
  79. ]).then(function(ress) {
  80. var res0 = ress[0], res1 = ress[1]
  81. accessToken = res0.accessToken
  82. if(res1.status == 200) {
  83. idCard = res1.data && res1.data.idcardAll
  84. redirect()
  85. } else {
  86. dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:res1.msg}).show();
  87. }
  88. }).catch(function(e) {
  89. console && console.error(e)
  90. })
  91. }
  92. </script>
  93. </html>