feat: 详情介绍的处理

This commit is contained in:
zoujing committed 2026-09-22 17:14:20 +08:00
1 parent eb7bce2289
commit 59fc90a880
1 file changed
+3 -7
+3 -7
View File
@@ -11,7 +11,7 @@
import { computed, ref } from "vue"; import { computed, ref } from "vue";
import { onLoad, onPageScroll, onShareAppMessage } from "@dcloudio/uni-app"; import { onLoad, onPageScroll, onShareAppMessage } from "@dcloudio/uni-app";
import contentApi from "@/api/content"; import contentApi from "@/api/content";
import { BENEFIT_STATUS, SECTION_INTRO_TITLE } from "@/constant"; import { BENEFIT_STATUS } from "@/constant";
import { useBenefitStore } from "@/store"; import { useBenefitStore } from "@/store";
import { copyText, goDetail, makeCall, previewImages, requireLogin } from "@/utils/nav"; import { copyText, goDetail, makeCall, previewImages, requireLogin } from "@/utils/nav";
import { unique } from "@/utils"; import { unique } from "@/utils";
@@ -39,11 +39,7 @@ const images = computed(() => {
); );
}); });
const badge = computed(() => merchant.value?.type_label || ""); const badge = computed(() => merchant.value?.type_label || "");
const introTitle = computed(() => { const introTitle = computed(() => String(merchant.value?.intro_label || "").trim() || "介绍");
const type = String(merchant.value?.type_label || "").trim();
if (type) return `${type}介绍`;
return SECTION_INTRO_TITLE[merchant.value?.section_key] || "介绍";
});
const addressText = computed(() => merchant.value?.address || ""); const addressText = computed(() => merchant.value?.address || "");
const phone = computed(() => merchant.value?.contact_phone || ""); const phone = computed(() => merchant.value?.contact_phone || "");
const businessHours = computed(() => merchant.value?.business_hours || ""); const businessHours = computed(() => merchant.value?.business_hours || "");
@@ -194,7 +190,7 @@ onShareAppMessage(() => ({
</view> </view>
</view> </view>
<!-- 介绍卡(标题取 type_label + 介绍) --> <!-- 介绍卡(标题直接取接口 intro_label) -->
<view v-if="merchant.description" :class="CARD"> <view v-if="merchant.description" :class="CARD">
<view class="flex items-center gap-2 text-[16px] font-bold tracking-[-0.3px] text-ink deco-titledot"> <view class="flex items-center gap-2 text-[16px] font-bold tracking-[-0.3px] text-ink deco-titledot">
{{ introTitle }} {{ introTitle }}