no message

This commit is contained in:
wangdongbo 2026-01-30 16:41:12 +08:00
parent e26785bf4b
commit 18675de48b
9 changed files with 32 additions and 48 deletions

View File

@ -50,7 +50,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx93af55767423938e", "appid" : "wx1d8337a40c11d66c",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },

View File

@ -5,12 +5,12 @@
<view class="mt-12 text-base text-dark">生命全周期健康管理伙伴</view> <view class="mt-12 text-base text-dark">生命全周期健康管理伙伴</view>
</view> </view>
<view class="login-btn-wrap"> <view class="login-btn-wrap">
<!-- <button v-if="checked" class="login-btn" type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"> <button v-if="checked" class="login-btn" type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
手机号快捷登录
</button> -->
<button v-if="checked" class="login-btn" type="primary" @click="getPhoneNumber()">
手机号快捷登录 手机号快捷登录
</button> </button>
<!-- <button v-if="checked" class="login-btn" type="primary" @click="getPhoneNumber()">
手机号快捷登录
</button> -->
<button v-else class="login-btn" type="primary" @click="remind()"> <button v-else class="login-btn" type="primary" @click="remind()">
手机号快捷登录 手机号快捷登录
</button> </button>

View File

@ -326,9 +326,9 @@ const sendArticle = async (article) => {
if (result.success) { if (result.success) {
// //
try { try {
await api("addCustomerArticleSendRecord", { await api("addArticleSendRecord", {
articleId: article._id, articleId: article._id,
doctorId: doctorInfo.userid, userId: doctorInfo.userid,
customerId: pageParams.value.patientId, customerId: pageParams.value.patientId,
corpId: corpId, corpId: corpId,
}); });

View File

@ -436,10 +436,8 @@ $primary-color: #0877F1;
height: 80rpx; height: 80rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
padding: 0 46rpx; padding: 0 46rpx;
}
.voice-input-btn {
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;
} }
@ -1003,7 +1001,15 @@ $primary-color: #0877F1;
.text-input::-moz-placeholder, .text-input::-moz-placeholder,
.text-input:-ms-input-placeholder, .text-input:-ms-input-placeholder,
.text-input::placeholder { .text-input::placeholder {
line-height: 96rpx; line-height: normal;
}
.voice-input-btn::-webkit-input-placeholder,
.voice-input-btn:-moz-placeholder,
.voice-input-btn::-moz-placeholder,
.voice-input-btn:-ms-input-placeholder,
.voice-input-btn::placeholder {
line-height: 80rpx;
} }
/* 时间分割线 */ /* 时间分割线 */

View File

@ -343,12 +343,6 @@ const fetchGroupOrderStatus = async () => {
} }
}; };
//
function checkConsultPendingStatus() {
//
fetchGroupOrderStatus();
}
// //
function getBubbleClass(message) { function getBubbleClass(message) {
// //
@ -462,11 +456,6 @@ const initTIMCallbacks = async () => {
}) })
.then(() => { .then(() => {
console.log("✓ 收到新消息后已标记为已读"); console.log("✓ 收到新消息后已标记为已读");
// 0
timChatManager.triggerCallback("onConversationListUpdated", {
conversationID: chatInfo.value.conversationID,
unreadCount: 0,
});
}) })
.catch((error) => { .catch((error) => {
console.error("✗ 标记已读失败:", error); console.error("✗ 标记已读失败:", error);
@ -526,9 +515,6 @@ const initTIMCallbacks = async () => {
isCompleted.value = data.isCompleted || false; isCompleted.value = data.isCompleted || false;
isLoadingMore.value = false; isLoadingMore.value = false;
//
checkConsultPendingStatus();
nextTick(() => { nextTick(() => {
if (data.isRefresh) { if (data.isRefresh) {
console.log("后台刷新完成,保持当前滚动位置"); console.log("后台刷新完成,保持当前滚动位置");
@ -623,11 +609,6 @@ const loadMessageList = async () => {
}) })
.then(() => { .then(() => {
console.log("✓ 会话已标记为已读:", chatInfo.value.conversationID); console.log("✓ 会话已标记为已读:", chatInfo.value.conversationID);
//
timChatManager.triggerCallback("onConversationListUpdated", {
conversationID: chatInfo.value.conversationID,
unreadCount: 0,
});
}) })
.catch((error) => { .catch((error) => {
console.error("✗ 标记会话已读失败:", error); console.error("✗ 标记会话已读失败:", error);
@ -784,6 +765,9 @@ onShow(() => {
// //
onHide(() => { onHide(() => {
stopIMMonitoring(); stopIMMonitoring();
// ID
timChatManager.currentConversationID = null;
console.log("✓ 页面隐藏已清空当前会话ID");
}); });
const sendCommonPhrase = (content) => { const sendCommonPhrase = (content) => {

View File

@ -84,7 +84,7 @@
</template> </template>
<script setup> <script setup>
import { ref, watch, computed } from "vue"; import { ref, computed } from "vue";
import { onLoad, onShow, onHide } from "@dcloudio/uni-app"; import { onLoad, onShow, onHide } from "@dcloudio/uni-app";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import useAccountStore from "@/store/account.js"; import useAccountStore from "@/store/account.js";
@ -108,15 +108,6 @@ const { withInfo } = useInfoCheck();
// //
const currentTeamId = ref(""); // "" const currentTeamId = ref(""); // ""
// IM
watch(isIMInitialized, (newValue) => {
console.log("IM初始化状态变化:", newValue);
if (newValue) {
// IM
loadConversationList();
}
});
// //
const conversationList = ref([]); const conversationList = ref([]);
const loading = ref(false); const loading = ref(false);
@ -522,7 +513,10 @@ onShow(async () => {
return; return;
} }
// //
await loadConversationList();
//
setupConversationListener(); setupConversationListener();
} catch (error) { } catch (error) {
console.error("页面初始化失败:", error); console.error("页面初始化失败:", error);

View File

@ -19,7 +19,7 @@ export default defineStore("accountStore", () => {
// 从缓存中恢复数据 // 从缓存中恢复数据
const account = ref(cache.get(CACHE_KEYS.ACCOUNT, null)); const account = ref(cache.get(CACHE_KEYS.ACCOUNT, null));
const loading = ref(false);
const loginPromise = ref(null); const loginPromise = ref(null);
// IM 相关 // IM 相关
const openid = ref(cache.get(CACHE_KEYS.OPENID, "")); const openid = ref(cache.get(CACHE_KEYS.OPENID, ""));

View File

@ -47,7 +47,7 @@ const urlsConfig = {
getArticleCateList: 'getArticleCateList', getArticleCateList: 'getArticleCateList',
getArticleList: 'getArticleList', getArticleList: 'getArticleList',
getArticle: 'getArticle', getArticle: 'getArticle',
addCustomerArticleSendRecord: 'addCustomerArticleSendRecord' addArticleSendRecord: 'addArticleSendRecord'
}, },
survery: { survery: {
@ -139,7 +139,7 @@ const urls = Object.keys(urlsConfig).reduce((acc, path) => {
}, {}) }, {})
console.log('urls: ', urls) console.log('urls: ', urls)
export default async function api(urlId, data) { export default async function api(urlId, data, loading) {
const config = urls[urlId]; const config = urls[urlId];
if (!config) { if (!config) {
throw new Error(`Unknown URL ID: ${urlId}`); throw new Error(`Unknown URL ID: ${urlId}`);
@ -150,7 +150,7 @@ export default async function api(urlId, data) {
data: { data: {
...data, ...data,
type, type,
} },
}) }, loading)
} }

View File

@ -42,7 +42,7 @@ export async function mergeConversationWithGroupDetails(conversationList, option
groupIds, groupIds,
...options // 支持传入额外的查询参数corpId, teamId, keyword等 ...options // 支持传入额外的查询参数corpId, teamId, keyword等
} }
const response = await api('getGroupList', requestData) const response = await api('getGroupList', requestData, false)
// 4. 检查响应 // 4. 检查响应
if (!response || !response.success) { if (!response || !response.success) {
console.error('获取群组详细信息失败:', response?.message || '未知错误') console.error('获取群组详细信息失败:', response?.message || '未知错误')