Merge remote-tracking branch 'origin/dev-wdb'
This commit is contained in:
commit
9af63de623
@ -1,4 +1,5 @@
|
|||||||
MP_API_BASE_URL=https://ykt.youcan365.com
|
MP_API_BASE_URL=https://ykt.youcan365.com
|
||||||
MP_CACHE_PREFIX=production
|
MP_CACHE_PREFIX=production
|
||||||
MP_WX_APP_ID=production
|
MP_WX_APP_ID=wx6ee11733526b4f04
|
||||||
MP_TIM_SDK_APP_ID=1600123876
|
MP_TIM_SDK_APP_ID=1600123876
|
||||||
|
MP_CORP_ID=wpLgjyawAA8N0gWmXgyJq8wpjGcOT7fg
|
||||||
@ -314,8 +314,12 @@ const closePreview = () => {
|
|||||||
const sendArticle = async (article) => {
|
const sendArticle = async (article) => {
|
||||||
try {
|
try {
|
||||||
const { globalTimChatManager } = await import("@/utils/tim-chat.js");
|
const { globalTimChatManager } = await import("@/utils/tim-chat.js");
|
||||||
|
|
||||||
if (!globalTimChatManager || !globalTimChatManager.tim || !globalTimChatManager.isLoggedIn) {
|
if (
|
||||||
|
!globalTimChatManager ||
|
||||||
|
!globalTimChatManager.tim ||
|
||||||
|
!globalTimChatManager.isLoggedIn
|
||||||
|
) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "IM系统未就绪,请重试",
|
title: "IM系统未就绪,请重试",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
@ -326,9 +330,9 @@ const sendArticle = async (article) => {
|
|||||||
// 设置当前会话ID
|
// 设置当前会话ID
|
||||||
const conversationID = `GROUP${pageParams.value.groupId}`;
|
const conversationID = `GROUP${pageParams.value.groupId}`;
|
||||||
globalTimChatManager.currentConversationID = conversationID;
|
globalTimChatManager.currentConversationID = conversationID;
|
||||||
|
|
||||||
console.log("发送文章,会话ID:", conversationID);
|
console.log("发送文章,会话ID:", conversationID);
|
||||||
|
|
||||||
// 构建自定义消息数据
|
// 构建自定义消息数据
|
||||||
const customMessageData = {
|
const customMessageData = {
|
||||||
type: "article",
|
type: "article",
|
||||||
@ -337,16 +341,18 @@ const sendArticle = async (article) => {
|
|||||||
imgUrl: article.cover || "",
|
imgUrl: article.cover || "",
|
||||||
desc: "点击查看详情",
|
desc: "点击查看详情",
|
||||||
};
|
};
|
||||||
|
|
||||||
// 发送自定义消息
|
// 发送自定义消息
|
||||||
const sendResult = await globalTimChatManager.sendCustomMessage(customMessageData);
|
const sendResult = await globalTimChatManager.sendCustomMessage(
|
||||||
|
customMessageData
|
||||||
|
);
|
||||||
if (sendResult && sendResult.success) {
|
if (sendResult && sendResult.success) {
|
||||||
console.log("✓ 文章消息已发送");
|
console.log("✓ 文章消息已发送");
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "发送成功",
|
title: "发送成功",
|
||||||
icon: "success",
|
icon: "success",
|
||||||
});
|
});
|
||||||
|
|
||||||
// 延迟返回
|
// 延迟返回
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 23 KiB |
Loading…
x
Reference in New Issue
Block a user