feat: 增加区分预览版的模块

This commit is contained in:
2026-06-08 17:45:20 +08:00
parent fc1fd6a6d5
commit b4871d9cff
4 changed files with 58 additions and 32 deletions

View File

@@ -66,6 +66,17 @@ export const CompName = {
// 生成合成图片 // 生成合成图片
aigcPhotoGeneratorCard: "aigcPhotoGeneratorCard", aigcPhotoGeneratorCard: "aigcPhotoGeneratorCard",
videoCard: "videoCard", videoCard: "videoCard",
// 长文本卡片-拍照攻略
longTextCardSnapPreview: "longTextCardSnapPreview",
// 长文本卡片-路线指引
longTextCardRoutePreview: "longTextCardRoutePreview",
// 长文本卡片-景点故事
longTextCardScenicSpotPreview: "longTextCardScenicSpotPreview",
// 长文本卡片-初游攻略
longTextCardFullDocPreview: "longTextCardFullDocPreview",
// 长文本卡片-漂流攻略
longTextCardStrategyPreview: "longTextCardStrategyPreview",
}; };
/// 发送的指令类型 /// 发送的指令类型

View File

@@ -74,16 +74,16 @@
" "
> >
<AnswerComponent <AnswerComponent
v-if="isLongTextCard(item.componentName)" v-if="isLongTextCard(item.componentName) && !isLongTextCardPreView(item.componentName)"
:content="item.componentMsg || ''" :content="item.componentMsg || ''"
:longTextData="item.longTextData" :longTextData="item.longTextData"
:finish="item.finish" :finish="item.finish"
/> />
<!-- <LongTextGuideCardPreview <LongTextGuideCardPreview
v-if="isLongTextCard(item.componentName) && (item.componentName !== CompName.longTextCard)" v-if="isLongTextCardPreView(item.componentName)"
:componentName="item.componentName" :componentName="item.componentName"
/> --> />
<QuickBookingComponent <QuickBookingComponent
v-if=" v-if="
@@ -972,7 +972,22 @@ const isLongTextCard = (componentName) => {
componentName === CompName.longTextCardRoute || componentName === CompName.longTextCardRoute ||
componentName === CompName.longTextCardScenicSpot || componentName === CompName.longTextCardScenicSpot ||
componentName === CompName.longTextCardFullDoc || componentName === CompName.longTextCardFullDoc ||
componentName === CompName.longTextCardStrategy componentName === CompName.longTextCardStrategy ||
componentName === CompName.longTextCardSnapPreview ||
componentName === CompName.longTextCardRoutePreview ||
componentName === CompName.longTextCardScenicSpotPreview ||
componentName === CompName.longTextCardFullDocPreview ||
componentName === CompName.longTextCardStrategyPreview
);
};
const isLongTextCardPreView = (componentName) => {
return (
componentName === CompName.longTextCardSnapPreview ||
componentName === CompName.longTextCardRoutePreview ||
componentName === CompName.longTextCardScenicSpotPreview ||
componentName === CompName.longTextCardFullDocPreview ||
componentName === CompName.longTextCardStrategyPreview
); );
}; };

View File

