- Replace all static mock data with real backend API calls for templates, generation tasks, credit balance and recharge - Remove deprecated mock data files including templates.js, versionOptions.js, records.js and packages.js - Add useCurrentCredit composable for fetching and managing user credit balance - Update all components to align with new backend data shapes (e.g. templateItemId instead of id) - Add loading and disabled states for interactive UI elements - Implement full WeChat mini-program payment flow for credit recharge - Fix template and record card UI styling and media handling - Set developVersion flag to true for testing environment
33 lines
620 B
Vue
33 lines
620 B
Vue
<template>
|
|
<view class="version-option-list">
|
|
<VersionOptionCard
|
|
v-for="option in options"
|
|
:key="option.templateItemId"
|
|
:option="option"
|
|
:selected="option.templateItemId === selectedValue"
|
|
@select="emit('select', $event)"
|
|
/>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import VersionOptionCard from "../VersionOptionCard/index.vue";
|
|
|
|
defineProps({
|
|
options: {
|
|
type: Array,
|
|
default: () => [],
|
|
},
|
|
selectedValue: {
|
|
type: String,
|
|
default: "",
|
|
},
|
|
});
|
|
|
|
const emit = defineEmits(["select"]);
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@import "./styles/index.scss";
|
|
</style>
|