Selaa lähdekoodia

息县授权到期提醒

miaofuhao 7 vuotta sitten
vanhempi
commit
769845a529
3 muutettua tiedostoa jossa 23 lisäystä ja 2 poistoa
  1. 1 0
      CallCenterWeb.UI/index.html
  2. 6 0
      CallCenterWeb.UI/js/index.js
  3. 16 2
      CallCenterWeb.UI/login.html

+ 1 - 0
CallCenterWeb.UI/index.html

@@ -941,6 +941,7 @@
941 941
 						<li>坐席状态: </li>
942 942
 						<li class="quan zxzt lx br"></li>
943 943
 						<li><span class="hwzt" style="color:red;"></span></li>
944
+						<li><span class="expire" style="color:red;"></span></li>
944 945
 					</ul>
945 946
 				</div>
946 947
 			</div>

+ 6 - 0
CallCenterWeb.UI/js/index.js

@@ -36,6 +36,12 @@ $(document).ready(function() {
36 36
 				$(".phoneBZ").show();
37 37
 				$(".zts").show();
38 38
 			}
39
+			var expireDay = result.data.days;
40
+            var expireDate = result.data.date.split(' ')[0];
41
+            if (expireDay * 1 > 0) {
42
+                var expire = '软件到期时间:' + expireDate + ',剩余' + expireDay + '天,请及时联系软件厂家!'
43
+                $(".expire").html(expire);
44
+            }
39 45
 		}
40 46
 	})
41 47
 

+ 16 - 2
CallCenterWeb.UI/login.html

@@ -130,7 +130,7 @@
130 130
 							success: function(data) {
131 131
 								/*验证请求*/
132 132
 								if(data.state == "success") {
133
-
133
+									
134 134
 									$.cookie("token", data.data.token, {
135 135
 										expires: 7
136 136
 									});
@@ -140,7 +140,21 @@
140 140
 									$.cookie("u_code", User, {
141 141
 										expires: 7
142 142
 									});
143
-									window.location.href = "index.html";
143
+									
144
+									var expireDate = data.data.date.split(' ')[0];
145
+                                    var expireDay = data.data.days;
146
+                                    var expireText = '<span style="color:#f00;">软件到期时间:' + expireDate + ',还剩' + expireDay +'天,请联系软件厂家</span>'
147
+                                    if (expireDay * 1 > 0) {
148
+                                        layer.confirm(expireText, {
149
+                                            btn: ['确定'] //按钮
150
+                                        }, function () {
151
+                                            window.location.href = "index.html";
152
+                                        })
153
+                                    }
154
+                                    else {
155
+                                        window.location.href = "index.html";
156
+                                    }
157
+									
144 158
 								} else {
145 159
 									//alert("登录失败");
146 160
 									$("#user").val('');