lundi 17 juin 2019

There is no data in the table

There is no data in the table. I'd like to bring the price in the red circle on the firebase to the table. I don't know if the path is wrong or the variable is wrong.

 https://i.imgur.com/9uS84eD.png
 https://i.imgur.com/sV6rRMH.png



  function get_mask_list() {
      var maskRef = database.ref('Admin/Center/' + userInfo.uid);       
      maskRef.on('value', on_child_added)            
  }

  function on_child_added(data) {

      var today = new Date();
      var dd = today.getDate();
      var mm = today.getMonth() + 1; //January is 0!
      var yyyy = today.getFullYear();

      if (dd < 10) {
          dd = '0' + dd
          }
      if (mm < 10) {
          mm = '0' + mm
          }
      today = yyyy + '.' + mm + '.' + dd;      
      }

function on_child_added(data) {

var content = '';
      var maskData = data.val();
      var name = maskData.name;
      var adr = maskData.adr;
      var ivn = maskData.ivn;         
      var 분출량 = maskData.분출량.yyyy.mm.dd
      console.log(분출량)

      content += '<tr>';
      content += '<td>' + today + '</td>';
      content += '<td>' + name + '</td>';
      content += '<td>' + adr + '</td>';
      content += '<td>' + ivn + '</td>';
     // content += '<td>' + 분출량 + '</td>';


      content += '<tr>';
      $('.table').append(content);

  }

 https://i.imgur.com/Ev1EjJJ.png
 https://i.imgur.com/DGVXIjJ.png




Aucun commentaire:

Enregistrer un commentaire