feat: add aigc record, video preview & custom recharge

- create useAigcRecordStore to centralize current AIGC generation record state
- add video media type support to ResultPreview component
- update RecordCard to only display view button for completed tasks
- implement custom recharge amount with input validation and 9999 max limit
- refactor detail page to load record from Pinia store instead of mock data
- clean up TemplateCarousel markup and remove unused badge styles
- fix minor formatting and code style issues
This commit is contained in:
duanshuwen
2026-07-13 21:25:17 +08:00
parent b5952961fe
commit 10638e0806
10 changed files with 184 additions and 112 deletions

View File

@@ -5,38 +5,20 @@
<text class="template-heading-title">选择模板</text>
<text class="template-heading-subtitle">左右滑动预览效果</text>
</view>
<text class="template-heading-badge">同源双版本</text>
</view>
<scroll-view
class="template-rail"
scroll-x
show-scrollbar="false"
scroll-with-animation
:scroll-left="railScrollLeft"
@scroll="handleScroll"
@touchstart="handleTouchStart"
@touchend="handleTouchEnd"
@touchcancel="handleTouchEnd"
>
<scroll-view class="template-rail" scroll-x show-scrollbar="false" scroll-with-animation
:scroll-left="railScrollLeft" @scroll="handleScroll" @touchstart="handleTouchStart" @touchend="handleTouchEnd"
@touchcancel="handleTouchEnd">
<view class="template-track">
<TemplateCard
v-for="(template, index) in templates"
:key="template.templateId || index"
:template="template"
:active="index === modelValue"
@select="handleSelect(template, index)"
/>
<TemplateCard v-for="(template, index) in templates" :key="template.templateId || index" :template="template"
:active="index === modelValue" @select="handleSelect(template, index)" />
</view>
</scroll-view>
<view class="template-dots">
<view
v-for="(template, index) in templates"
:key="`${template.templateId || index}-dot`"
class="template-dot"
:class="{ 'is-active': index === modelValue }"
/>
<view v-for="(template, index) in templates" :key="`${template.templateId || index}-dot`" class="template-dot"
:class="{ 'is-active': index === modelValue }" />
</view>
</view>
</template>