Merge branch 'aigc' of https://git.nianxx.cn/zoujing/YGChatCS into home3.0

# Conflicts:
#	src/pages-aigc/recharge/components/CustomAmountCard/index.vue
#	src/pages-aigc/recharge/components/RechargeFooter/index.vue
#	src/pages-aigc/recharge/components/RechargePackageList/index.vue
#	src/pages-aigc/recharge/recharge.vue
#	src/pages-aigc/useTemplate/useTemplate.vue
This commit is contained in:
2026-07-22 16:48:21 +08:00
13 changed files with 988 additions and 27 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

View File

@@ -1,12 +1,6 @@
<template>
<uni-popup
ref="popupRef"
type="bottom"
background-color="transparent"
mask-background-color="rgba(0, 0, 0, 0)"
:safe-area="false"
:is-mask-click="false"
>
<uni-popup ref="popupRef" type="bottom" background-color="transparent" mask-background-color="rgba(0, 0, 0, 0)"
:safe-area="false" :is-mask-click="false">
<view class="photo-confirm-drawer">
<view class="photo-confirm-close" @tap="emit('close')">
<uni-icons type="closeempty" size="30" color="#8fa2ba" />
@@ -33,12 +27,11 @@
<script setup>
import { nextTick, onMounted, ref } from "vue";
import defaultAvatar from "../../assets/xiaoqi-avatar.png";
defineProps({
avatarSrc: {
type: String,
default: defaultAvatar,
default: '',
},
});

View File

@@ -1,13 +1,14 @@
<template>
<view class="aigc-use-template-page">
<AigcTopBar :points="pointBalance" @back="handleBack" @history="handleHistory" />
<AigcTopBar :points="pointBalance" recharge-label="充值" @back="handleBack" @history="handleHistory"
@recharge="handleRecharge" />
<view class="aigc-use-template-body">
<view class="aigc-use-template-content">
<TemplateVersionHero :template="currentTemplate" />
<GenerateConfirmPanel v-if="currentStep === 'generateConfirm'" :cost="currentCost"
:balance="pointBalance" @generate="handleGenerate" />
<GenerateConfirmPanel v-if="currentStep === 'generateConfirm'" :cost="currentCost" :balance="pointBalance"
@generate="handleGenerate" @recharge="handleRecharge" />
<template v-else>
<VersionOptionList :options="templateItems" :selected-value="selectedTemplateItemId"
@@ -29,11 +30,11 @@
@album="handlePickAlbum" />
</view>
<view v-if="currentStep === 'photoConfirm'" class="aigc-use-template-popup-host">
<PhotoConfirmDrawer :avatar-src="selectedImageLocalPath || guideAvatar" @close="handleClosePhotoConfirm"
<PhotoConfirmDrawer :avatar-src="selectedImageLocalPath" @close="handleClosePhotoConfirm"
@confirm="handleConfirmPhoto" />
</view>
<PointInsufficientDialog v-if="pointDialogVisible" :cost="currentCost" :balance="pointBalance"
@cancel="handleClosePointDialog" />
@cancel="handleClosePointDialog" @recharge="handlePointRecharge" />
<Privacy :visible="privacyVisible" :contract-name="privacyContractName" @agree="handlePrivacyAgree"
@disagree="handlePrivacyDisagree" />
</view>
@@ -51,7 +52,6 @@ import {
getAigcTemplateList,
} from "@/request/api/AigcApi.js";
import { updateImageFile } from "@/request/api/UpdateFile.js";
import guideAvatar from "./assets/xiaoqi-avatar.png";
import GenerateConfirmPanel from "./components/GenerateConfirmPanel/index.vue";
import PhotoConfirmDrawer from "./components/PhotoConfirmDrawer/index.vue";
import PhotoGuidePanel from "./components/PhotoGuidePanel/index.vue";
@@ -164,6 +164,13 @@ const handleHistory = () => {
});
};
const handleRecharge = () => {
uni.navigateTo({
url: "/pages-aigc/recharge/recharge",
fail: () => showPlaceholderToast("积分充值"),
});
};
const handleSelectTemplateItem = (option) => {
if (!option?.templateItemId) return;
@@ -377,6 +384,10 @@ const handleClosePointDialog = () => {
pointDialogVisible.value = false;
};
const handlePointRecharge = () => {
pointDialogVisible.value = false;
handleRecharge();
};
</script>
<style scoped lang="scss">