const app = getApp();
var baseUrl = app.globalData.baseUrl;
var network = require("../../utils/net.js");
var timechage = require("../../utils/dateTimeUtil.js");

Page({

  data: {
    list:[],
  },

  sendTheDetails: function (event) {
    let that = this
    var parm1 = event.currentTarget.dataset;
    wx.navigateTo({
      url: '/pages/sendTheDetails/sendTheDetails?ID=' + parm1.id
    })
  },
 
  onShow: function (e) {
    var that = this;
    var reslut = [];
    var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/OrderRpc/GetNoDriverOrder';
    var params = [];
    network.transfer_request(method, params, function (res) {
      for (var i = 0; i < res.result.length; i++) {
        let dmo = {
          LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"),
          ID: res.result[i].ID,
          Customer_Name: res.result[i].Customer_Name,
          Money: res.result[i].Money,
        }
        reslut.push(dmo)
      }
      that.setData({
        list: reslut,
      })

    })
  }

})