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.
16 lines
624 B
16 lines
624 B
// worker的优化计算,暂时没用到;
|
|
worker.onMessage(function (res) {
|
|
console.log('这是worker内部线程打印的')
|
|
console.log(res)
|
|
worker.request({
|
|
header: { 'X-APP-ID': res.params.xAppId, 'X-FACTORY-ID': res.params.xFactoryId, 'Authorization': 'QNT ' + res.params.authorization },
|
|
url: res.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] })
|
|
}
|
|
}
|
|
})
|
|
})
|