fix: recommend list
This commit is contained in:
@@ -403,10 +403,33 @@ onLoad((options) => {
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
const recommendData = uni.getStorageSync("RECOMMEND_CARD_DATA");
|
||||
if (recommendData) {
|
||||
uni.removeStorageSync("RECOMMEND_CARD_DATA");
|
||||
if (recommendData.imageUrl) {
|
||||
const tpl = {
|
||||
id: recommendData.recommendId,
|
||||
imageUrl: recommendData.imageUrl,
|
||||
name: "推荐模板", // 暂时使用通用名称,如果需要可以从接口获取更多信息
|
||||
};
|
||||
|
||||
// 切换到模板 Tab
|
||||
activeTool.value = "template";
|
||||
|
||||
// 应用模板
|
||||
currentTemplate.value = tpl;
|
||||
|
||||
// 如果模板列表中存在,更新引用
|
||||
const found = templates.value.find((t) => t.id === tpl.id);
|
||||
if (found) currentTemplate.value = found;
|
||||
}
|
||||
}
|
||||
|
||||
const tempBlessing = uni.getStorageSync("TEMP_BLESSING_TEXT");
|
||||
if (tempBlessing) {
|
||||
blessingText.value = { content: tempBlessing, id: "" };
|
||||
uni.removeStorageSync("TEMP_BLESSING_TEXT");
|
||||
activeTool.value = "text";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user