123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <!DOCTYPE html>
- <html>
- <head lang="en">
- <meta charset="UTF-8">
- <title></title>
- <script language="javascript" src="jsFramework/jquery/1.8.3/jquery.js" ></script>
- <script>
- function GetQueryString(name)
- {
- var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if(r!=null)return unescape(r[2]); return null;
- }
- $(document).ready(function(){
- var url = GetQueryString("redirect_url");
- if(localStorage.wlyyAgent){
- var param = {};
- param.userAgent = localStorage.wlyyAgent;
- var agent = JSON.parse( localStorage.wlyyAgent);
- var code = agent.userRole[0].code;
- var userType = null;
- if($.trim(code).length==0){
- userType = 1;
- }
- if($.trim(code).length==6){
- userType = 3;
- }
- if($.trim(code).length==10){
- userType = 2;
- }
- if(userType!=null){
- param.userId = agent.uid;
- param.userType = userType;
- $.post("common/saveUserAgent",param,function(resp){
- console.log(resp);
- window.location.href = url;
- },'json');
- }else{
- alert("角色获取失败")
- }
- }
- });
- </script>
- </head>
- <body>
- <!-- 这是一个医生端的跳转中间页 -->
- </body>
- </html>
|