大理访客登记修改  4.20
diff --git a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
index a0aef9b..1e2a092 100644
--- a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
+++ b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
@@ -60,6 +60,8 @@
         }

         int issuccess=0;

         WechatResp resp = appService.doWechatAuth(appid, appsecret, code, needinfor);

+        logger.error("wecharresp=" + resp);

+

         if (resp != null) {

             logger.error("openid=" + resp.getOpenid());

             if(resp.getOpenid()==null){

@@ -68,6 +70,8 @@
             session.setAttribute("wx_openid", resp.getOpenid());

             if (!StringUtils.isEmpty(resp.getWxid())) {

                 session.setAttribute("wx_id", resp.getWxid());

+                logger.error("wx_id=" + resp.getWxid());

+

             }

         }

         session.setAttribute("openmsg",resp);

@@ -106,6 +110,8 @@
     public String getvistorin(HttpServletRequest request, Model model){

         HttpSession session = request.getSession();

         WechatResp openmsg = (WechatResp) session.getAttribute("openmsg");

+        logger.error("openid=" + openmsg);

+

         String inoutflag = (String) session.getAttribute("inoutflag");

         //WechatResp openmsg = new WechatResp();

         //openmsg.setCity("上海");

diff --git a/src/main/java/com/supwisdom/dlpay/app/domain/EWechatAccount.java b/src/main/java/com/supwisdom/dlpay/app/domain/EWechatAccount.java
index 7ce18df..b2980df 100644
--- a/src/main/java/com/supwisdom/dlpay/app/domain/EWechatAccount.java
+++ b/src/main/java/com/supwisdom/dlpay/app/domain/EWechatAccount.java
@@ -160,4 +160,26 @@
     public void setCardcode(String cardcode) {
         this.cardcode = cardcode;
     }
+
+    @Override
+    public String toString() {
+        return "EWechatAccount{" +
+                "wxid='" + wxid + '\'' +
+                ", userid='" + userid + '\'' +
+                ", appkey=" + appkey +
+                ", openid='" + openid + '\'' +
+                ", stuempno='" + stuempno + '\'' +
+                ", status='" + status + '\'' +
+                ", binddate='" + binddate + '\'' +
+                ", nickname='" + nickname + '\'' +
+                ", sex='" + sex + '\'' +
+                ", province='" + province + '\'' +
+                ", city='" + city + '\'' +
+                ", country='" + country + '\'' +
+                ", headimgurl='" + headimgurl + '\'' +
+                ", privilege='" + privilege + '\'' +
+                ", unionid='" + unionid + '\'' +
+                ", cardcode='" + cardcode + '\'' +
+                '}';
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/app/domain/WechatResp.java b/src/main/java/com/supwisdom/dlpay/app/domain/WechatResp.java
index 5872df7..971d696 100644
--- a/src/main/java/com/supwisdom/dlpay/app/domain/WechatResp.java
+++ b/src/main/java/com/supwisdom/dlpay/app/domain/WechatResp.java
@@ -196,7 +196,32 @@
         this.jsondata = jsondata;
     }
 
-
-
-
+    @Override
+    public String toString() {
+        return "WechatResp{" +
+                "wxid='" + wxid + '\'' +
+                ", appid='" + appid + '\'' +
+                ", secret='" + secret + '\'' +
+                ", code='" + code + '\'' +
+                ", grant_type='" + grant_type + '\'' +
+                ", access_token='" + access_token + '\'' +
+                ", expires_in=" + expires_in +
+                ", refresh_token='" + refresh_token + '\'' +
+                ", openid='" + openid + '\'' +
+                ", scope='" + scope + '\'' +
+                ", errcode=" + errcode +
+                ", errmsg='" + errmsg + '\'' +
+                ", nickname='" + nickname + '\'' +
+                ", sex='" + sex + '\'' +
+                ", province='" + province + '\'' +
+                ", city='" + city + '\'' +
+                ", country='" + country + '\'' +
+                ", headimgurl='" + headimgurl + '\'' +
+                ", unionid='" + unionid + '\'' +
+                ", jsondata='" + jsondata + '\'' +
+                ", return_code='" + return_code + '\'' +
+                ", return_msg='" + return_msg + '\'' +
+                ", err_code='" + err_code + '\'' +
+                '}';
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/app/service/impl/AppServiceImpl.java b/src/main/java/com/supwisdom/dlpay/app/service/impl/AppServiceImpl.java
index 597a65c..1043c19 100644
--- a/src/main/java/com/supwisdom/dlpay/app/service/impl/AppServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/app/service/impl/AppServiceImpl.java
@@ -274,9 +274,11 @@
                         account.setOpenid(openid);

                         account.setStatus("1");

                         account.setBinddate(DateUtil.getNow());

+                        System.out.println("account对象内容"+account);

                         if(issave){

                             boolean b = appDao.saveAccount(account);

                             if (!b){

+

                                 return null;

                             }

                         }else {

diff --git a/src/main/resources/templates/apph5/applyforvisitor.html b/src/main/resources/templates/apph5/applyforvisitor.html
index 0e4a094..d3ffe5a 100644
--- a/src/main/resources/templates/apph5/applyforvisitor.html
+++ b/src/main/resources/templates/apph5/applyforvisitor.html
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
+
 <head>
     <title>首页</title>
     <!--<meta name="_csrf_header" th:content="${_csrf.headerName}" />
@@ -7,174 +8,132 @@
     <meta charset="utf-8"/>
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <!-- 引入样式 -->
-    <!--<link rel="stylesheet" href="https://unpkg.com/mint-ui/lib/style.css">-->
-    <link rel="stylesheet" href="/static/res/assets/plugins/mintui/style.css" th:href="@{/static/res/assets/plugins/mintui/style.css}">
-    <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.min.js}"></script>
-    <script type="text/javascript" th:src="@{/static/res/assets/plugins/layer/layer.js}"></script>
-    <!-- 先引入 Vue -->
-    <script type="text/javascript" th:src="@{/static/res/assets/plugins/nutui/vue.min.js}"></script>
-    <!-- 引入组件库 -->
-    <script type="text/javascript" th:src="@{/static/res/assets/plugins/mintui/index.js}"></script>
+    <link rel="stylesheet" href="/static/libs/layui/css/layui.css" th:href="@{/static/libs/layui/css/layui.css}"/>
 
-    <!--<script src="https://unpkg.com/vue/dist/vue.js"></script>
-    <script src="https://unpkg.com/mint-ui/lib/index.js"></script>-->
+    <link rel="stylesheet" href="/static/res/assets/plugins/element-ui/theme-default/index.css"
+          th:href="@{/static/res/assets/plugins/element-ui/theme-default/index.css}"/>
+
+    <!--<script type="text/javascript" th:src="@{/static/libs/jquery/jquery-3.2.1.min.js}"></script>-->
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.min.js}"></script>
+    <!--<script type="text/javascript" th:src="@{/static/libs/layui/layui.js}"></script>-->
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.form.js}"></script>
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/layer/layer.js}"></script>
+    <script type="text/javascript" th:src="@{/static/res/assets/js/vue.min.js}"></script>
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/element-ui/index.js}"></script>
+
+
 </head>
