TencentCloud / TIMSDK

Tencent Cloud Chat features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication.
https://trtc.io/products/chat
2.54k stars 2.77k forks source link

uni-app中vue2版本编译到微信小程序,时间不更新 #1258

Open luhaixuan opened 1 year ago

luhaixuan commented 1 year ago

-------------------------完整的示例如下:-------------------------

【集成包】:TUIKit-vue2-js 【当前现象】:uni-app中vue2版本编译到微信小程序,首页的 isSDKReady 一直是fasle; 给新聊天第一次聊天,然后左上角返回,得到的列表信息时间是1970-01-01,此后发消息时候,只要不退出到首页,那么他永远停留在上一次聊天最后的时间,当我返回首页的tab页面然后再点击在线客服进来,得到的页面时间是正常的; 【机型】:微信开发者工具调试的任意机型 【之前版本有无此问题】:暂不清楚,第一次用 【有无日志或者截图】: 0.存在问题,vue2版本编译到微信小程序 sea1

  1. 首页的 isSDKReady 一直是fasle sea2 2.给新聊天第一次聊天,然后左上角返回,得到的列表信息时间是1970-01-01 sea3 3.当我返回首页的tab页面然后再点击在线客服进来,得到的页面时间是正常的 sea4
HelloWilliam commented 1 year ago
watch: {
        conversation: {
            handler(newConversation, oldConversation) {
                // console.log(newConversation,"Conversation Changed");
                // 计算时间戳
                this.setData({
                    conversationName: this.getConversationName(newConversation),
                    setConversationAvatar: this.setConversationAvatarHandler(newConversation),
                    timeago: caculateTimeago(newConversation.lastMessage.lastTime * 1000)
                });
            },
            immediate: true,
            deep: true
        }
    },

改成这样看看

luhaixuan commented 1 year ago

当会话发完最后一条消息,然后一直停留在当前这个页面,时间永远停留在当前的时间,不管过了几分钟几小时,每个人的聊天显示时间都固定在上一次聊天的最后时间

卢海旋-前端开发工程师 @.***

 

------------------ 原始邮件 ------------------ 发件人: "TencentCloud/TIMSDK" @.>; 发送时间: 2022年10月21日(星期五) 凌晨2:29 @.>; @.**@.>; 主题: Re: [TencentCloud/TIMSDK] uni-app中vue2版本编译到微信小程序,时间不更新 (Issue #1258)

watch: { conversation: { handler(newConversation, oldConversation) { // console.log(newConversation,"Conversation Changed"); // 计算时间戳 this.setData({ conversationName: this.getConversationName(newConversation), setConversationAvatar: this.setConversationAvatarHandler(newConversation), timeago: caculateTimeago(newConversation.lastMessage.lastTime * 1000) }); }, immediate: true, deep: true } },
改成这样看看

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>