浏览代码

Merge remote-tracking branch 'origin/master'

guojing 5 年之前
父节点
当前提交
588eb6671a
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      whepi-ui/templates/yeweihui/tgPublish.ftl

+ 11 - 0
whepi-ui/templates/yeweihui/tgPublish.ftl

@@ -40,6 +40,8 @@
 <script>
     var userId = ${userId};
 
+    var isLoading = false;
+
     $("#tg_input_end_time").datetimePicker();
     $("#tg_input_deliver_time").datetimePicker();
 
@@ -190,11 +192,19 @@
 
         };
 
+        if (isLoading == true) {
+            return;
+        }
+        else {
+            isLoading = true;
+        }
+
         $.ajax({
             url: '/yeweihui/tgPublish.json',
             type: 'post',
             data: sendData,
             success: function (data) {
+                isLoading = false;
                 // console.log(data);
                 if (data.success) {
                     window.location.href = "/yeweihui/home.html?show=tuangou&userId=" + userId;
@@ -204,6 +214,7 @@
                 }
             },
             error: function () {
+                isLoading = false;
                 $.alert("网络异常");
             }
         });