feat(aigc): add travel postcard AIGC feature
Add complete travel postcard AIGC creation workflow including: - New AIGC pages: template selection home, result detail, and history records - Reusable UI components: template card, flow steps, result preview, action buttons, record lists - Static assets including template images, fonts and styles - Updated TopNavBar component to support menu button alignment - Register new AIGC page routes in pages.json - Add mock data for templates, user records and result details
This commit is contained in:
25
src/pages-aigc/detail/components/ResultPreview/index.vue
Normal file
25
src/pages-aigc/detail/components/ResultPreview/index.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<view class="result-preview" :style="{ '--result-accent': result.accent }">
|
||||
<image class="result-preview-image" :src="result.cover" mode="aspectFill" />
|
||||
<view class="result-preview-shade" />
|
||||
|
||||
<view class="result-preview-caption">
|
||||
<text class="result-preview-badge">{{ result.variantLabel }}</text>
|
||||
<text class="result-preview-title">{{ result.title }}</text>
|
||||
<text class="result-preview-desc">{{ result.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({
|
||||
result: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
@@ -0,0 +1,79 @@
|
||||
.result-preview {
|
||||
position: relative;
|
||||
height: 360px;
|
||||
overflow: hidden;
|
||||
border-radius: 26px;
|
||||
background: var(--result-accent, #0a4d46);
|
||||
color: #ffffff;
|
||||
box-shadow: 0 18px 34px rgba(17, 35, 49, 0.12);
|
||||
}
|
||||
|
||||
.result-preview-image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.result-preview-shade {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(0, 0, 0, 0.02) 0%,
|
||||
rgba(0, 0, 0, 0.16) 48%,
|
||||
rgba(0, 0, 0, 0.74) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.result-preview-caption {
|
||||
position: absolute;
|
||||
right: 18px;
|
||||
bottom: 18px;
|
||||
left: 18px;
|
||||
}
|
||||
|
||||
.result-preview-badge {
|
||||
height: 20px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0 8px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: #ffffff;
|
||||
font-size: 9px;
|
||||
line-height: 20px;
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.7px;
|
||||
}
|
||||
|
||||
.result-preview-title,
|
||||
.result-preview-desc {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.result-preview-title {
|
||||
margin-top: 12px;
|
||||
color: #ffffff;
|
||||
font-size: 23px;
|
||||
line-height: 30px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.result-preview-desc {
|
||||
margin-top: 6px;
|
||||
color: rgba(255, 255, 255, 0.78);
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
font-weight: 800;
|
||||
}
|
||||
Reference in New Issue
Block a user