index.js 398 B

12345678910111213141516171819202122
  1. // pages/index/index.js
  2. import {
  3. getApi,
  4. postApi
  5. } from "../../apis/api"
  6. import cloudApi from "../../apis/cloudApi"
  7. Page({
  8. data: {
  9. indexInfo:{}
  10. },
  11. async getIndexInfo() {
  12. let res = await postApi('/voyage/index', {
  13. cargoOwnerId: wx.getStorageSync('cargoOwnerId')
  14. })
  15. this.setData({
  16. indexInfo:res.data.result
  17. })
  18. },
  19. onLoad() {
  20. this.getIndexInfo()
  21. }
  22. })