From d109886022563627870ae251b95ba15082b8980f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 09 七月 2020 09:48:06 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/web/RouterController.java |   10 +++
 src/main/webapp/views/pdaCe/index.html                |   18 ++++++
 src/main/webapp/views/pdaCe/login.html                |  105 +++++++++++++++++++++++++++++++++++
 3 files changed, 133 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/common/web/RouterController.java b/src/main/java/com/zy/common/web/RouterController.java
index 5077891..fb79559 100644
--- a/src/main/java/com/zy/common/web/RouterController.java
+++ b/src/main/java/com/zy/common/web/RouterController.java
@@ -46,4 +46,14 @@
         }
     }
 
+    @RequestMapping("/pda/ce")
+    public void pdaCe(HttpServletResponse response) {
+        try{
+            String redirect = Cools.isEmpty(applicationName)?"/views/pdaCe/login.html":"/"+applicationName+"/views/pdaCe/login.html";
+            response.sendRedirect(redirect);
+        } catch (Exception ex){
+            ex.printStackTrace();
+        }
+    }
+
 }
diff --git a/src/main/webapp/views/pdaCe/index.html b/src/main/webapp/views/pdaCe/index.html
new file mode 100644
index 0000000..4af95da
--- /dev/null
+++ b/src/main/webapp/views/pdaCe/index.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/>
+    <title>涓壃鐗╂祦</title>
+    <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+</head>
+<body>
+    Hello World
+<!--    <button onclick="her()">椤甸潰璺宠浆</button>-->
+</body>
+<script>
+    function her() {
+        window.location.href="login.html";
+    }
+</script>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/views/pdaCe/login.html b/src/main/webapp/views/pdaCe/login.html
new file mode 100644
index 0000000..ebc3270
--- /dev/null
+++ b/src/main/webapp/views/pdaCe/login.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/>
+    <title>绯荤粺鐧诲綍</title>
+    <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+    <style>
+        .login-form input {
+            display: block;
+        }
+        .login-form button {
+            display: block;
+        }
+    </style>
+</head>
+<body>
+    <h1>涓壃鐗╂祦</h1>
+    <div class="login-form">
+        <div>
+            <span>璐﹀彿</span>
+            <input type="text" id="mobile" value="super">
+        </div>
+        <div>
+            <span>瀵嗙爜</span>
+            <input type="password" id="password" value="xltys1995">
+        </div>
+        <div>
+            <button onclick="login()">鐧诲綍</button>
+        </div>
+
+    </div>
+</body>
+<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+<script type="text/javascript" src="../../static/js/tools/md5.js"></script>
+<script type="text/javascript">
+
+    function login(){
+        httpRequest({
+            httpUrl: baseUrl+"/login.action",
+            type: 'post',
+            data: {
+                mobile: document.getElementById('mobile').value,
+                password: hex_md5(document.getElementById('password').value)
+            }
+        }, function (res) {
+            window.location.href = "index.html";
+        })
+    }
+
+    function httpRequest(paramObj,fun,errFun) {
+        var xmlhttp = null;
+        /*鍒涘缓XMLHttpRequest瀵硅薄锛�
+         *鑰佺増鏈殑 Internet Explorer锛圛E5 鍜� IE6锛変娇鐢� ActiveX 瀵硅薄锛歯ew ActiveXObject("Microsoft.XMLHTTP")
+         * */
+        if(window.XMLHttpRequest) {
+            xmlhttp = new XMLHttpRequest();
+        }else if(window.ActiveXObject) {
+            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+        }
+        /*鍒ゆ柇鏄惁鏀寔璇锋眰*/
+        if(xmlhttp == null) {
+            alert('浣犵殑娴忚鍣ㄤ笉鏀寔XMLHttp');
+            return;
+        }
+        /*璇锋眰鏂瑰紡锛屽苟涓旇浆鎹负澶у啓*/
+        var httpType = (paramObj.type || 'GET').toUpperCase();
+        /*鏁版嵁绫诲瀷*/
+        var dataType = paramObj.dataType || 'json';
+        /*璇锋眰鎺ュ彛*/
+        var httpUrl = paramObj.httpUrl || '';
+        /*鏄惁寮傛璇锋眰*/
+        var async = paramObj.async || true;
+        /*璇锋眰鍙傛暟--post璇锋眰鍙傛暟鏍煎紡涓猴細foo=bar&lorem=ipsum*/
+        var paramData = paramObj.data || [];
+        var requestData = '';
+        for(var name in paramData) {
+            requestData += name + '='+ paramData[name] + '&';
+        }
+        requestData = requestData === '' ? '' : requestData.substring(0,requestData.length - 1);
+
+        /*璇锋眰鎺ユ敹*/
+        xmlhttp.onreadystatechange = function() {
+            if(xmlhttp.readyState === 4 && xmlhttp.status === 200) {
+                /*鎴愬姛鍥炶皟鍑芥暟*/
+                fun(JSON.parse(xmlhttp.responseText));
+            }else{
+                /*澶辫触鍥炶皟鍑芥暟*/
+                errFun;
+            }
+        }
+
+        /*鎺ュ彛杩炴帴锛屽厛鍒ゆ柇杩炴帴绫诲瀷鏄痯ost杩樻槸get*/
+        if(httpType === 'GET') {
+            xmlhttp.open("GET",httpUrl,async);
+            xmlhttp.send(null);
+        }else if(httpType === 'POST'){
+            xmlhttp.open("POST",httpUrl,async);
+            //鍙戦�佸悎閫傜殑璇锋眰澶翠俊鎭�
+            xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+            xmlhttp.send(requestData);
+        }
+    }
+</script>
+</html>
\ No newline at end of file

--
Gitblit v1.9.1