Merge branch 'feat-im-0607-ch' into msb_test

msb_test
ch 2 years ago
commit d5adc6717a

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

Loading…
Cancel
Save