collectCarLog.js 725 Bytes
const WXRequest = require('../../utils/wxrequest.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list: [],
    avatarurl: '',
    nickname: ''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    const that = this;
    that.setData({
      avatarurl: options.avatarurl,
      nickname: options.nickname
    })
    WXRequest.get('vehiclecollection/byWxId', {
      wxId: options.id
    }).then((res)=>{
        that.setData({
          list: res.data
        })
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  }
})