Brak opisu

index.html 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. console.log(openid);
  31. }
  32. });
  33. }
  34. else {
  35. gourl()
  36. }
  37. function gourl()
  38. {
  39. switch (menucode)
  40. {
  41. case "XXSC": window.location.replace("html/index.html?menuCode=XXSC"); break;//信息上传
  42. case "XXCL": window.location.replace("html/Wordeal.html?menuCode=XXCL"); break;//信息处理
  43. case "SJTJ": window.location.replace("html/Census.html?menuCode=SJTJ"); break;//数据统计
  44. case "GDLB": window.location.replace("html/WorkList.html?menuCode=GDLB"); break;//工单列表
  45. default: window.location.replace("html/error.html"); break;
  46. }
  47. }
  48. </script>
  49. </body>
  50. </html>