Ver código fonte

校本平台试用商品支持

24753255@qq.com 7 meses atrás
pai
commit
064b6f09f4
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      protected/views/imsSale/_trial.php

+ 5 - 2
protected/views/imsSale/_trial.php

@@ -17,6 +17,7 @@
 
         var selectedClassId=0;
         var selectedClassName='';
+        var firstSubjectType=0;
         <?php
         if(isset($subjects)){
             foreach ($subjects as $type => $val){
@@ -52,7 +53,9 @@
 //            }
         }
         ?>
-        console.log(subject);
+
+        firstSubjectType=Object.keys(subject)[0];
+
          function setSubject(type){
              var html='';
              if(subject[type].length>0){
@@ -62,7 +65,7 @@
              }
              $('#subjectId').html(html);
          }
-        setSubject(1);
+        setSubject(firstSubjectType);
 
          $('.goodTypeInput').click(function(){
              console.log($(this).val());