123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
- <meta http-equiv="expires" content="0">
- <link rel="stylesheet" href="./hisLib/login.css">
- <title>控制台</title>
- </head>
- <body>
- <div class="login-center">
- <div class="logo"></div>
- <div class="login">
- <form class="form-horizontal">
- <div class="font-center">
- <span>登录</span>
- </div>
- <input type="hidden" name="appId" value="1" />
- <input type="hidden" name="resource" value="pc" />
- <div class="username">
- <input name="userName" placeholder="用户名" type="text" value="admin">
- <img src="hisLib/img/user.png" class="img">
- </div>
- <div class="password">
- <input name="password" placeholder="密码" type="password" value="1">
- <img src="hisLib/img/password.png" class="img">
- </div>
- <div class="unitId">
- <select name="unitId" id="unitId">
- </select>
- <img src="hisLib/img/hospital.png" class="img">
- </div>
- <div class="confirm">
- <button onclick="login()" class="btn btn-primary" type="button">确定</button>
- </div>
- </form>
- </div>
- </div>
- <script src="./hisLib/jquery-1.9.1.min.js"></script>
- <!-- 参数定义 -->
- <script src="./hisLib/param.js"></script>
- <!-- 工具类 -->
- <!--<script src="js/login/tools.js"></script>-->
- <!-- 页面处理类-->
- <!--<script src="js/page.js"></script>-->
- </body>
- </html>
- <script type="text/javascript">
- $(function(){
- $.ajax({
- async: false,
- type: "POST",
- dataType: "json",
- //url: concatToken(Param.host_url + "/sys/unit/select_list"),
- url: Param.host_url + "/sys/unit/select_list",
- data: '',
- success: function(data, textStatus) {
- if(data){
- var unit = data.data;
- var html = "";
- $.each(unit,function(){
- html += "<option value='"+this.id+"'>"+this.name+"</option>"
- })
- $("#unitId").append(html);
- }
- },
- error: function(jqXHR){
- alert(Param.host_url + "/sys/unit/select_list" + "请求出现例外:" + jqXHR.statusText);
- return false;
- }
- });
- });
- function login() {
- $.extend(Param.formPost, {
- isToken: false,
- url: '/login',
- callback: function(data) {
- if (data.ret == "0") {
- //Param.initPageUser(data.data);
- var num = Math.floor(Math.random()*10000);
- self.location.href ="../../?patientNo=1600&doctorNo=1&deptId=N016&recordId="+num+"&hospitalId=A001";
- } else {
- alert(data.msg);
- }
- }
- });
- ajaxLogin(Param.formPost);
- }
- function ajaxLogin(param_) {
- $.extend(Param.formPost, param_);
- $.ajax({
- async: false,
- type: "POST",
- dataType: "json",
- //url: Param.host_url + (Param.formPost.isToken?concatToken(Param.formPost.url):Param.formPost.url),
- url: Param.host_url + Param.formPost.url,
- data: $(Param.formPost.formName).serialize(),
- success: function(data, textStatus) {
- Param.formPost.callback(data);
- },
- error: function(jqXHR){
- alert(Param.formPost.url + "请求出现例外:" + jqXHR.statusText);
- }
- });
- }
- </script>
|