|
|
@ -89,6 +89,7 @@ Scene({ |
|
|
safeBottom: app.globalData.safeBottom |
|
|
safeBottom: app.globalData.safeBottom |
|
|
}) |
|
|
}) |
|
|
event.on('EventMessage', this, this.onEvent) |
|
|
event.on('EventMessage', this, this.onEvent) |
|
|
|
|
|
// this.worker = wx.createWorker('/workers/process.js')
|
|
|
this.data.setInter = setInterval(this.fetchMessage, 10000) |
|
|
this.data.setInter = setInterval(this.fetchMessage, 10000) |
|
|
}, |
|
|
}, |
|
|
/************************************** 生命周期函数--监听页面初次渲染完成 ********************************************/ |
|
|
/************************************** 生命周期函数--监听页面初次渲染完成 ********************************************/ |
|
|
@ -111,6 +112,14 @@ Scene({ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
fetchMessage: function(){ |
|
|
fetchMessage: function(){ |
|
|
|
|
|
// var params = { url: sconfig.baseUrl, xAppId: app.xAppId}
|
|
|
|
|
|
// params.url = sconfig.baseUrl + '/message-center/message/get/message-list'
|
|
|
|
|
|
// params.xFactoryId = app.userInfo.factoryId
|
|
|
|
|
|
// params.authorization = app.globalData.authorization
|
|
|
|
|
|
// this.worker.postMessage({ type: 1, params })
|
|
|
|
|
|
// this.worker.onMessage(function(res){
|
|
|
|
|
|
// console.log(res)
|
|
|
|
|
|
// })
|
|
|
getMessageList({ productType: 'ZTB_FACTORY', status: 0 }).then(result => { |
|
|
getMessageList({ productType: 'ZTB_FACTORY', status: 0 }).then(result => { |
|
|
if(result.data && result.data.records && result.data.records.length){ |
|
|
if(result.data && result.data.records && result.data.records.length){ |
|
|
let pages = getCurrentPages() //当前页面栈
|
|
|
let pages = getCurrentPages() //当前页面栈
|
|
|
|