getConnectId 方法

作用:

获取本机移动端的连接 ID。

原型:

interface CoolinkRetConnectId {
  code: number;
  msg?: string;
  connectId: string;
}

function getConnectId(): Promise<CoolinkRetConnectId>;

参数:无

返回值:

属性类型说明解释
codenumber错误码表示是否发生错误的一个数字,没有错误则为 0
msgstring错误信息文本表示是否发生错误的一个字符串描述,可选
connectIdstringconnectIdconnectId

范例:

import { coolink, Util } from 'coolink';

let ret = await coolink.protocol.getConnectId();
Util.log('连接ID为 : ' + ret.connectId);

//
Last Updated:
Contributors: liangquanqing, wangyong-debug
©深圳市酷开网络科技股份有限公司 ICP备案号粤ICP备06098778号