Przeglądaj źródła

静止底部滚动条

wyq 3 lat temu
rodzic
commit
11b2cc9d68
2 zmienionych plików z 16 dodań i 6 usunięć
  1. 1 0
      src/css/informationOut.less
  2. 15 6
      src/js/staticInfo.js

+ 1 - 0
src/css/informationOut.less

@@ -77,6 +77,7 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   .infos {
     height: 100%;
     overflow-y: auto;
+    overflow-x:hidden
     /*padding: 0 60px 0 0;
     width: calc(100% - 195px);*/
   }

+ 15 - 6
src/js/staticInfo.js

@@ -123,9 +123,11 @@ function renderContent(list, contentWrapClassName) {
 
 function renderContentscale(list, contentWrapClassName, name) {
   var pushInfo = []
+  var textType = []
   $('.scaletitle').html(name);
   for (var i = 0; i < list[0].detailList.length; i++) {
     var item = list[0].detailList[i];
+    textType.push(item.textType)
     if (item.textType == 11) {
       item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
       str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
@@ -228,7 +230,7 @@ function renderContentscale(list, contentWrapClassName, name) {
   adjustHeight();
   adjustWidth()
   getcheck()
-  getResult(pushInfo)
+  getResult(pushInfo, textType)
   copy(name)
   getprinting()
 
@@ -240,7 +242,6 @@ function getprinting() {
      
     var mb = myBrowser();
     if ("IE" == mb) {
-      console.log(123)
       $('#Print').css({
         'height': 'auto', //高度自动
       }).jqprint();
@@ -354,7 +355,7 @@ function getchecks() {
     }
   });
 }
-function getResult(pushInfo) {
+function getResult(pushInfo, textType) {
   $(".but").click(function () {
     let arr = [];
     let multarr = []
@@ -366,7 +367,16 @@ function getResult(pushInfo) {
     let proposals = []
     let scrollTop = []
     let v
+    let numType = false
     isclick = true
+    
+    for (var i = 0; i < textType.length; i++) {
+      console.log(textType[i])
+      if (textType[i] == 13) {
+        numType = true
+      }
+    }
+    console.log(numType)
     $(".contentList").each(function (i) {
       if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
         $(this).find(".item-title").addClass('chColor');
@@ -436,13 +446,12 @@ function getResult(pushInfo) {
         result = tmp
         proposal = proposals.join(";");
       }
-      console.log(num)
       if (result) {
         $(".hel").attr({
           "title": proposal
         });
         $(".result_title").html('结果:' + result);
-        if (num >= 0) {
+        if (num >= 0 && numType) {
           $(".score").html('总分:' + num + '分');
         }
         $(".result").css('display', 'block')
@@ -450,7 +459,7 @@ function getResult(pushInfo) {
         $(".copy").css('display', 'block')
         $(".foot").css('display', 'block')
       } else {
-        if (num >= 0) {
+        if (num >= 0 && numType) {
           $(".score").html('总分:' + num + '分');
         }
         $(".score").css('display', 'block')