Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	whepi-ui/templates/home/qiuzhu.ftl
guojing 5 лет назад
Родитель
Сommit
d301a78298
1 измененных файлов с 39 добавлено и 28 удалено
  1. 39 28
      whepi-ui/templates/home/qiuzhu.ftl

+ 39 - 28
whepi-ui/templates/home/qiuzhu.ftl

@@ -188,35 +188,46 @@
              $("#qzf2").val()
              $("#qzf3").val()
              $("#qzf4").val()*/
-        if ($("#Qzinput").val() == '') {
-            $('#play').toggle();
-            $('#notPlay')[0].style.display = '';
-            return alert('请输入');
+        var taskTitle = $("#Qzinput").val();
+        if (!taskTitle) {
+            alert("请输入求助标题!")
+            return false;
+        }
+        var taskTarget = $("#qzf2").val();
+        if (!taskTarget) {
+            alert("请输入求助目标!")
+            return false;
+        }
+        var remark = $("#remarks").val();
+        if (!remark) {
+            alert("请输入求助内容!")
+            return false;
         }
-        /* var data = {}
-         var tep = JSON.stringify(data);
-         console.log(tep)
-         $.ajax({
-             url: '/home/home/addFimaly',
-             data: {
-                 taskTitle: $("#Qzinput").val(),
-                 taskTarget: $("#qzf2").val(),
-                 remark: $("#remarks").val()
-             },
-             type: 'GET',
-             success: function (data) {
-                 /!*if ($('#notPlay')[0].style.display == 'none') {
-                     $('#play').toggle();
-                     $('#notPlay')[0].style.display = '';
-                 } else {
-                     $('#play')[0].style.display = '';
-                     $('#notPlay')[0].style.display = 'none';
-                 }*!/
-             },
-             error: function () {
 
-             }
-         });*/
+        var data = {}
+        var tep = JSON.stringify(data);
+        console.log(tep)
+        $.ajax({
+            url: '/home/home/addFimaly',
+            data: {
+                taskTitle: $("#Qzinput").val(),
+                taskTarget: $("#qzf2").val(),
+                remark: $("#remarks").val()
+            },
+            type: 'GET',
+            success: function (data) {
+                /*if ($('#notPlay')[0].style.display == 'none') {
+                    $('#play').toggle();
+                    $('#notPlay')[0].style.display = '';
+                } else {
+                    $('#play')[0].style.display = '';
+                    $('#notPlay')[0].style.display = 'none';
+                }*/
+            },
+            error: function () {
+
+            }
+        });
     }
 
     //我的求助的页面展示
@@ -224,7 +235,7 @@
         $('#valueQz').empty();//清除节点
         $.ajax({
             url: '/home/home/queryQzTask',
-            data: {taskStatus: status},
+            data: {taskStatus:status},
             type: 'GET',
             success: function (data) {
                 console.log(data);