首页和地图

This commit is contained in:
2021-03-30 15:21:50 +08:00
parent a1e0b507a7
commit 2ce56b31fa
25 changed files with 276 additions and 117 deletions

11
utils/im.js Normal file
View File

@@ -0,0 +1,11 @@
import TIM from '../miniprogram_npm/tim-wx-sdk/index.js';
let options = {
SDKAppID: 0 // 接入时需要将0替换为您的即时通信 IM 应用的 SDKAppID
};
// 创建 SDK 实例,`TIM.create()`方法对于同一个 `SDKAppID` 只会返回同一份实例
let tim = TIM.create(options); // SDK 实例通常用 tim 表示
// 设置 SDK 日志输出级别,详细分级请参见 <a href="https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#setLogLevel">setLogLevel 接口的说明</a>
tim.setLogLevel(0); // 普通级别,日志量较多,接入时建议使用
// tim.setLogLevel(1); // release 级别SDK 输出关键信息,生产环境时建议使用
// 注册腾讯云即时通信 IM 上传插件
export default tim;