feat(aigc): add template, recharge & points pages

This commit adds the full AIGC feature set including template usage flow, points recharge and transaction ledger pages, along with all supporting components, styles and data files. It also updates the home page navigation and registers all new pages in the project's pages configuration.
This commit is contained in:
duanshuwen
2026-07-05 19:34:55 +08:00
parent f47f68e19b
commit b381c712df
37 changed files with 1840 additions and 1 deletions

View File

@@ -0,0 +1,54 @@
<template>
<view :class="['custom-card', { 'is-selected': selected }]" @tap="emit('select')">
<text class="custom-title">自选金额</text>
<label class="custom-input-wrap">
<text class="custom-currency">¥</text>
<input
class="custom-input"
type="number"
:value="modelValue"
@focus="emit('select')"
@input="handleInput"
/>
</label>
<view class="custom-hint">
<text> 1 = 100 积分换算</text>
<text>当前可得 {{ currentPoints }} 积分</text>
</view>
</view>
</template>
<script setup>
import { computed } from "vue";
const props = defineProps({
modelValue: {
type: String,
default: "",
},
selected: {
type: Boolean,
default: false,
},
});
const emit = defineEmits(["update:modelValue", "select"]);
const currentPoints = computed(() => {
const amount = Number.parseInt(props.modelValue || "0", 10);
return Number.isNaN(amount) ? 0 : amount * 100;
});
const handleInput = (event) => {
const rawValue = event?.detail?.value ?? event?.target?.value ?? "";
const value = String(rawValue).replace(/\D/g, "");
emit("select");
emit("update:modelValue", value);
};
</script>
<style scoped lang="scss">
@import "./styles/index.scss";
</style>