fix: gretting page
This commit is contained in:
@@ -433,7 +433,7 @@ const cardId = ref("");
|
||||
|
||||
// 标题相关
|
||||
const titles = ref([]);
|
||||
const currentTitle = ref(null);
|
||||
const currentTitle = ref(titles.value[0]);
|
||||
const titlePage = ref(1);
|
||||
const loadingTitles = ref(false);
|
||||
const hasMoreTitles = ref(true);
|
||||
@@ -908,6 +908,7 @@ const selectTitle = (title) => {
|
||||
currentTitle.value = null;
|
||||
} else {
|
||||
currentTitle.value = title;
|
||||
|
||||
// 切换标题时重置位置和缩放
|
||||
titleState.value = {
|
||||
offsetX: 0,
|
||||
@@ -982,6 +983,7 @@ const shareOrSave = async (id) => {
|
||||
blessingTo: targetName.value,
|
||||
blessingFrom: signatureName.value,
|
||||
templateId: currentTemplate.value?.id || "",
|
||||
titleId: currentTitle?.value?.id || "",
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
<view class="action-btn" @tap.stop="onShare(item)">
|
||||
<text class="action-emoji">🔗</text>
|
||||
</view>
|
||||
<view class="action-btn" @tap.stop="onMore(item)">
|
||||
<!-- <view class="action-btn" @tap.stop="onMore(item)">
|
||||
<text class="action-emoji">⋯</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -158,19 +158,28 @@ const formatDate = (dateStr) => {
|
||||
};
|
||||
|
||||
const getTagText = (item) => {
|
||||
if (item.status === "draft") return "草稿";
|
||||
return item.festival || "金榜";
|
||||
// if (item.status === "draft") return "草稿";
|
||||
return item?.title?.name || item.festival || "新春快乐";
|
||||
};
|
||||
|
||||
const getTitle = (item) => {
|
||||
// if (item.status === "draft") return "草稿";
|
||||
return item.blessingTo + (item?.content?.content || "新春快乐");
|
||||
};
|
||||
|
||||
const getTagClass = (item) => {
|
||||
if (item.status === "draft") return "tag-draft";
|
||||
const tagMap = {
|
||||
春节: "tag-spring",
|
||||
金榜: "tag-gold",
|
||||
马到: "tag-horse",
|
||||
水墨: "tag-ink",
|
||||
万事如意: "tag-spring",
|
||||
新春快乐: "tag-gold",
|
||||
新春大吉: "tag-horse",
|
||||
钱包鼓鼓: "tag-ink",
|
||||
福气旺旺: "tag-spring",
|
||||
龙马精神: "tag-horse",
|
||||
马年纳祥: "tag-horse",
|
||||
福马迎春: "tag-horse",
|
||||
};
|
||||
return tagMap[item.festival] || "tag-gold";
|
||||
return tagMap[item?.title?.name || item.festival] || "tag-gold";
|
||||
};
|
||||
|
||||
const onDetail = (item) => {
|
||||
|
||||
Reference in New Issue
Block a user