This commit is contained in:
张成
2026-03-16 11:25:50 +08:00
parent f87859da0e
commit 98baa371ee
2 changed files with 11 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
"miniprogramRoot": "dist/", "miniprogramRoot": "dist/",
"projectname": "playBallTogether", "projectname": "playBallTogether",
"description": "playBallTogether", "description": "playBallTogether",
"appid": "wx915ecf6c01bea4ec", "appid": "wx815b533167eb7b53",
"setting": { "setting": {
"urlCheck": true, "urlCheck": true,
"es6": true, "es6": true,

View File

@@ -40,14 +40,16 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
} }
const publishFlag = from === "publish"; const publishFlag = from === "publish";
// const posterRef = useRef(); // const posterRef = useRef();
const { max_participants, participant_count } = detail || {}; const { max_participants, participant_count } = detail || {};
// useEffect(() => { // useEffect(() => {
// if (id) { // if (id) {
// changeMessageType(); // changeMessageType();
// } // }
// }, [id]); // }, [id]);
async function changeMessageType() { async function changeMessageType() {
try { try {
@@ -61,6 +63,13 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
withShareTicket: false, // 是否需要返回 shareTicket withShareTicket: false, // 是否需要返回 shareTicket
isUpdatableMessage: true, // 是否是动态消息(需要服务端配置过模版) isUpdatableMessage: true, // 是否是动态消息(需要服务端配置过模版)
activityId: res.data.activity_id, // 动态消息的活动 id activityId: res.data.activity_id, // 动态消息的活动 id
templateInfo: {
parameterList: [
{ name: 'member_count', value: (participant_count ?? 0).toString() },
{ name: 'room_limit', value: (max_participants ?? 0).toString() },
],
templateId: '666F374D69D16C932E45D7E7D9F10CEF6177F5F5'
}
}); });
} }
} catch (e) { } catch (e) {