增加了二维码消费扣费功能
diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql
index 296df08..079f943 100644
--- a/src/main/resources/data.sql
+++ b/src/main/resources/data.sql
@@ -76,13 +76,14 @@
 INSERT INTO "tb_devicefeeconfig"("areano", "feecfgversion", "feeconfig") VALUES (1, NULL, 1);
 INSERT INTO "tb_feeconfig"("id", "amount", "max_water_litre", "cfg_version") VALUES (1, 1, 50, NULL);
 INSERT INTO "tb_person_identity"("third_uid", "accamount", "cardphyid", "coamount", "createtime", "lockflag", "lossflag", "status", "userid") VALUES ('25002882', 0, '6655ec27', 0, NULL, 0, 0, 'normal', 'd1yctWs5+ks0iQN3m9bUvRHus6HbKbrs');
-INSERT INTO "tb_person_identity"("third_uid", "accamount", "cardphyid", "coamount", "createtime", "lockflag", "lossflag", "status", "userid") VALUES ('25002885', 0, '6655ec27', 0, NULL, 0, 0, 'normal', 'f3yctKs5+bs1iMU4m8JUvPOus7SbDbrd');
+INSERT INTO "tb_person_identity"("third_uid", "accamount", "cardphyid", "coamount", "createtime", "lockflag", "lossflag", "status", "userid") VALUES ('25002885', 0, '6655ec27', 0, NULL, 0, 0, 'normal', '2c9380836c6b91e9016c6ec7c0020005');
 INSERT INTO "tb_person"("userid", "addr", "country", "email", "idno", "idtype", "lastsaved", "mobile", "name", "nation", "sex", "status", "tel", "zipcode") VALUES ('d1yctWs5+ks0iQN3m9bUvRHus6HbKbrs', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '王富贵', NULL, NULL, '1', NULL, NULL);
-INSERT INTO "tb_person"("userid", "addr", "country", "email", "idno", "idtype", "lastsaved", "mobile", "name", "nation", "sex", "status", "tel", "zipcode") VALUES ('f3yctKs5+bs1iMU4m8JUvPOus7SbDbrd', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '蔡程应', NULL, NULL, '1', NULL, NULL);
+INSERT INTO "tb_person"("userid", "addr", "country", "email", "idno", "idtype", "lastsaved", "mobile", "name", "nation", "sex", "status", "tel", "zipcode") VALUES ('2c9380836c6b91e9016c6ec7c0020005', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '蔡程应', NULL, NULL, '1', NULL, NULL);
 
 
-INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_auth_url', 'http://172.28.43.20:8080/water/api/device/confirm?cobillno=');
-INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_sina_shorturl', 'http://api.t.sina.com.cn/short_url/shorten.json?source=2223392143');
+INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_auth_url', 'https://yy.dlsmk.cn/water/api/device/qrcode/pretend?cobillno=');
+INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_shorturl_baidu', 'https://dwz.cn/admin/v2/create');
+INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_shorturl_baidu_token', 'ee9dc7c65a2b0598106a5930dd774971');
 INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_shopaccno', '2000000010');
 INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_appid', '700001');
 INSERT INTO "tb_businesspara"("parakey", "paraval") VALUES ('water_secret', '5f788ce433ec44f299351cdf7f137e81');
diff --git a/src/main/resources/templates/error/500.html b/src/main/resources/templates/error/500.html
index c46acd2..8e2bbea 100755
--- a/src/main/resources/templates/error/500.html
+++ b/src/main/resources/templates/error/500.html
@@ -16,6 +16,7 @@
     <i class="layui-icon" face>&#xe664;</i>

     <div class="layui-text">

       <p>服务器出错了</p>

+      <p>[[${errorMsg}]]</p>

       <h1>

         <span class="layui-anim layui-anim-loop layui-anim-">5</span>

         <span class="layui-anim layui-anim-loop layui-anim-rotate">0</span> 

