纸通宝SAAS仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

21 lines
729 B

// worker的优化计算,暂时没用到;
worker.onMessage(function (res) {
console.log('这是worker内部线程打印的')
console.log(res)
if(res.type == 1){
fetchMessages(worker, res.params, res.data)
}
})
function fetchMessages(worker, params, data){
worker.request({
header: { 'X-APP-ID': params.xAppId, 'X-FACTORY-ID': params.xFactoryId, 'Authorization': 'QNT ' + params.authorization },
url: params.url,
data: { productType: 'ZTB_FACTORY', status: 0 },
method: 'GET',
success: function (result) {
if (result.data.code == 0 && result.data.data.records && result.data.data.records.length) {
worker.postMessage({ notice: result.data.data.records[0] })
}
}
})
}