UNPKG

fcc-core

Version:

Fusion communication center.

21 lines (20 loc) 675 B
export default async function (xw) { await new Promise((resolve, reject) => { let url = `${xw.icpBaseUrl}exe/implant-matrix?USER_CODE=${xw.userInfo.USER_CODE}&LANGUAGE='ZH_CN'` xw.exe.emit('EnterMatrix', { url }) let timer = setTimeout(() => { reject(new xw.BaseException(564)) clearTimeout(timer) }, xw.timeout) xw.exe.once('OnEnterMatrix', async data => { if (data.resultCode === 0) { console.log('OnEnterMatrix', 'enter success') clearTimeout(timer) resolve() } else { console.log('openMonitor', 'fail', data) reject(new xw.BaseException(563)) } }) }) }