This commit is contained in:
haomingming
2023-05-09 15:04:05 +08:00
parent 7b9b80be8d
commit 807698b89f
53 changed files with 896 additions and 222 deletions
+13 -1
View File
@@ -118,6 +118,8 @@ Page({
if(wx.$TUIKit){
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady, this);
}else{
app.imInit().then(res => {
// console.log("wenzhen onload imInit");
@@ -152,6 +154,7 @@ Page({
dot_4: false,
})
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
},
onUnload(){
// console.log("onUnload from wenzhen")
@@ -161,6 +164,9 @@ Page({
now_message_inquiry_type: 5,
})
},
onSDKReady(){
console.log("onSDKReady from wenzhen")
},
getConversationList(){
// console.log("getConversationListgetConversationListgetConversationList");
app.imInit().then(res => {
@@ -294,6 +300,9 @@ Page({
if(!cloudCustomData) return;
let cloudCustomDataJson;
try {
if(!cloudCustomData){
return
}
cloudCustomDataJson = JSON.parse(cloudCustomData);
} catch (error) {
// console.log(error);
@@ -316,6 +325,9 @@ Page({
if(!cloudCustomData) return;
let cloudCustomDataJson;
try {
if(!item.lastMessage.cloudCustomData){
return
}
cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
} catch (error) {
return;
@@ -394,7 +406,7 @@ Page({
if(lastMessage.messageForShow == "[自定义消息]"){
let text = "自定义消息";
let payload = lastMessage.payload;
if(payload) {
if(payload && payload.data) {
// console.log("payload: ",payload.data);
let payloadJson = JSON.parse(payload.data);
text = payloadJson.title.replaceAll(/—/g, "");
+2 -1
View File
@@ -13,7 +13,8 @@
"van-tabs": "@vant/weapp/tabs/index",
"t-dialog": "tdesign-miniprogram/dialog/dialog",
"van-divider": "@vant/weapp/divider/index",
"van-loading": "@vant/weapp/loading/index"
"van-loading": "@vant/weapp/loading/index",
"van-dialog": "@vant/weapp/dialog/index"
},
"enablePullDownRefresh": true,
"onReachBottomDistance": 100