| 123456789101112131415161718192021222324252627282930313233 |
- // pages/index/index.js
- import {
- getApi,
- postApi
- } from "../../apis/api"
- import cloudApi from "../../apis/cloudApi"
- Page({
- data: {
- indexInfo: {},
- },
- async getIndexInfo() {
- let res = await postApi('/voyage/index', {
- cargoOwnerId: wx.getStorageSync('cargoOwnerId')
- })
- this.setData({
- indexInfo: res.data.result
- })
- },
- forbidTouchMove() {
- },
- onShow() {
- let cargoOwnerId = wx.getStorageSync('cargoOwnerId')
- if (cargoOwnerId) {
- this.getIndexInfo()
- this.setData({
- cargoOwnerId
- })
- }
- const child = this.selectComponent('.voyages');
- child.getVoyageList()
- }
- })
|