|
|
@@ -7,6 +7,36 @@ import {
|
|
|
} 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)
|
|
|
},
|
|
|
})
|