// components/voyages/Voyages.js import { postApi } from "../../apis/api" Component({ properties: { }, data: { term: '', status: 1, currentPage: 1, size: 10, list: [] }, methods: { async getVoyageList() { let res = await postApi('/voyage/list', { cargoOwnerId: wx.getStorageSync('cargoOwnerId'), term: this.data.term, status: this.data.status, currentPage: this.data.currentPage, size: this.data.size }) this.setData({ list: [...res.data.result,...res.data.result,...res.data.result] }) console.log(res) }, changeStatus(e) { let { status } = e.currentTarget.dataset this.setData({ status, currentPage: 1, size: 10 }) this.getVoyageList() }, } })