+
 <body>
+
 <div id="app">
     <div class="block" style="background:#ffffff;">
         <br>
-        <span class="mint-cell-title" style="text-align: center;display:block; font-size: 20px;color: #9932CC">访问申请</span><br><br>
+        <span class="demonstration" style="text-align: center;display:block; font-size: 20px;color: #9932CC">请假申请</span><br><br>
         <!--动态将图片轮播图的容器高度设置成与图片一致-->
-        <div class="mint-switch-input"></div>
-        <el-button type="success" @click="openDoor" style=" display:block;margin:0 auto;width:100px;height:100px;border-radius:50px;border:solid rgb(100,100,100) 0px; font-size: 20px" >开门</el-button>
+        <div class="el-message-box__input">
+            <label class="label-fade-enter">姓名</label><input type="text" class="el-input" id="name">
+            <label class="label-fade-enter">部门</label><input type="text" class="el-input" id="deptcode">
+            <label class="label-fade-enter">时间</label><select  class="el-select-dropdown__list" id="starttime">
+        </div>
+
+        <el-button type="success" @click="openDoor"
+                   style=" display:block;margin:0 auto;width:100px;height:100px;border-radius:50px;border:solid rgb(100,100,100) 0px; font-size: 20px">
+            登记
+        </el-button>
     </div>
 
 </div>
