| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <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">
- </head>
- <body>
- <script src="js/jquery.min.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 id = helper.request.queryString("id");
- var code = helper.request.queryString("code");
- var menucode = helper.request.queryString("menucode");
- var typeUser = helper.cookies.get("typeUser");
- if(!openid) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WxLogin/GetOpenId',
- data: {
- code: code
- },
- dataType: 'json',
- success: function(result) {
- if(result.state.toLowerCase() == "success") {
- var openid=result.data.openid;
- helper.cookies.set("RoleCode", result.data.rolecode, 7);
- window.location.replace("login.html?menuCode="+menucode+'&openid='+openid);
- }
- }
- });
- }else {
- if (typeUser=="5") {
- gourl();
- } else if(typeUser=="1"){
- gourlStaff();
- }
- }
- function gourl(){
- switch(menucode) {
- case "WYKP":
- window.location.replace("content/AddInvoice.html");
- break; //我要开票
- case "WDGS":
- window.location.replace("content/company.html?menucode=WDGS");
- break; //我的公司
- case "WDCW":
- window.location.replace("content/finance.html");
- break; //我的财务
- case "XXCL":
- window.location.replace("content/personal.html");
- break; //首页
- case "FWJL":
- window.location.replace("content/invoiceList.html");
- break; //服务记录
- case "GDLB":
- window.location.replace("content/orderList.html");
- break; //工单列表
- case "GDXQ":
- window.location.replace("content/orderDetail.html?id="+id);
- break; //工单详情
- case "WZDA":
- window.location.replace("content/borrowList.html");
- break; //物资档案列表
- default:
- window.location.replace("error.html");
- break;
- }
- }
- function gourlStaff() {
- switch(menucode) {
- case "WYKP":
- window.location.replace("content/AddInvoice.html");
- break; //我要开票
- case "WDGS":
- window.location.replace("content/company.html?menucode=WDGS");
- break; //我的公司
- case "WDCW":
- window.location.replace("content/personal.html");
- break; //我的财务
- case "XXCL":
- window.location.replace("content/personal.html");
- break; //首页
- case "FWJL":
- window.location.replace("content/invoiceList.html");
- break; //服务记录
- case "GDLB":
- window.location.replace("content/orderList.html");
- break; //工单列表
- case "GDXQ":
- window.location.replace("content/orderDetail.html?id="+id);
- break; //工单详情
- case "WZDA":
- window.location.replace("content/borrowList.html");
- break; //物资档案列表
- default:
- window.location.replace("error.html");
- break;
- }
- }
- </script>
- </body>
- </html>
|