ソースを参照

地铁代码提交

miaofuhao 5 年 前
コミット
66978ddbbc

+ 71 - 61
web/YTSoft.BaseCallCenter.MVCWeb/Content/js/sysmanage/useredit.js

@@ -1,79 +1,89 @@
1 1
 
2 2
 layui.use(['form', 'layer', 'jquery', 'laydate'], function () {
3
-    var form = layui.form,
4
-        layer = parent.layer === undefined ? layui.layer : parent.layer,
5
-        $ = layui.jquery,
6
-        laydate = layui.laydate;
3
+  var form = layui.form,
4
+    layer = parent.layer === undefined ? layui.layer : parent.layer,
5
+    $ = layui.jquery,
6
+    laydate = layui.laydate;
7 7
 
8
-    //监听提交
9
-    form.on('submit(SubmitData)', function (data) {
10
-        //所有表单数据
11
-        var dataArr = new Array();
12
-        dataArr = data.field;
8
+  //监听提交
9
+  form.on('submit(SubmitData)', function (data) {
10
+    debugger
11
+    //所有表单数据
12
+    var dataArr = new Array();
13
+    dataArr = data.field;
13 14
 
14
-        var pwd1=$("#pwd1").val();
15
-        var pwd2=$("#pwd2").val();
16
-        if (pwd1 != pwd2)
17
-        {
18
-            layui.layer.alert("两次密码不一致!", {
19
-                icon: 2
20
-            });
21
-            return false;
22
-        }
15
+    var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{6,30}');
16
+    var pwd1 = $("#pwd1").val();
17
+    var pwd2 = $("#pwd2").val();
23 18
 
19
+    if (!pwdRegex.test(pwd1)) {
20
+      layui.layer.alert("您的密码复杂度太低(密码中必须包含字母、数字、特殊字符且不少于6位", {
21
+        icon: 2
22
+      });
23
+      return false;
24
+    }
24 25
 
25
-        //启用标志
26
-        if (dataArr["F_SeatFlag"] == "on") {
27
-            dataArr["F_SeatFlag"] = 1;
28
-        }
29
-        else {
30
-            dataArr["F_SeatFlag"] = 0;
31
-        }
32
-        $.ajax({
33
-            url: "/SystemManage/SaveUserData",
34
-            type: "post",
35
-            async: false,//同步请求
36
-            contentType: "application/json",
37
-            dataType: "text",
38
-            cache: false,
39
-            data: JSON.stringify(dataArr),
40
-            // data: dataArr,
41
-            success: function (thisResult, result) {
26
+    if (pwd1 != pwd2) {
27
+      layui.layer.alert("两次密码不一致!", {
28
+        icon: 2
29
+      });
30
+      return false;
31
+    }
42 32
 
43
-                if (thisResult == "True") {
44
-                    layer.open({
45
-                        content: '保存成功'
46
-                         , btn: ['确定']
47
-                         , yes: function (index, layero) {
48
-                             layer.close(index);
49
-                             ////刷新父窗体
50 33
 
51
-                             var thisindex = parent.layer.getFrameIndex(window.name); //获取窗口索引
52
-                             parent.layer.close(thisindex);
53
-                         }
54
-                            , cancel: function () {
55
-                                var thisindex = parent.layer.getFrameIndex(window.name); //获取窗口索引
56
-                                parent.layer.close(thisindex);
34
+    //启用标志
35
+    if (dataArr["F_SeatFlag"] == "on") {
36
+      dataArr["F_SeatFlag"] = 1;
37
+    }
38
+    else {
39
+      dataArr["F_SeatFlag"] = 0;
40
+    }
57 41
 
58
-                            }
59
-                    });
42
+    $.ajax({
43
+      url: "/SystemManage/SaveUserData",
44
+      type: "post",
45
+      async: false,//同步请求
46
+      contentType: "application/json",
47
+      dataType: "text",
48
+      cache: false,
49
+      data: JSON.stringify(dataArr),
50
+      // data: dataArr,
51
+      success: function (thisResult, result) {
60 52
 
61
-                    return false;
62
-                } else {
63
-                    layui.layer.alert("保存失败!", {
64
-                        icon: 2
65
-                    });
53
+        if (thisResult == "True") {
54
+          layer.open({
55
+            content: '保存成功'
56
+            , btn: ['确定']
57
+            , yes: function (index, layero) {
58
+              layer.close(index);
59
+              ////刷新父窗体
66 60
 
67
-                    return false;
68
-                }
61
+              var thisindex = parent.layer.getFrameIndex(window.name); //获取窗口索引
62
+              parent.layer.close(thisindex);
63
+            }
64
+            , cancel: function () {
65
+              var thisindex = parent.layer.getFrameIndex(window.name); //获取窗口索引
66
+              parent.layer.close(thisindex);
69 67
 
70
-            },
71
-            error: function (error) {
72
-                return false;
73 68
             }
74
-        });
69
+          });
70
+
71
+          return false;
72
+        } else {
73
+          layui.layer.alert("保存失败!", {
74
+            icon: 2
75
+          });
76
+
77
+          return false;
78
+        }
79
+
80
+      },
81
+      error: function (error) {
75 82
         return false;
83
+      }
76 84
     });
85
+    return false;
86
+  });
77 87
 
78 88
 })
79 89
 

+ 18 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Views/Default/Login.cshtml

@@ -61,7 +61,7 @@
61 61
       </div>
62 62
     </div>
63 63
     <div class="copy-right" style=" color:White;">
64
-      <a href="/Default/SSO">单点登录</a>© 版权所有 郑州市轨道交通
64
+      <a onclick="clickLoginIn();">单点登录</a>© 版权所有 郑州市轨道交通
65 65
     </div>
66 66
   </div>
67 67
   <!-- 加载js文件-->
@@ -148,6 +148,20 @@
148 148
         })
149 149
       }
150 150
     }
151
+
152
+    function clickLoginIn() {
153
+      //任何需要执行的js特效
154
+      if ("@ViewBag.Return" == "success") {
155
+        location.href = "/Main/Index";
156
+        helper.cookies.set('callState', 1);
157
+        helper.cookies.set('clsCookie', "");
158
+      }
159
+      else {
160
+        alert("这时候跳转到集团登陆页-" + "@ViewBag.Return");
161
+        window.location = "https://portal.zzmetro.cn:4443/ZZMSsoLogin/zzmteroLogin.jsp";
162
+      }
163
+    }
164
+
151 165
     function verification() {
152 166
       if (document.getElementById("txtusername").value == "") {
153 167
         document.getElementById("lblTip").innerHTML = "&nbsp;*&nbsp;请输入您的用户名";
@@ -161,6 +175,9 @@
161 175
       }
162 176
       return true;
163 177
     }
178
+
179
+
180
+
164 181
     document.onkeydown = function (event) {
165 182
       var e = event || window.event || arguments.callee.caller.arguments[0];
166 183
       if (e && e.keyCode == 13) {

+ 1 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Views/Main/Index.cshtml

@@ -861,7 +861,7 @@
861 861
                 </a>
862 862
               </dd>
863 863
               <dd>
864
-                <a onclick="OpenOtherForm('公司内网', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=1')">
864
+                <a onclick="OpenOtherForm('公司内网', 'http://portal.zzmetro.cn:7819/manage/sso')">
865 865
                   <i class="fa fa-internet-explorer" style="font-size: 20px !important; margin-right: 5px;"></i>
866 866
                   <cite style="text-align:left">公司内网</cite>
867 867
                 </a>