+
 </body>
 
 <script>
-    var mint_vue = new Vue({
+    var app_vue = new Vue({
         el: '#app',
-        data:{
-            searchDoorForm: {
-                visitorname: '',
-                idno: '',
-                time: '',
-                phone: '',
-                sex: '',
-                custid: '',
-                deptcode: '',
-                company: '',
-                remarks: '',
-            },
-            regions: [],
-            regionoptions: [],
-            deptlist: [],
-            custlist: [],
-            operFlag: [],
-            selectList: [],
-            sexlist: [],
+        data: {
+            devNameList: [],
+            devIdList: [],
+            selectDevName: '',
+            selectDevId: '',
+            // 图片父容器高度
+            bannerHeight: 1000,
+            // 浏览器宽度
+            screenWidth: 0,
+            userId: ''
         },
+
         methods: {
-            openDoor:function (devId) {
-                mint_openDoor(devId);
-            },
-            loadListData:function (devName) {
-                mint_searchByDevName(devName);
-            },
+            indexChange: function (pre, next) {
+                var _self = this;
+                var devIdListTmp = _self.devIdList;
+                _self.selectDevId = devIdListTmp[pre];
+                // console.log(_self.selectDevId)
 
+            },
+            openDoor: function () {
+                var devId = app_vue.selectDevId;
+                app_openDoor(devId);
+            },
+            setSize: function () {
+                // 通过浏览器宽度(图片宽度)计算高度
+                this.bannerHeight = this.screenWidth;
+            },
         },
-        watch:{
-            devName:function(newvs,oldvs){
-
-                if(!newvs){
-                    mint_searchByDevName('');
-                }
-            }
-        },
-        created:function(){
+        created: function () {
             var _self = this;
+            // 首次加载时,需要调用一次
+            _self.screenWidth = window.innerWidth;
+            _self.setSize();
 
-            var userId='[[${userId}]]';
+            var userId = '[[${userId}]]';
             _self.userId = userId;
 
 
-            $.ajax({
-                type: "get",
-                dataType: "json",
-                url: "[[@{/app/loadAppDevList?userId=}]]"+userId,
-                success: function (ret) {
-                    var ut = ret.devList;
-                    if (ut == null){
-                        confirm("不具有开门权限");
-                        return;
-                    }
-                    var devs = [];
-                    var names = [];
-                    var ids = [];
-                    for (var i = 0; i < ut.length; i++) {
-                        devs.push({
-                            label:ut[i].devname,
-                            value:ut[i].deviceid,
-                            building:ut[i].buildingname
-                        });
-                        names.push(ut[i].devname);
-                        ids.push(ut[i].deviceid);
-                    }
-                    _self.devList = devs;
-
-
-                }
-            })
         }
 
-
     })
 
+    function app_openDoor(devId) {
 
-    function mint_openDoor(devId) {
-        var userId = mint_vue.userId;
-        console.log(userId);
-        layer.confirm('你确定要开启此门吗?',{icon: 3,title: '请确认',offset: '30%'},function (index) {
-            $.ajax({
-                type: "get",
-                dataType: "json",
-                url:encodeURI("[[@{/app/openDoorById?devId=}]]" +devId+"&userId="+userId),
-                success:function (ret) {
-                    if (ret.message == undefined){
-                        layer.msg('用户认证已过期,请重新登录',{icon: 2,time:1000});
-                        window.location = "[[@{/login}]]";
-                        return;
-                    }
-                    if (ret.message != "") {
-                        layer.msg(ret.message, {icon: 2, time: 2000});
-                    } else {
-                        layer.msg('开门成功', {icon: 1, time: 2000});
-                    }
-                }
-            })
+        layer.confirm('你确定要登记吗?', {icon: 3, title: '请确认', offset: '30%'}, function (index) {
+            window.location.href = "[[@{/app/getvisitor}]]"
         });
 
     }
 
-    function mint_searchByDevName(devName) {
-        var userId = mint_vue.userId;
-        $.ajax({
-            type: "get",
-            dataType: "json",
-            url: "[[@{/app/searchByDevName?userId=}]]"+userId+"&devName="+devName,
-            success: function (ret) {
-                var ut = ret.devNameList;
-                if (ut == null) {
-                    confirm("没有对应设备!");
-                    return;
-                }
-                var devs = [];
-                var names = [];
-                var ids = [];
-                for (var i = 0; i < ut.length; i++) {
-                    devs.push({
-                        label: ut[i].devname,
-                        value: ut[i].deviceid,
-                        building: ut[i].buildingname
-                    });
-                    names.push(ut[i].devname);
-                    ids.push(ut[i].deviceid);
-                }
-                mint_vue.devList = devs;
-            }
-        })
-    }
-</script>
-<style>
-    .mint-search{
-        height:50px;
+    // 窗口大小发生改变时,调用一次
+    window.onresize = function () {
+        app_vue.screenWidth = window.innerWidth;
+        app_vue.setSize();
     }
 
-    .mint-searchbar{
-        padding:1px 1px 1px 1px;
-        box-sizing: border-box
+
+</script>
+
+<style>
+
+    .el-carousel__item h3 {
+        color: #ff3366;
+        font-size: 14px;
+        opacity: 0.75;
+        line-height: 300px;
+        margin: 0;
+        /*background-color:#66cccc;
+        border: 0px solid #e5e5e5;
+        width: 50%;
+        left: 10%;
+        height: 100%;*/
     }
-</style>
-</html>
+
+    .el-carousel__item:nth-child(2n) {
+        background-color: #ffffff;
+    }
+
+    .el-carousel__item:nth-child(2n+1) {
+        background-color: #ffffff;
+    }
+
+    .el-carousel__item .Carousel {
+        border-bottom: 1px solid #f1f4f8;
+    }
+</style>
\ No newline at end of file
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index 00e7aed..9a19eeb 100755
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -7,7 +7,6 @@
     <meta name="_csrf_token" th:content="${_csrf.parameterName}" th:value="${_csrf.token}" />

     <meta charset="utf-8"/>

     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

-    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

     <link rel="stylesheet" href="/static/libs/layui/css/layui.css" th:href="@{/static/libs/layui/css/layui.css}"/>

     <link rel="stylesheet" href="/static/libs/zTree/css/zTreeStyle/zTreeStyle.css" th:href="@{/static/libs/zTree/css/zTreeStyle/zTreeStyle.css}"/>

diff --git a/src/main/resources/templates/visitormanage/addVisitorCheck.html b/src/main/resources/templates/visitormanage/addVisitorCheck.html
index 67b586c..c95e2d5 100644
--- a/src/main/resources/templates/visitormanage/addVisitorCheck.html
+++ b/src/main/resources/templates/visitormanage/addVisitorCheck.html
@@ -306,7 +306,7 @@
 
         }
     });
-    var localcardservice = "http://localhost:2011/localcardservice/?callback=?";
+    var localcardservice = "//localhost:2011/localcardservice/?callback=?";
 
     // 对Date的扩展,将 Date 转化为指定格式的String
     // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,