yuliang 5 年之前
父節點
當前提交
512a7bf536

+ 2 - 0
whepi-ui/templates/home/home.ftl

@@ -40,6 +40,7 @@
 <#include "/home/frag.foot.ftl" />
 <script>
     var xiaoquId = '5'; //1238790987234
+    var canSahngbao = true;
     <#include "/home/ribao.js" />
     <#include "/home/qiuzhu.js" />
     (function ($) {
@@ -76,6 +77,7 @@
         <#if msReport ??>var msReport = ${msReport}</#if>;
         $('#ribao_jinrijujian').append(msReport.safetyNum);
         if (msReport.reportStatus == 1) {
+            canSahngbao = false;
             document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
         }
         ribaoInitialization(msReport.reportId);

+ 2 - 1
whepi-ui/templates/home/ribao.js

@@ -1189,6 +1189,7 @@ function ribaoCommit() {
       ribao_refrash();
 
       clearShow();
+      canSahngbao = true;
       document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
     },
   });
@@ -1389,7 +1390,7 @@ function updateSuspected(suspectedId) {
 
 
 function addReport() {
-  if (document.getElementById("btn_shangbao").style['background-color'] == "#D9D9D9") {
+  if (!canSahngbao) {
     return;
   }
   var userId = $("#userId").val();

+ 1 - 0
whepi-ui/templates/lingyun/home.ftl

@@ -64,6 +64,7 @@
         <#if msReport ??>var msReport = ${msReport}</#if>;
         $('#ribao_jinrijujian').append(msReport.safetyNum);
         if (msReport.reportStatus == 1) {
+          canSahngbao = false;
             document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
         }
         ribaoInitialization(msReport.reportId);

+ 2 - 1
whepi-ui/templates/lingyun/ribao.js

@@ -1018,6 +1018,7 @@ function ribaoCommit() {
             ribao_refrash();
 
             clearShow();
+          canSahngbao = true;
             document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
         },
     });
@@ -1137,7 +1138,7 @@ function updateSuspected(suspectedId) {
 
 
 function addReport() {
-    if (document.getElementById("btn_shangbao").style['background-color'] == "#D9D9D9") {
+    if (!canSahngbao) {
         return;
     }
     var userId = $("#userId").val();