diff --git a/src/main/resources/templates/system/confirm/confirm.html b/src/main/resources/templates/system/confirm/confirm.html
deleted file mode 100644
index 5e66269..0000000
--- a/src/main/resources/templates/system/confirm/confirm.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
-<head>
-    <meta charset="UTF-8">
-    <title>Title</title>
-</head>
-<body>
-<button id="button-auth" style="margin:100px 100px auto;text-align: center;color: green;width: 200px;height: 80px;">确认</button>
-</body>
-<script type="text/javascript" th:src="@{/static/libs/jquery/jquery-3.2.1.min.js}"></script>
-<script>
-    /**
-     * @return {string}
-     */
-    function GetUrlRefnoPara() {
-        var url = document.location.toString();
-        var arrUrl = url.split("?");
-        var para = arrUrl[1].split("=");
-        return para[1]
-    }
-
-    /**
-     * @return {string}
-     */
-    function GetUserid() {
-        return "d1yctWs5+ks0iQN3m9bUvRHus6HbKbrs"
-    }
-    var allData = {
-        cobillno:GetUrlRefnoPara(),
-        userid:GetUserid()
-    }
-    $("#button-auth").click(function () {
-        $.ajax({
-            url: "[[@{/api/device/auth}]]",
-            type:"POST",
-            contentType:"application/json;charset=UTF-8",
-            data:JSON.stringify(allData),
-            success:function (data) {
-                if (data.retcode == 0) {
-                    alert("认证成功")
-                }else {
-                    alert(data.retmsg)
-                }
-            },
-            fail: function (data) {
-                alert(data.retmsg)
-            },
-            error:function (xhr) {
-                console.log(xhr)
-            }
-        })
-    })
-</script>
-</html>
-
diff --git a/src/main/resources/templates/system/start/start.html b/src/main/resources/templates/system/start/start.html
new file mode 100644
index 0000000..79888d7
--- /dev/null
+++ b/src/main/resources/templates/system/start/start.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
+<head>
+    <meta charset="utf-8">
+    <title>扫码成功</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" th:href="@{/static/libs/layui/css/layui.css}" media="all"/>
+    <link rel="stylesheet" th:href="@{/static/custom/css/admin.css}" media="all"/>
+</head>
+<body>
+<div class="layui-fluid">
+    <h2 style="margin-top: 10px">
+        设备区域:<span class="layui-anim layui-anim-loop layui-anim-">[[${areaname}]]</span>
+    </h2>
+    <h2 style="margin-top: 10px">
+        设备名称:<span class="layui-anim layui-anim-loop layui-anim-">[[${devicename}]]</span>
+    </h2>
+    <h2 id="qrcode-success" style="margin-top: 70px;text-align: center">
+        扫码成功!
+    </h2>
+    <div style="margin-top:25px;text-align:center">
+        <button id="button-start-water" class="layui-btn icon-btn" style="width: 120px;height: 45px">
+            <div style="font-size: 20px">开始出水</div>
+        </button>
+        <span><h2 id="msg-area"></h2></span>
+    </div>
+</div>
+</body>
+<script type="text/javascript" th:src="@{/static/libs/jquery/jquery-3.2.1.min.js}"></script>
+<script>
+    function GetUrlCobillnoPara() {
+        var url = document.location.toString();
+        var arrUrl = url.split("?");
+        var para = arrUrl[1].split("&")[0].split("=");
+        return para[1]
+    }
+
+    var allData = {
+        cobillno: GetUrlCobillnoPara(),
+    }
+
+    $("#button-start-water").click(function () {
+        $.ajax({
+            url: "[[@{/api/device/qrcode/start}]]",
+            type: "POST",
+            contentType: "application/json;charset=UTF-8",
+            data: JSON.stringify(allData),
+            success: function (data) {
+                if (data.retcode == 0) {
+                    $("#button-start-water").hide()
+                    $("#msg-area").html("正在控制设备出水,请稍后!")
+                } else {
+                    $("#qrcode-success").html(" ")
+                    $("#button-start-water").hide()
+                    $("#msg-area").html(data.retmsg)
+                }
+            },
+            fail: function (data) {
+                alert(data.retmsg)
+            },
+            error: function (xhr) {
+                console.log(xhr)
+            }
+        })
+    })
+</script>
+</html>
+