永城市12345_前端 - 这个不用

index.html 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. function gourl()
  37. {
  38. switch (menucode)
  39. {
  40. case "GRZX": window.location.replace("html/personal.html"); break;
  41. case "WYZX": window.location.replace("html/mytousu.html?menuCode=WYZX"); break;
  42. case "WYQZ": window.location.replace("html/mytousu.html?menuCode=WYQZ"); break;
  43. case "WYTS": window.location.replace("html/mytousu.html?menuCode=WYTS"); break;
  44. case "WYJY": window.location.replace("html/mytousu.html?menuCode=WYJY"); break;
  45. case "WYBY": window.location.replace("html/mytousu.html?menuCode=WYBY"); break;
  46. case "RXJJ": window.location.replace("html/jianJie.html"); break;
  47. case "SLNR": window.location.replace("html/shouLiCon.html"); break;
  48. case "SLFS": window.location.replace("html/shouLiWay.html"); break;
  49. case "ZYSX": window.location.replace("html/zhuYiShiXiang.html"); break;
  50. default: window.location.replace("html/error.html"); break;
  51. }
  52. }
  53. </script>
  54. </body>
  55. </html>