|
|
@ -2,6 +2,7 @@ |
|
|
import Scene from '../../index/scene' |
|
|
import Scene from '../../index/scene' |
|
|
import { getCardList, removeCardNop } from "../../../api/saas" |
|
|
import { getCardList, removeCardNop } from "../../../api/saas" |
|
|
const util = require('../../../utils/util') |
|
|
const util = require('../../../utils/util') |
|
|
|
|
|
const event = require('../../../utils/event') |
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
|
|
|
|
|
|
Scene({ |
|
|
Scene({ |
|
|
@ -31,8 +32,14 @@ Scene({ |
|
|
this.data.actions = [{ id: 2, name: '绑定员工' }, { id: 1, name: '绑定客户' }] |
|
|
this.data.actions = [{ id: 2, name: '绑定员工' }, { id: 1, name: '绑定客户' }] |
|
|
} |
|
|
} |
|
|
this.setData({ height: app.globalData.fragmentHeight, actions: this.data.actions }) |
|
|
this.setData({ height: app.globalData.fragmentHeight, actions: this.data.actions }) |
|
|
|
|
|
event.on('EventMessage', this, this.onEvent) |
|
|
this.fetchList() |
|
|
this.fetchList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
onEvent: function(message){ |
|
|
|
|
|
if (message.what == 102 || message.what == 120) { |
|
|
|
|
|
this.onRefreshList() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onRefreshList: function () { |
|
|
onRefreshList: function () { |
|
|
if (this.data.requesting) { |
|
|
if (this.data.requesting) { |
|
|
return |
|
|
return |
|
|
@ -95,5 +102,8 @@ Scene({ |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
|
util.showToast(err) |
|
|
util.showToast(err) |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onUnload: function(){ |
|
|
|
|
|
event.remove('EventMessage', this) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |