| | |
| | | if (result.count == 1) { // 说明验证成功了, |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (i == 0) |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '" selected>' + data[i].Name + '</option>'; |
| | | else |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; |
| | | |
| | | } |
| | | $("#Organization").append(Organization); |
| | | form.render('select'); |
| | | |
| | | //读取配置文件 |
| | | get_ReadConfigFile(); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | //form.render(); |
| | | |
| | |
| | | $("#LAY-user-login-password").focus(); |
| | | } |
| | | }) |
| | | |
| | | |
| | | //读取配置文件 |
| | | function get_ReadConfigFile() { |
| | | //获取本地存储的数据 |
| | | var data = localStorage.getItem("data"); |
| | | if (data != null) { |
| | | var data2 = JSON.parse(data); |
| | | $("#LAY-user-login-username").val(data2["UserID"]); |
| | | $("#Organization").val(data2["OrgID"]); |
| | | form.render('select'); |
| | | } |
| | | } |
| | | |
| | | //存储配置文件 |
| | | function get_WriteConfigFile() { |
| | | //清空本地存储的数据 |
| | | localStorage.removeItem("data"); |
| | | var data = { |
| | | UserID: sessionStorage["Czybm"] |
| | | , OrgID: sessionStorage["OrganizationID"] |
| | | } |
| | | //本地存储 |
| | | localStorage.setItem("data", JSON.stringify(data)); |
| | | } |
| | | |
| | | //登录 |
| | | function loging() { |
| | | if ($("#Organization").val() == 0) { |
| | |
| | | var PassWord = $("#LAY-user-login-password").val(); |
| | | layer.load(3); |
| | | $.ajax({ |
| | | type: "get", |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetUser", |
| | | type: "get", |
| | | url: GetWEBURL() + "/Web/GetUser", |
| | | data: { "UserName": UserName, "PassWord": PassWord, "HOrgName": $("#Organization").val() }, |
| | | success: function (result) { |
| | |
| | | } else {//PC端 |
| | | window.location.href = '../../views/index.html' |
| | | } |
| | | get_WriteConfigFile(); |
| | | } |
| | | else { |
| | | // $("#verifycode").click(); |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function playSound() { |
| | | var audio = document.getElementById("cs"); |
| | | if (audio == null) |
| | |
| | | var audio = document.getElementById("cs"); |
| | | audio.play(); |
| | | } |
| | | |
| | | |
| | | }); |
| | | </script> |
| | | </body> |