car.js 626 B

123456789101112131415161718192021222324252627282930313233
  1. //index.js
  2. //获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. carInfo: {},
  7. // tab
  8. active: 0,
  9. // 是否可以领取积分
  10. disabled: false
  11. },
  12. //事件处理函数
  13. receiveBtn: function () {
  14. wx.showToast({
  15. title: '领取积分成功',
  16. icon: 'success',
  17. duration: 2000
  18. })
  19. },
  20. onLoad: function () {
  21. // 查询信息
  22. wx.request({
  23. url: app.globalData.publicUrl + '/api/htyd/config/car',
  24. method: "get",
  25. data: {},
  26. success: (res) => {
  27. console.log(res.data.data);
  28. this.setData({ carInfo: res.data.data })
  29. }
  30. })
  31. },
  32. })