From 3a5e49666af1da441633b0a9bae4c3c2b18974b3 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期二, 14 四月 2026 16:05:41 +0800
Subject: [PATCH] 质押合同添加业务经理绑定,H5相关逻辑完善

---
 fzzy-igdss-web/src/main/resources/templates/wx/unbind.html |  109 +++++++++++++++++++-----------------------------------
 1 files changed, 39 insertions(+), 70 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/templates/wx/unbind.html b/fzzy-igdss-web/src/main/resources/templates/wx/unbind.html
index eb535c2..10c7cf8 100644
--- a/fzzy-igdss-web/src/main/resources/templates/wx/unbind.html
+++ b/fzzy-igdss-web/src/main/resources/templates/wx/unbind.html
@@ -10,32 +10,39 @@
         .mui-content {
             margin: 0 6px;
         }
+
         .mui-content-padded {
             margin: 10px;
             width: 96%;
             margin: auto;
             margin-top: 8px;
         }
+
         .mui-radio.mui-left input[type=radio] {
             left: 1px;
         }
+
         .mui-checkbox.mui-left label, .mui-radio.mui-left label {
             padding-right: 20px;
             padding-left: 35px;
         }
+
         .mui-btn-block {
             width: 96%;
             margin: auto;
             margin-top: 10px;
             padding: 8px 0;
         }
+
         .mui-input-row label ~ input {
             float: left;
             width: 50%;
         }
+
         .mui-input-row label {
             width: 27%;
         }
+
         .btn {
             margin-top: 4px;
             margin-right: 2px;
@@ -44,8 +51,14 @@
             color: #fff;
             padding: 5px 5px;
         }
+
         .ts {
             margin-top: 10px;
+        }
+
+        .login-yzm-btn {
+            width: 80px;
+            height: 38px;
         }
     </style>
 </head>
@@ -59,10 +72,14 @@
             </div>
             <div class="mui-input-row">
                 <label>楠岃瘉鐮�</label>
-                <input id="code" style="width: 45%;" type="text" class="mui-input-clear" placeholder="5鍒嗛挓鍐呮湁鏁�">
-                <div id="count">
-                    <button type="button" class="btn" onclick="getCheck()">鑾峰彇楠岃瘉鐮�</button>
-                </div>
+                <input id="code" style="width: 45%;" type="text" class="mui-input-clear" placeholder="鍦ㄦ杈撳叆楠岃瘉鐮�">
+            </div>
+            <div class="mui-input-row" style="height: 60px">
+                <label>鐐瑰嚮鏇存崲楠岃瘉鐮�</label>
+                <a href="javascript:void(0);" title="鐐瑰嚮鏇存崲楠岃瘉鐮�" class="login-yzm-btn">
+                    <img class="imgcode"
+                         th:src="@{/captcha/captchaImage(type=${captchaType})}"/>
+                </a>
             </div>
         </form>
     </div>
@@ -74,97 +91,49 @@
 <script th:inline="javascript">
 
     var openid = [[${openid}]];  //鐢ㄦ埛鐨刼penid
-    var c = 60; //鑾峰彇楠岃瘉鐮佸悗鐨勫�掕鏃�
+    var captchaType = [[${captchaType}]];  //楠岃瘉鐮佺被鍨�
+
     mui.init();
 
     //鑾峰彇楠岃瘉鐮�
-    function getCheck() {
-        var phone = document.getElementById("phone").value;
-        if (phone == null || phone.trim() == '') {
-            mui.alert("鎵嬫満鍙蜂笉鑳戒负绌�", '鎻愮ず', ["纭畾"], function() {}, "div");
-            return;
-        }
-        var flag = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(phone);
-        if (!flag) {
-            mui.alert("鎵嬫満鍙锋牸寮忎笉姝g‘", '鎻愮ず', ["纭畾"], function() {}, "div");
-            return;
-        }
+    $('.imgcode').click(function () {
+        var url = "../captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
+        $(".imgcode").attr("src", url);
+    });
 
-        //璇锋眰鍙傛暟
-        var data = JSON.stringify({
-            "interfaceId": "app_1004",
-            "sign": "01",
-            "outId": "01-01",
-            "reqDateTime": new Date(),
-            "data": {
-                "openid": openid,
-                "mobile": phone
-            }
-        });
-
-        $.ajax({
-            type: "POST",
-            url: "../wx/gateway",
-            dataType: "json",
-            contentType: "application/json;charset=UTF-8",
-            data: data,
-            success: function (result) {
-                if (result.code == "0000") {
-                    mui.toast("鏍¢獙鐮佸凡鍙戦��");
-                    //鍊掕鏃惰鏁�
-                    count();
-                } else {
-                    mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
-                }
-            }
-        });
-    }
-
-    //鍊掕鏃惰鏁�
-    function count() {
-        $("#count").html('');
-        $("#count").addClass("ts");
-        var interval = setInterval(function () {//瀹氫箟瀹氭椂鍣�
-            if (c == 0) {
-                clearInterval(interval);//娓呴櫎瀹氭椂鍣�
-                $("#count").removeClass("ts");
-                $("#count").html('<button type="button" class="btn" onclick="getCheck()">鑾峰彇楠岃瘉鐮�</button>');
-                c = 60;
-            } else {
-                $("#count").html(c + 's鍚庨噸璇�');
-                c--;
-            }
-        }, 1000);
-    }
 
     //缁戝畾鎻愪氦
     function unBinding() {
         var phone = document.getElementById("phone").value;
         if (phone == null || phone.trim() == '') {
-            mui.alert("鎵嬫満鍙蜂笉鑳戒负绌猴紒", '鎻愮ず', ["纭畾"], function() {}, "div");
+            mui.alert("鎵嬫満鍙蜂笉鑳戒负绌猴紒", '鎻愮ず', ["纭畾"], function () {
+            }, "div");
             return;
         }
         var flag = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(phone);
         if (!flag) {
-            mui.alert("鎵嬫満鍙锋牸寮忎笉姝g‘锛�", '鎻愮ず', ["纭畾"], function() {}, "div");
+            mui.alert("鎵嬫満鍙锋牸寮忎笉姝g‘锛�", '鎻愮ず', ["纭畾"], function () {
+            }, "div");
             return;
         }
         var code = document.getElementById("code").value;
-        // if (code == null || code.trim() == '') {
-        //     mui.alert("楠岃瘉鐮佷笉鑳戒负绌猴紒", '鎻愮ず', ["纭畾"], function() {}, "div");
-        //     return;
-        // }
+        if (code == null || code.trim() == '') {
+            mui.alert("楠岃瘉鐮佷笉鑳戒负绌猴紒", '鎻愮ず', ["纭畾"], function () {
+            }, "div");
+            return;
+        }
 
         var data = {
             "openid": openid,
             "mobile": phone,
             "msgCode": code
         };
-        wxCommon.postJson("../wx/unBandOpenId", data,function (result) {
+        wxCommon.postJson("../wx/unBandOpenId", data, function (result) {
             if (result.code == "0000") {
                 mui.toast("瑙g粦鎴愬姛锛�");
             } else {
-                mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
+                mui.alert(result.msg, '鎻愮ず', ["纭畾"], function () {
+                }, "div");
             }
         });
     }

--
Gitblit v1.9.3