UNPKG

press-next

Version:

Vue3 组件库,支持 Composition API

19 lines (16 loc) 492 B
import type { TimType } from '../types'; export function getMpWxTIM(): Promise<TimType> { return new Promise((resolve, reject) => { // 硬编码,业务必须通过相应插件,将 tim-wx-sdk/tim-wx.js // 拷贝到下面的位置! // @ts-ignore require.async('../views/tim-wx/tim-wx.js') .then((res: TimType) => { resolve(res); }) .catch((err: any) => { console.warn('[getMpWxTIM] err', err); reject(err); }); }); }