wyq 4 lat temu
rodzic
commit
4e36d6f3c8
1 zmienionych plików z 14 dodań i 1 usunięć
  1. 14 1
      src/js/staticInfo.js

+ 14 - 1
src/js/staticInfo.js

@@ -255,12 +255,14 @@ function getcheck() {
     const domName = $(this).attr('name');
     const $radio = $(this);
     const id = $(this).parents('.contentList').data("id");
+    console.log($radio.data('waschecked'))
     if ($radio.data('waschecked') == true) {
-      $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
+      // $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
       if (isclick) {
         getchecks()
       }
     } else {
+      $radio.data('waschecked', true);
       $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
       if (isclick) {
         getchecks()
@@ -338,9 +340,11 @@ function getResult(pushInfo, textType) {
         }
       });
       tmp = arr.join(";");
+
       if (pushInfo.length > 0) {
         for (var i = 0; i < pushInfo.length; i++) {
           if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min) {
+
             if (tmp) {
               if (num == 0) {
                 result = pushInfo[i].result + ';' + tmp
@@ -368,6 +372,15 @@ function getResult(pushInfo, textType) {
 
           }
         }
+      } else {
+        if (tmp) {
+          result = tmp
+          $(".result").css('display', 'block')
+          $(".copy").css('display', 'block')
+        } else {
+          $(".result").css('display', 'none')
+          $(".copy").css('display', 'none')
+        }
       }
       $(".result_title").attr({
         "title": result