// pages/shipOwnerManage/shipOwnerList/shipOwnerList.js import { uploadFile } from "../../../utils/upload" import { postApi } from "../../../apis/api" Page({ data: { shipOwnerList: [], term: '', currentLetter: '' }, async getShipOwnerList(type) { let res = await postApi('/ship/list', { loginAccountId: wx.getStorageSync('loginAccountId'), term: this.data.term }) if (type) wx.stopPullDownRefresh() this.setData({ shipOwnerList: res.data.result }) }, call(e) { wx.makePhoneCall({ phoneNumber: e.currentTarget.dataset.phone }) }, addShipOwner() { wx.navigateTo({ url: '../addShipOnwer/addShipOnwer', }) }, tapLetter(e) { this.setData({ currentLetter: e.currentTarget.dataset.letter }) }, onLoad() { this.getShipOwnerList() }, onPullDownRefresh() { this.setData({ term: '' }) this.getShipOwnerList(1) }, })