阜外心血管项目前端

index.html 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  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. </head>
  10. <body>
  11. <script src="js/zepto.js"></script>
  12. <script src="js/jquery.min.js"></script>
  13. <script src="Script/Common/huayi.config.js"></script>
  14. <script src="Script/Common/huayi.http.js"></script>
  15. <script type="text/javascript">
  16. var openid = helper.cookies.get("openid");
  17. var code = helper.request.queryString("code");
  18. var menucode = helper.request.queryString("menucode");
  19. var typeUser = helper.cookies.get("typeUser");
  20. if(!openid) {
  21. $.ajax({
  22. type: "get",
  23. url: huayi.config.callcenter_url + 'WxLogin/GetOpenId',
  24. data: {
  25. code: code
  26. },
  27. dataType: 'json',
  28. success: function(result) {
  29. if(result.state.toLowerCase() == "success") {
  30. var openid=result.data.openid;
  31. window.location.replace("login.html?menuCode="+menucode+'&openid='+openid);
  32. }
  33. }
  34. });
  35. }else {
  36. if (typeUser=="5") {
  37. gourl();
  38. } else if(typeUser=="1"){
  39. gourlStaff();
  40. }
  41. }
  42. function gourl(){
  43. switch(menucode) {
  44. case "WYKP":
  45. window.location.replace("content/AddInvoice.html");
  46. break; //我要开票
  47. case "WDGS":
  48. window.location.replace("content/company.html?menucode=WDGS");
  49. break; //我的公司
  50. case "WDCW":
  51. window.location.replace("content/finance.html");
  52. break; //我的财务
  53. case "XXCL":
  54. window.location.replace("content/personal.html");
  55. break; //首页
  56. case "FWJL":
  57. window.location.replace("content/invoiceList.html");
  58. break; //服务记录
  59. case "GDLB":
  60. window.location.replace("content/orderList.html");
  61. break; //工单列表
  62. case "GDXQ":
  63. window.location.replace("content/orderDetail.html");
  64. break; //工单详情
  65. default:
  66. window.location.replace("error.html");
  67. break;
  68. }
  69. }
  70. function gourlStaff() {
  71. switch(menucode) {
  72. case "WYKP":
  73. window.location.replace("content/AddInvoice.html");
  74. break; //我要开票
  75. case "WDGS":
  76. window.location.replace("content/company.html?menucode=WDGS");
  77. break; //我的公司
  78. case "WDCW":
  79. window.location.replace("content/personal.html");
  80. break; //我的财务
  81. case "XXCL":
  82. window.location.replace("content/personal.html");
  83. break; //首页
  84. case "FWJL":
  85. window.location.replace("content/invoiceList.html");
  86. break; //服务记录
  87. case "GDLB":
  88. window.location.replace("content/orderList.html");
  89. break; //工单列表
  90. case "GDXQ":
  91. window.location.replace("content/orderDetail.html");
  92. break; //工单详情
  93. default:
  94. window.location.replace("error.html");
  95. break;
  96. }
  97. }
  98. </script>
  99. </body>
  100. </html>