123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="Access-Control-Allow-Origin" content="*">
- <title></title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <link href="css/mui.css" rel="stylesheet" />
- <script src="assets/js/jquery-3.1.0.js"></script>
- <script src="assets/js/jquery.base64.js"></script>
- <script src="CommonJS/Config_JS/Config_Load.js"></script>
- <script src="CommonJS/DBUtil_JS/WsCommonClassJava.js"></script>
- <script src="CommonJS/Data_ProcessJS/CommonData.js"></script>
- <!--<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>-->
- <script src="js/recordAction.js"></script>
- <script src="js/mui.js"></script>
- <script type="text/javascript">
- mui.init()
- </script>
-
- <style>
- /** {*/
- /* margin: 0;*/
- /* padding: 0;*/
- /* }*/
- html,
- body {
- width: 100%;
- height: 100%;
- overflow: hidden;
- padding: 0;
- margin: 0;
- }
- .logon_bg{
- position: absolute;
- width:100%;
- bottom: 0;
- }
- .bak{
- width: 100%;
- height: 100%;
- }
- .mainDiv{
- top: 0;
- position: absolute;
- width: 100%;
- height: 100%;
- }
- .loginmainDiv{
- margin-top: 6.25rem;
- width: 100%;
- height: 100%;
- text-align: center;
- }
- .footer {
- height: 100px;
- position: absolute;
- bottom: 0;
- }
- .footer-inner {
- margin: 0 auto;
- padding: 10px;
- text-align: center;
- }
- .loginbtn{
- margin-top: 3.125rem;
- width: 95%;
- height: 2.5rem;
- margin-left: 0.3125rem;
- margin-right: 0.3125rem;
- }
- .title{
- color: white;
- font-family: 微软雅黑;
- font-size: 2.5rem;
- }
- .loginmain{
- margin-top: 3.125rem;
- margin-left: 0.3125rem;
- margin-right: 0.3125rem;
- }
- </style>
- <script>
- var originalHeight=document.documentElement.clientHeight ||document.body.clientHeight;
- window.onresize=function(){
- var resizeHeight=document.documentElement.clientHeight || document.body.clientHeight;
- if(resizeHeight-0<originalHeight-0){
- $(".logon_bg").hide();
- }else{
- $(".logon_bg").show();
- }
- }
- window.onload = function () {
- //alert(window.location.href);
- if(getQueryString("code")!="") {
- $.ajax({
- type: "POST",
- url: "http://139.196.105.31:8080/LoginService/DMWebservice",
- data: {method: 'LoginInterface', data: getQueryString("code")},
- dataType: "json",
- success: function (json) {
- var arr=json[0].data;
- var mobile=arr[0].mobile;
- userLoginWeChat(mobile);
- //alert(arr[0].mobile);
- },
- error: function (e) {
- },
- });
- }
- /*if(localStorage.getItem("jzmm")=="true"){
- document.getElementById("jzmm").checked=true;
- document.getElementById("username").value=localStorage.getItem("username");
- document.getElementById("password").value=localStorage.getItem("password");
- }else{
- document.getElementById("username").value="";
- document.getElementById("password").value="";
- }*/
- };
- function getQueryString(name){
- var reg = new RegExp("(^|&)"+name+"=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if(r!=null){
- return decodeURIComponent(r[2]);
- }
- return '';
- };
- function userLoginWeChat(mobile) {
- var strSql = "select * from health.系统用户信息表新 t where mobile='"+mobile+"'";
- new WsCommonClass ("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUserWeChat");
- }
- function userLogin(){
- var username = $("#username").val();
- var password = $("#password").val();
- var yzm=$("#yzm").val();
- if(username == ""){
- mui.toast("请输入用户名");
- return;
- }
- if(password == ""){
- mui.toast("请输入密码");
- return;
- }
- var strSql = "select t.*,y.random,case WHEN sysdate BETWEEN time and TIMESTAMPADD(SECOND,+60*3,time) " +
- "then '0' else '1' END status from health.系统用户信息表新 t left join health.sendmsg y on t.mobile=y.phone " +
- " where t.mobile='"+username+"' and t.password='"+password+"'";
- //if(password == "1qaz2wsx!")
- //strSql = "select * from health.系统用户信息表新 t where t.mobile='"+username+"'";
- // strSql = "select * from (select to_char(t.id) id, to_char(t.NAME) name, to_char(t.REGISTERE) REGISTERE, to_char(t.NUM) NUM, to_char(nvl(aa.content, '0')) conent, '巡检' as type from VIEW_巡检 t left join (select count(0) content, t.一户一档id from 巡检状态 t where t.时间 between to_date('20207', 'yyyymm') and to_date('20209', 'yyyymm') group by t.一户一档id) aa on t.id = aa.一户一档id where t.streetid = '310118107001' and t.sendyear = '2020' and (t.sendmonth = '7' or t.sendmonth = '8') union all select to_char(a.id) as id, to_char(a.系统标题) as name, to_char(a.系统内容) as registere, '' as num, to_char(nvl(aa.content, '0')) as conent, '推送' as type from 系统推送信息 a left join (select count(0) content, t.一户一档id from 巡检状态 t where t.时间 between to_date('20207', 'yyyymm') and to_date('20209', 'yyyymm') group by t.一户一档id) aa on a.id = aa.一户一档id where a.所属街道代码 = '310118107001') t where 1 = 1 order by nlssort(t.name, 'NLS_SORT=SCHINESE_PINYIN_M') desc";
- new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUser");
- }
- function changejzmm() {
- if(document.getElementById("jzmm").checked==true){
- var username=$("#username").val();
- var password=$("#password").val();
- localStorage.setItem("username",username);
- localStorage.setItem("password",password);
- localStorage.setItem("jzmm","true");
- }else{
- localStorage.setItem("username","");
- localStorage.setItem("password","");
- localStorage.setItem("jzmm","false");
- }
- }
- function querySuccess(evt,KeyValue){
-
- if(evt.IsSuc=="Fault"){
- mui.toast('用户名或密码错误!\n请输入正确的用户名密码!',{ duration:'long', type:'div' })
- return;
- }
- var jsonData = evt.data;
- if(jsonData.length == 0){
- //mui.alert('用户名或密码错误!\n请输入正确的用户名密码!', '系统提示', function() {});
- mui.toast('用户名或密码错误!\n请输入正确的用户名密码!',{ duration:'long', type:'div' })
- return;
- }
- if(jsonData != null){
- if(KeyValue=="queryUser"){
- if(jsonData[0].ISSYSTEMUSER=="0"){
- localStorage.setItem("district",jsonData[0].DISTRICT);
- localStorage.setItem("districtcode",jsonData[0].DISTRICTCODE);
- localStorage.setItem("town",jsonData[0].TOWN);
- localStorage.setItem("towncode",jsonData[0].TOWNCODE);
- localStorage.setItem("town1",jsonData[0].TOWN1);
- localStorage.setItem("towncode1",jsonData[0].TOWNCODE1);
- localStorage.setItem("ROLE",jsonData[0].ROLE);
- localStorage.setItem("username",$("#username").val());
- localStorage.setItem("password",$("#password").val());
- localStorage.setItem("userid",jsonData[0].ID);
- localStorage.setItem("mobile",jsonData[0].MOBILE);
- //insertActionRecord('用户登录');
- var url = "mainTest.html?district="+jsonData[0].DISTRICT+"&town="+jsonData[0].DISTRICT+"&towncode="+jsonData[0].TOWNCODE+"&date="+getDateStr();
- window.location=url;
- }else{
- mui.toast('该用户无效!')
- }
- }else if(KeyValue=="queryUserWeChat"){
- localStorage.setItem("district",jsonData[0].DISTRICT);
- localStorage.setItem("districtcode",jsonData[0].DISTRICTCODE);
- localStorage.setItem("town",jsonData[0].TOWN);
- localStorage.setItem("towncode",jsonData[0].TOWNCODE);
- localStorage.setItem("town1",jsonData[0].TOWN1);
- localStorage.setItem("towncode1",jsonData[0].TOWNCODE1);
- localStorage.setItem("ROLE",jsonData[0].ROLE);
- localStorage.setItem("username",$("#username").val());
- localStorage.setItem("password",$("#password").val());
- localStorage.setItem("userid",jsonData[0].ID);
- localStorage.setItem("mobile",jsonData[0].MOBILE);
- //insertActionRecord('用户登录');
- var url = "mainTest.html?district="+jsonData[0].DISTRICT+"" +
- "&town="+jsonData[0].DISTRICT+"" +
- "&towncode="+jsonData[0].TOWNCODE+"" +
- "&date="+getDateStr();
- window.location=url;
- }
- }
- }
- function querySuccessMsg(evt,KeyValue){
- if(KeyValue=="sendMsgPhone"){
- if(evt.code=="200"){
- mui.toast("短信发送成功!");
- localStorage.setItem("random",evt.random);
- }
- }
- }
- </script>
- </head>
- <body background="assets/image/login.png" style=" background-repeat:no-repeat ;background-size:100% 100%;background-attachment: fixed;">
- <div class="mainDiv">
- <div class="loginmainDiv">
- <img src="assets/image/loginninin.png" />
- <label class="title">无证行医</label>
- <br/>
- <br />
- <label class="title" style="padding-top: 0.625rem;">基层排查客户端</label>
- <div class="mui-input-group loginmain" >
- <div class="mui-input-row">
- <label>用户名:</label>
- <input id="username" type="text" class="mui-input-clear" value="" placeholder="请输入用户名">
- </div>
-
- <div class="mui-input-row">
- <label>密码:</label>
- <input id="password" type="password" class="mui-input-password" value="" placeholder="请输入密码">
- </div>
- <!--<div class="mui-input-row mui-checkbox">
- <input type="checkbox" id="jzmm" onchange="changejzmm()">
- <label>记住密码 <input id="xcqtContent"></label>
- </div>-->
- </div>
- <button type="button" class="mui-btn mui-btn-primary loginbtn" onclick="userLogin()" >登录 </button>
- </div>
- </div>
- <footer class="footer">
- <div class="footer-inner">
- <label style="color: white;">ICP备案主体信息:沪ICP备10043767号</label>
- <br/><br/>
- <label style="color: white;">ICP备案服务信息:沪ICP备10043767号-5A</label>
- </div>
- </footer>
- </body>
- <script>
- var i=180;
- mui(document.body).on('tap', '#btn', function(e) {
- var username = $("#username").val();
- if(username==""){
- mui.toast("请输入用户登录手机号!");
- return;
- }else{
- new WsCommonClassMsg("SendMsgApp",["phone"],[username],querySuccessMsg,"sendMsgPhone");
- }
- mui(this).button('loading');
- var interval=setInterval(function() {
- document.getElementById("btn").innerHTML=i+"秒后重新获取";
- i--;
- if(i==0){
- i=180;
- mui(this).button('reset');
- document.getElementById("btn").innerHTML="获取验证码";
- clearInterval(interval);
- }
- }.bind(this), 1000);
- //SendMsg();
- });
- function SendMsg() {
- var username = $("#username").val();
- if(username==""){
- mui.toast("请输入用户登录手机号!");
- }else{
- new WsCommonClassMsg("SendMsgApp",["phone"],[username],querySuccessMsg,"sendMsgPhone");
- }
- }
- </script>
- </html>
|