郑州第一人民医院UI

index.html 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" href="layui/css/layui.mobile.css" />
  10. <script src="layui/layui.js?1.1"></script>
  11. <script src="js/zepto.js?1.1"></script>
  12. <script src="js/jquery.min.js?1.1"></script>
  13. <script src="Script/Common/huayi.config.js?1.1"></script>
  14. <script src="Script/Common/huayi.http.js?1.1"></script>
  15. <script type="text/javascript">
  16. var token = localStorage.getItem("token");
  17. //测试数据
  18. //token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiI1YjJiMDk5NmNiYmY0ZTI4NzQ5YzVlNDkiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL2dyb3Vwc2lkIjoiNCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6Im9nTnltMVVTMEluS1RacXZjSlNCUm9LSURqbWsiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoi5pu56b6Z55CqIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZGVueW9ubHlzaWQiOiJvZ055bTFVUzBJbktUWnF2Y0pTQlJvS0lEam1rIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9leHBpcmF0aW9uIjoiNi8yOC8xOCAxMDoxODo0NSBBTSIsIm5iZiI6MTUyOTU0NzUyNSwiZXhwIjoxNTMwMTUyMzI1LCJpc3MiOiJIeVNpZ25Ub2tlbiIsImF1ZCI6Ikh5Q2FsbENlbnRlckFwaSJ9.XKizK9BWQ6HCXNtJX6msdwI5ACBjdHY-WMnpbzklhCE'
  19. var code = helper.request.queryString("code");
  20. var id = helper.request.queryString("id");
  21. var type = helper.request.queryString("type");
  22. var menucode = helper.request.queryString("menucode");
  23. var url = helper.request.queryString("url");
  24. if (id) {
  25. localStorage.setItem("id", id);
  26. }
  27. if (!token) {
  28. $.ajax({
  29. type: "post",
  30. url: huayi.config.callcenter_url + 'wechatapi/api/Login/getuserinfotoken',
  31. data: {
  32. code: code
  33. },
  34. dataType: 'json',
  35. success: function (result) {
  36. if (result.state.toLowerCase() == "success") {
  37. localStorage.setItem("token", result.data.token);
  38. //获取信息
  39. localStorage.setItem("openid", result.data.usercode);
  40. gourl();
  41. }
  42. }
  43. });
  44. } else {
  45. $.getJSON(huayi.config.callcenter_url + 'signtokenapi/api/useraccount/getnowuser', function (result) {
  46. if (result.state.toLowerCase() == "success") {
  47. localStorage.setItem("openid", result.data.usercode);
  48. gourl();
  49. }
  50. });
  51. }
  52. function gourl() {
  53. var openid = localStorage.getItem("openid");
  54. $.getJSON(huayi.config.callcenter_url + 'wechatapi/api/login/getuserinfo', { openid: openid}, function (result) {
  55. if (result.state.toLowerCase() == "success") {
  56. localStorage.setItem("username", result.data.nickname);
  57. localStorage.setItem("weixin_name", result.data.nickname);
  58. localStorage.setItem("weixin_img", result.data.headimgurl);
  59. if (result.data.subscribe == '0') {
  60. window.location = "html/focus.html?r=" + Math.random();
  61. }
  62. else {
  63. switch (menucode) {
  64. case "WXSM":
  65. window.location.replace("html/personal.html?r=" + Math.random());
  66. break; //微信扫码界面
  67. case "WXCX":
  68. window.location.replace("html/WorkSeach.html?r=" + Math.random());
  69. break; //工单列表
  70. case "SBXX":
  71. window.location.replace("html/EquipmentMessage.html?id=" + id + "&type=" + type + "&r=" + Math.random());
  72. break; //设备信息
  73. case "KSBX":
  74. window.location.replace("html/choosePage.html?id=" + id + "&type=" + type + "&r=" + Math.random());
  75. break; //项目选择进入界面
  76. case "CKXQ":
  77. window.location.replace("html/WorkDeail.html?id=" + id + "&r=" + Math.random());
  78. break; //报修工单详情
  79. case "PSDD":
  80. window.location.replace("html/deliveryOrderDetail.html?id=" + id + "&r=" + Math.random());
  81. break; //配送工单详情
  82. case "WXDL":
  83. window.location.replace("html/personage.html?r=" + Math.random());
  84. break; //我的
  85. default:
  86. if (url) {
  87. window.location.replace(decodeURIComponent(url));
  88. //window.history.back();
  89. }
  90. else {
  91. window.location.replace("html/error.html");
  92. }
  93. break;
  94. }
  95. }
  96. }
  97. });
  98. }
  99. </script>
  100. </head>
  101. <body>
  102. </body>
  103. </html>