民权县12345_前端

index.html 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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="layui/layui.js"></script>
  12. <script src="js/zepto.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. if (!openid) {
  20. $.ajax({
  21. type: "get",
  22. url: huayi.config.callcenter_url + 'WxLogin/GetOpenId',
  23. data: { code: code },
  24. dataType: 'json',
  25. success: function (result) {
  26. if (result.state.toLowerCase() == "success") {
  27. helper.cookies.set("openid", result.data, 7);
  28. gourl()
  29. }
  30. }
  31. });
  32. }
  33. else {
  34. gourl()
  35. }
  36. //gourl()
  37. function gourl()
  38. {
  39. switch (menucode)
  40. {
  41. case "GRZX": window.location.replace("html/personal.html"); break;
  42. case "WYZX": window.location.replace("html/mytousu.html?menuCode=WYZX"); break;
  43. case "WYQZ": window.location.replace("html/mytousu.html?menuCode=WYQZ"); break;
  44. case "WYTS": window.location.replace("html/mytousu.html?menuCode=WYTS"); break;
  45. case "WYJY": window.location.replace("html/mytousu.html?menuCode=WYJY"); break;
  46. case "WYBY": window.location.replace("html/mytousu.html?menuCode=WYBY"); break;
  47. case "RXJJ": window.location.replace("html/jianJie.html"); break;
  48. case "SLNR": window.location.replace("html/shouLiCon.html"); break;
  49. case "SLFS": window.location.replace("html/shouLiWay.html"); break;
  50. case "ZYSX": window.location.replace("html/zhuYiShiXiang.html"); break;
  51. case "ZYZS": window.location.replace("html/personalInfo.html"); break;
  52. default: window.location.replace("html/error.html"); break;
  53. }
  54. }
  55. </script>
  56. </body>
  57. </html>