|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-05-18 14:54:47
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-06-09 11:50:54
|
|
|
|
|
* @LastEditTime: 2022-06-09 12:23:24
|
|
|
|
|
* @Description: file content
|
|
|
|
|
*/
|
|
|
|
|
import '@/utils/poto-req';
|
|
|
|
@ -85,7 +85,13 @@ class MsbIm {
|
|
|
|
|
console.log('[im] close');
|
|
|
|
|
this.interceptors.onClose && this.interceptors.onClose();
|
|
|
|
|
};
|
|
|
|
|
if (uni) {
|
|
|
|
|
let isUni = false;
|
|
|
|
|
try {
|
|
|
|
|
isUni = uni;
|
|
|
|
|
} catch (e) {
|
|
|
|
|
isUni = false;
|
|
|
|
|
}
|
|
|
|
|
if (isUni) {
|
|
|
|
|
this.socket = uni.connectSocket({
|
|
|
|
|
...this.option,
|
|
|
|
|
fail(e) {
|
|
|
|
@ -138,7 +144,14 @@ class MsbIm {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const par = fromatPotoReq(data.traceId, data.traceType, data.content);
|
|
|
|
|
if (uni) {
|
|
|
|
|
|
|
|
|
|
let isUni = false;
|
|
|
|
|
try {
|
|
|
|
|
isUni = uni;
|
|
|
|
|
} catch (e) {
|
|
|
|
|
isUni = false;
|
|
|
|
|
}
|
|
|
|
|
if (isUni) {
|
|
|
|
|
this.socket.send({
|
|
|
|
|
data: par,
|
|
|
|
|
fail(e) {
|
|
|
|
|