@@ -1,9 +1,9 @@
export const DETAIL_ROUTE_BY_TYPE = { export const DETAIL_ROUTE_BY_TYPE = {
longTextCardStrategy: "/pages/ChatModule/LongTextGuideCardPreview/guide", longTextCardStrategyPreview: "/pages/ChatModule/LongTextGuideCardPreview/guide",
longTextCardScenicSpot: "/pages/ChatModule/LongTextGuideCardPreview/poi", longTextCardScenicSpotPreview: "/pages/ChatModule/LongTextGuideCardPreview/poi",
longTextCardRoute: "/pages/ChatModule/LongTextGuideCardPreview/route", longTextCardRoutePreview: "/pages/ChatModule/LongTextGuideCardPreview/route",
longTextCardSnap: "/pages/ChatModule/LongTextGuideCardPreview/photo", longTextCardSnapPreview: "/pages/ChatModule/LongTextGuideCardPreview/photo",
longTextCardFullDoc: "/pages/ChatModule/LongTextGuideCardPreview/fullDoc", longTextCardFullDocPreview: "/pages/ChatModule/LongTextGuideCardPreview/fullDoc",
}; };
export const getLongTextGuideDetailRoute = (type) => { export const getLongTextGuideDetailRoute = (type) => {

View File

@@ -30,12 +30,12 @@ import { getLongTextGuideDetailRoute } from "./detailRoutes.mjs";
const props = defineProps({ const props = defineProps({
componentName: { componentName: {
type: String, type: String,
default: 'longTextCardStrategy', default: 'longTextCardStrategyPreview',
}, },
}); });
const longTextCardStrategy = { const longTextCardStrategyPreview = {
type: 'longTextCardStrategy', type: 'longTextCardStrategyPreview',
badge: "漂流攻略", badge: "漂流攻略",
badgeTone: "amber", badgeTone: "amber",
title: "下水之前,先听小七唠两句", title: "下水之前,先听小七唠两句",
@@ -43,8 +43,8 @@ const longTextCardStrategy = {
footer: "点击查看完整攻略", footer: "点击查看完整攻略",
} }
const longTextCardScenicSpot = { const longTextCardScenicSpotPreview = {
type: 'longTextCardScenicSpot', type: 'longTextCardScenicSpotPreview',
badge: "景点故事", badge: "景点故事",
badgeTone: "green", badgeTone: "green",
title: "小七孔古桥 · 走了三百年的石拱", title: "小七孔古桥 · 走了三百年的石拱",
@@ -52,8 +52,8 @@ const longTextCardScenicSpot = {
footer: "点击查看完整介绍", footer: "点击查看完整介绍",
} }
const longTextCardRoute = { const longTextCardRoutePreview = {
type: 'longTextCardRoute', type: 'longTextCardRoutePreview',
badge: "路线指引", badge: "路线指引",
badgeTone: "violet", badgeTone: "violet",
title: "漂完卧龙潭,顺道去鸳鸯湖", title: "漂完卧龙潭,顺道去鸳鸯湖",
@@ -61,8 +61,8 @@ const longTextCardRoute = {
footer: "点击查看完整路线", footer: "点击查看完整路线",
} }
const longTextCardSnap = { const longTextCardSnapPreview = {
type: 'longTextCardSnap', type: 'longTextCardSnapPreview',
badge: "拍照攻略", badge: "拍照攻略",
badgeTone: "blue", badgeTone: "blue",
title: "鸳鸯湖玻璃船,这样拍才不亏", title: "鸳鸯湖玻璃船,这样拍才不亏",
@@ -70,8 +70,8 @@ const longTextCardSnap = {
footer: "点击查看完整攻略", footer: "点击查看完整攻略",
} }
const longTextCardFullDoc = { const longTextCardFullDocPreview = {
type: 'longTextCardFullDoc', type: 'longTextCardFullDocPreview',
badge: "初游攻略", badge: "初游攻略",
badgeTone: "amber", badgeTone: "amber",
title: "第一次来小七孔,照着这条线走就对了", title: "第一次来小七孔,照着这条线走就对了",
@@ -82,18 +82,18 @@ const longTextCardFullDoc = {
const item = computed(() => { const item = computed(() => {
switch (props.componentName) { switch (props.componentName) {
case 'longTextCardStrategy': case 'longTextCardStrategyPreview':
return longTextCardStrategy; return longTextCardStrategyPreview;
case 'longTextCardSnap': case 'longTextCardSnapPreview':
return longTextCardSnap; return longTextCardSnapPreview;
case 'longTextCardRoute': case 'longTextCardRoutePreview':
return longTextCardRoute; return longTextCardRoutePreview;
case 'longTextCardScenicSpot': case 'longTextCardScenicSpotPreview':
return longTextCardScenicSpot; return longTextCardScenicSpotPreview;
case 'longTextCardFullDoc': case 'longTextCardFullDocPreview':
return longTextCardFullDoc; return longTextCardFullDocPreview;
default: default:
return longTextCardStrategy; return longTextCardStrategyPreview;
} }
}); });