| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>首页</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="layui/css/layui.mobile.css" />
- </head>
- <body>
- <script src="layui/layui.js"></script>
- <script src="js/zepto.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <script src="Script/Common/huayi.http.js"></script>
- <script type="text/javascript">
- var openid = helper.cookies.get("openid");
- var usercode = helper.request.queryString("usercode");
- var signcode = helper.request.queryString("signcode");
- var menucode = helper.request.queryString("menucode");
- if (openid && openid.indexOf(usercode) != -1) {
- gourl();
- }
- else if (usercode && signcode) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WxLogin/GetZWWUser',
- async: false,
- data: { usercode: usercode, signcode: signcode },
- dataType: 'json',
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- helper.cookies.set("openid", data.data, 7);
- if (!helper.cookies.get("openid")) {
- window.location.replace("html/error.html?r=" + Math.random());
- }
- gourl();
- }
- }
- });
- }
- function gourl() {
- switch (menucode.toLowerCase()) {
- case "add": window.location.replace("html/mytousu.html?menuCode=WYTS&r=" + Math.random()); break;
- case "list": window.location.replace("html/allsuqiu.html?r=" + Math.random()); break;
- default: window.location.replace("html/error.html?r=" + Math.random()); break;
- }
- }
- </script>
- </body>
- </html>
|