| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- // pages/shipOwnerManage/shipOwnerList/shipOwnerList.js
- import {
- uploadFile
- } from "../../../utils/upload"
- import {
- postApi
- } from "../../../apis/api"
- Page({
- data: {
- shipOwnerList: [],
- term: ''
- },
- 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',
- })
- },
- onLoad() {
- this.getShipOwnerList()
- },
- onPullDownRefresh() {
- this.setData({
- term: ''
- })
- this.getShipOwnerList(1)
- },
- })
|