Procházet zdrojové kódy

获取接口方式更改

liuzhen %!s(int64=5) %!d(string=před) roky
rodič
revize
8b488955b2

+ 6 - 8
WebUI/CallCenterWeb.UI/Script/Common/huayi.config.js

@@ -2,14 +2,12 @@
2 2
     var huayi = {};
3 3
 }
4 4
 huayi.config = {
5
-	callcenter_url: "http://192.168.8.13:1001/",//生产环境
6
-	//callcenter_url: "http://139.224.236.21:4025/",//生产环境
7
-    //callcenter_url: "http://12345.shangqiu.gov.cn:8819/",//生产环境
8
-    socket_ip: "192.168.5.7",//ip
9
-    socket_port: "8081",//端口
10
-    menuworktime: 30000,//菜单工单数量刷新间隔
11
-    indextime: 30000*60,//首页报表刷新间隔
12
-    messageTime:60000,
5
+	callcenter_url: unescape($.cookie("callcenter_url")),//生产环境
6
+    socket_ip: $.cookie("socket_ip"),//ip
7
+    socket_port: $.cookie("socket_port"),//端口
8
+    menuworktime: Number($.cookie("menuworktime")),//菜单工单数量刷新间隔
9
+    indextime: Number($.cookie("indextime")),//首页报表刷新间隔
10
+    messageTime:Number($.cookie("messageTime")),
13 11
      arr :["<a class='xg' onclick='ckxq(data)' title='查看'>查看</a>",
14 12
 				"<a class='xg' onclick='bj(data)' title='编辑'>编辑</a>",
15 13
 				"<a class='xg' onclick='move(data)' title='删除'>删除</a>",

+ 24 - 6
WebUI/CallCenterWeb.UI/index.html

@@ -13,13 +13,31 @@
13 13
 <body>
14 14
   <script>
15 15
   	$(function(){
16
-  		if ($.cookie("token") == null) {
17
-	        window.location.href = "login.html";
18
-	    }else{
19
-	    	window.location.href = "home.html";
20
-	    }
16
+  		ajax();
21 17
 	})
22
-  	
18
+  	function ajax(){
19
+		$.ajax({
20
+			type:"get",
21
+			url:"http://k100.800100.net/SysConfig/GetConfig",
22
+			async:false,
23
+			success:function(res){
24
+				var res=$.parseJSON(res)
25
+				if(res.state== "success") {
26
+					$.cookie("callcenter_url",  escape(res.data.callcenter_url));
27
+					$.cookie("indextime", res.data.indextime);
28
+					$.cookie("menuworktime", res.data.menuworktime);
29
+					$.cookie("messageTime", res.data.messageTime);
30
+					$.cookie("socket_ip", res.data.socket_ip);
31
+					$.cookie("socket_port", res.data.socket_port);
32
+					if ($.cookie("token") == null) {
33
+				        window.location.href = "login.html";
34
+				    }else{
35
+				    	window.location.href = "home.html";
36
+				    }
37
+				}
38
+			}
39
+		});
40
+	}
23 41
   </script>
24 42
 </body>
25 43
 

+ 1 - 2
WebUI/CallCenterWeb.UI/login.html

@@ -374,7 +374,6 @@
374 374
 							$(".error_gl_user").removeClass('errorShow');
375 375
 						}
376 376
 					} else {
377
-						console.log($.md5(gl_psw));
378 377
 						var currenttime=CurentTime();
379 378
 						var datatime=currenttime.split(' ')[1].split(':').join('')
380 379
 						var key = CryptoJS.enc.Utf8.parse(")O[9d]6,YF}+efcaj{+8>Z'e9M"+datatime);
@@ -403,7 +402,7 @@
403 402
                                     $.cookie("zx_user", gl_user, {
404 403
                                         expires: 7
405 404
                                     });
406
-									window.location.href = "index.html";
405
+									window.location.href = "home.html";
407 406
 								}
408 407
                                 //else{
409 408
 								//	$(".gl_user").val('');