21 lines
606 B
JavaScript
21 lines
606 B
JavaScript
/**
|
|
* @description 腾讯云-即时通讯-sdkID
|
|
*/
|
|
// import { ipcMain } from 'electron'
|
|
// const TimMain = require('im_electron_sdk/dist/main')
|
|
import TimMain from 'im_electron_sdk/dist/main'
|
|
// import {TIMErrCode} from 'im_electron_sdk/dist/enumbers'
|
|
const sdkappidDef = 1600034736 // 可以去腾讯云即时通信IM控制台申请
|
|
|
|
// 初始化
|
|
function init(sdkappid = sdkappidDef) {
|
|
return new TimMain({sdkappid})
|
|
}
|
|
export function initialize(){
|
|
// ipcMain.handle('im-chat:init', (event, sdkappid) => {
|
|
// return init(sdkappid)
|
|
// })
|
|
return init()
|
|
}
|
|
export default { initialize, init }
|