PingAnYeXianSZCG_Web 前端代码

index.html 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. </head>
  10. <body>
  11. <script src="js/zepto.js"></script>
  12. <script src="Script/Common/huayi.config.js"></script>
  13. <script src="Script/Common/huayi.http.js"></script>
  14. <script type="text/javascript">
  15. var openid = helper.cookies.get("openid");
  16. var code = helper.request.queryString("code");
  17. var menucode = helper.request.queryString("menucode");
  18. if(!openid) {
  19. $.ajax({
  20. type: "get",
  21. url: huayi.config.callcenter_url + 'WxLogin/GetOpenId',
  22. data: {
  23. code: code
  24. },
  25. dataType: 'json',
  26. success: function(result) {
  27. if(result.state.toLowerCase() == "success") {
  28. helper.cookies.set("openid", result.data.openid, 7);
  29. helper.cookies.set("usercode", result.data.usercode, 7);
  30. var UserCode = result.data.usercode;
  31. gourl();
  32. }
  33. }
  34. });
  35. } else {
  36. gourl();
  37. }
  38. function gourl() {
  39. switch(menucode) {
  40. case "XXSC":
  41. window.location.replace("html/index.html?menuCode=XXSC");
  42. break; //信息管理 》》 信息发布
  43. case "XXCL":
  44. window.location.replace("html/WorkCL.html?menuCode=XXCL");
  45. break; //高级管理》》信息处理
  46. case "SJTJ":
  47. window.location.replace("html/Census.html?menuCode=SJTJ");
  48. break; //高级管理》》数据统计
  49. case "GDLB":
  50. window.location.replace("html/WorkList.html?menuCode=GDLB");
  51. break; //信息管理 》》 信息工单列表
  52. case "GRZX":
  53. window.location.replace("signout.html?menuCode=GRZX");
  54. break; //个人中心
  55. case "GDTZ":
  56. window.location.replace("html/WorkAnn.html?menuCode=GDTZ");
  57. break; //工公告通知
  58. default:
  59. window.location.replace("html/error.html");
  60. break;
  61. }
  62. }
  63. </script>
  64. </body>
  65. </html>