This commit is contained in:
xiaoaojiao
2025-09-15 11:58:34 +08:00
3 changed files with 135 additions and 50 deletions

View File

@@ -128,6 +128,10 @@ const displayScanImg = ref(false);
const disableScanAnimation = ref(false); const disableScanAnimation = ref(false);
const generateImage = async (options) => { const generateImage = async (options) => {
console.log(uploadedFiles); console.log(uploadedFiles);
if (uploadedFiles.length === 0) {
weui.alert("请上传头像照片!")
return false;
}
globalStore.generateStatus = true; globalStore.generateStatus = true;
displayScanImg.value = true; displayScanImg.value = true;
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
@@ -378,14 +382,16 @@ const showPhotoSquare = () => {
isPhotoSquareVisible.value = true; isPhotoSquareVisible.value = true;
}; };
import imgLoading from '../assets/images/generate-img-loading-bg.webp'
import generateImg from '../assets/images/generate-img-bg.webp'
</script> </script>
<template> <template>
<div :show="show"> <div :show="show">
<div class="home-wrapper" :style="{ <div class="home-wrapper" :style="{
backgroundImage: displayScanModel backgroundImage: displayScanModel
? 'url(src/assets/images/generate-img-loading-bg.webp)' ? `url(${imgLoading})`
: 'url(src/assets/images/generate-img-bg.webp)' : `url(${generateImg})`
}"> }">
<div class="scene-item item-1"> <div class="scene-item item-1">
<img src="../assets/images/back-btn.webp" @click="goBack" alt="后退"> <img src="../assets/images/back-btn.webp" @click="goBack" alt="后退">

View File

@@ -11,12 +11,6 @@ import { Storage, generateQR } from "../libs/utils"
const props = defineProps({ const props = defineProps({
show: false show: false
}) })
watch(() => props.show, async (newVal) => {
if (!newVal) {
return
}
fetchImages();
},{immediate:true})
const emit = defineEmits(['go-photo-square', 'update:show']); const emit = defineEmits(['go-photo-square', 'update:show']);
const router = useRouter(); const router = useRouter();

View File

@@ -1,216 +1,301 @@
import shenxian_bg from '../assets/images/generate/template/shenxian/shenxian_bg.webp'
import shenxian_1 from '../assets/images/generate/template/shenxian/shenxian_1.webp'
import shenxian_2 from '../assets/images/generate/template/shenxian/shenxian_2.webp'
import shenxian_3 from '../assets/images/generate/template/shenxian/shenxian_3.webp'
import shenxian_4 from '../assets/images/generate/template/shenxian/shenxian_4.webp'
import shenxian_5 from '../assets/images/generate/template/shenxian/shenxian_5.webp'
import shenxian_6 from '../assets/images/generate/template/shenxian/shenxian_6.webp'
import xianxia_bg from '../assets/images/generate/template/xianxia/xianxia_bg.webp'
import xianxia_1 from '../assets/images/generate/template/xianxia/xianxia_1.webp'
import xianxia_2 from '../assets/images/generate/template/xianxia/xianxia_2.webp'
import xianxia_3 from '../assets/images/generate/template/xianxia/xianxia_3.webp'
import xianxia_4 from '../assets/images/generate/template/xianxia/xianxia_4.webp'
import xianxia_5 from '../assets/images/generate/template/xianxia/xianxia_5.webp'
import xianxia_6 from '../assets/images/generate/template/xianxia/xianxia_6.webp'
import fugu_bg from '../assets/images/generate/template/fugu/fugu_bg.webp'
import fugu_1 from '../assets/images/generate/template/fugu/fugu_1.webp'
import fugu_2 from '../assets/images/generate/template/fugu/fugu_2.webp'
import fugu_3 from '../assets/images/generate/template/fugu/fugu_3.webp'
import fugu_4 from '../assets/images/generate/template/fugu/fugu_4.webp'
import fugu_5 from '../assets/images/generate/template/fugu/fugu_5.webp'
import fugu_6 from '../assets/images/generate/template/fugu/fugu_6.webp'
import xinzhongshi_bg from '../assets/images/generate/template/xinzhongshi/xinzhongshi_bg.webp'
import xinzhongshi_1 from '../assets/images/generate/template/xinzhongshi/xinzhongshi_1.webp'
import xinzhongshi_2 from '../assets/images/generate/template/xinzhongshi/xinzhongshi_2.webp'
import xinzhongshi_3 from '../assets/images/generate/template/xinzhongshi/xinzhongshi_3.webp'
import xinzhongshi_4 from '../assets/images/generate/template/xinzhongshi/xinzhongshi_4.webp'
import xinzhongshi_5 from '../assets/images/generate/template/xinzhongshi/xinzhongshi_5.webp'
import xinzhongshi_6 from '../assets/images/generate/template/xinzhongshi/xinzhongshi_6.webp'
import luying_bg from '../assets/images/generate/template/luying/luying_bg.webp'
import luying_1 from '../assets/images/generate/template/luying/luying_1.webp'
import luying_2 from '../assets/images/generate/template/luying/luying_2.webp'
import luying_3 from '../assets/images/generate/template/luying/luying_3.webp'
import luying_4 from '../assets/images/generate/template/luying/luying_4.webp'
import luying_5 from '../assets/images/generate/template/luying/luying_5.webp'
import luying_6 from '../assets/images/generate/template/luying/luying_6.webp'
import paidui_bg from '../assets/images/generate/template/paidui/paidui_bg.webp'
import paidui_1 from '../assets/images/generate/template/paidui/paidui_1.webp'
import paidui_2 from '../assets/images/generate/template/paidui/paidui_2.webp'
import paidui_3 from '../assets/images/generate/template/paidui/paidui_3.webp'
import paidui_4 from '../assets/images/generate/template/paidui/paidui_4.webp'
import paidui_5 from '../assets/images/generate/template/paidui/paidui_5.webp'
import paidui_6 from '../assets/images/generate/template/paidui/paidui_6.webp'
const imageBackground = [ const imageBackground = [
{ {
id: 1, id: 1,
titleImgUrl: 'src/assets/images/generate/template/shenxian/shenxian_bg.png', <<<<<<< HEAD
titleImgUrl: shenxian_bg,
children: [ children: [
{ {
id: 1, id: 1,
imgUrl: 'src/assets/images/generate/template/shenxian/shenxian_1.png', imgUrl: shenxian_1,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 2, id: 2,
imgUrl: 'src/assets/images/generate/template/shenxian/shenxian_2.png', <<<<<<< HEAD
imgUrl: shenxian_2,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 3, id: 3,
imgUrl: 'src/assets/images/generate/template/shenxian/shenxian_3.png', <<<<<<< HEAD
imgUrl: shenxian_3,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 4, id: 4,
imgUrl: 'src/assets/images/generate/template/shenxian/shenxian_4.png', <<<<<<< HEAD
imgUrl: shenxian_4,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 5, id: 5,
imgUrl: 'src/assets/images/generate/template/shenxian/shenxian_5.png', <<<<<<< HEAD
imgUrl: shenxian_5,
peopleCount: 4 peopleCount: 4
}, },
{ {
id: 6, id: 6,
imgUrl: 'src/assets/images/generate/template/shenxian/shenxian_6.png', <<<<<<< HEAD
imgUrl: shenxian_6,
peopleCount: 5 peopleCount: 5
} }
] ]
}, },
{ {
id: 2, id: 2,
titleImgUrl: 'src/assets/images/generate/template/xianxia/xianxia_bg.png', <<<<<<< HEAD
titleImgUrl: xianxia_bg,
children: [ children: [
{ {
id: 1, id: 1,
imgUrl: 'src/assets/images/generate/template/xianxia/xianxia_1.png', imgUrl: xianxia_1,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 2, id: 2,
imgUrl: 'src/assets/images/generate/template/xianxia/xianxia_2.png', <<<<<<< HEAD
imgUrl: xianxia_2,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 3, id: 3,
imgUrl: 'src/assets/images/generate/template/xianxia/xianxia_3.png', <<<<<<< HEAD
imgUrl: xianxia_3,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 4, id: 4,
imgUrl: 'src/assets/images/generate/template/xianxia/xianxia_4.png', <<<<<<< HEAD
imgUrl: xianxia_4,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 5, id: 5,
imgUrl: 'src/assets/images/generate/template/xianxia/xianxia_5.png', <<<<<<< HEAD
imgUrl: xianxia_5,
peopleCount: 4 peopleCount: 4
}, },
{ {
id: 6, id: 6,
imgUrl: 'src/assets/images/generate/template/xianxia/xianxia_6.png', <<<<<<< HEAD
imgUrl: xianxia_6,
peopleCount: 5 peopleCount: 5
} }
] ]
}, },
{ {
id: 3, id: 3,
titleImgUrl: 'src/assets/images/generate/template/fugu/fugu_bg.png', <<<<<<< HEAD
titleImgUrl: fugu_bg,
children: [ children: [
{ {
id: 1, id: 1,
imgUrl: 'src/assets/images/generate/template/fugu/fugu_1.png', imgUrl: fugu_1,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 2, id: 2,
imgUrl: 'src/assets/images/generate/template/fugu/fugu_2.png', <<<<<<< HEAD
imgUrl: fugu_2,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 3, id: 3,
imgUrl: 'src/assets/images/generate/template/fugu/fugu_3.png', <<<<<<< HEAD
imgUrl: fugu_3,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 4, id: 4,
imgUrl: 'src/assets/images/generate/template/fugu/fugu_4.png', <<<<<<< HEAD
imgUrl: fugu_4,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 5, id: 5,
imgUrl: 'src/assets/images/generate/template/fugu/fugu_5.png', <<<<<<< HEAD
imgUrl: fugu_5,
peopleCount: 4 peopleCount: 4
}, },
{ {
id: 6, id: 6,
imgUrl: 'src/assets/images/generate/template/fugu/fugu_6.png', <<<<<<< HEAD
imgUrl: fugu_6,
peopleCount: 5 peopleCount: 5
} }
] ]
}, },
{ {
id: 4, id: 4,
titleImgUrl: 'src/assets/images/generate/template/xinzhongshi/xinzhongshi_bg.png', <<<<<<< HEAD
titleImgUrl: xinzhongshi_bg,
children: [ children: [
{ {
id: 1, id: 1,
imgUrl: 'src/assets/images/generate/template/xinzhongshi/xinzhongshi_1.png', imgUrl: xinzhongshi_1,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 2, id: 2,
imgUrl: 'src/assets/images/generate/template/xinzhongshi/xinzhongshi_2.png', <<<<<<< HEAD
imgUrl: xinzhongshi_2,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 3, id: 3,
imgUrl: 'src/assets/images/generate/template/xinzhongshi/xinzhongshi_3.png', <<<<<<< HEAD
imgUrl: xinzhongshi_3,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 4, id: 4,
imgUrl: 'src/assets/images/generate/template/xinzhongshi/xinzhongshi_4.png', <<<<<<< HEAD
imgUrl: xinzhongshi_4,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 5, id: 5,
imgUrl: 'src/assets/images/generate/template/xinzhongshi/xinzhongshi_5.png', <<<<<<< HEAD
imgUrl: xinzhongshi_5,
peopleCount: 4 peopleCount: 4
}, },
{ {
id: 6, id: 6,
imgUrl: 'src/assets/images/generate/template/xinzhongshi/xinzhongshi_6.png', <<<<<<< HEAD
imgUrl: xinzhongshi_6,
peopleCount: 5 peopleCount: 5
} }
] ]
}, },
{ {
id: 5, id: 5,
titleImgUrl: 'src/assets/images/generate/template/luying/luying_bg.png', <<<<<<< HEAD
titleImgUrl: luying_bg,
children: [ children: [
{ {
id: 1, id: 1,
imgUrl: 'src/assets/images/generate/template/luying/luying_1.png', imgUrl: luying_1,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 2, id: 2,
imgUrl: 'src/assets/images/generate/template/luying/luying_2.png', <<<<<<< HEAD
imgUrl: luying_2,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 3, id: 3,
imgUrl: 'src/assets/images/generate/template/luying/luying_3.png', <<<<<<< HEAD
imgUrl: luying_3,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 4, id: 4,
imgUrl: 'src/assets/images/generate/template/luying/luying_4.png', <<<<<<< HEAD
imgUrl: luying_4,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 5, id: 5,
imgUrl: 'src/assets/images/generate/template/luying/luying_5.png', <<<<<<< HEAD
imgUrl: luying_5,
peopleCount: 4 peopleCount: 4
}, },
{ {
id: 6, id: 6,
imgUrl: 'src/assets/images/generate/template/luying/luying_6.png', <<<<<<< HEAD
imgUrl: luying_6,
peopleCount: 5 peopleCount: 5
} }
] ]
}, },
{ {
id: 6, id: 6,
titleImgUrl: 'src/assets/images/generate/template/paidui/paidui_bg.png', <<<<<<< HEAD
titleImgUrl: paidui_bg,
children: [ children: [
{ {
id: 1, id: 1,
imgUrl: 'src/assets/images/generate/template/paidui/paidui_1.png', imgUrl: paidui_1,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 2, id: 2,
imgUrl: 'src/assets/images/generate/template/paidui/paidui_2.png', <<<<<<< HEAD
imgUrl: paidui_2,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 3, id: 3,
imgUrl: 'src/assets/images/generate/template/paidui/paidui_3.png', <<<<<<< HEAD
imgUrl: paidui_3,
peopleCount: 2 peopleCount: 2
}, },
{ {
id: 4, id: 4,
imgUrl: 'src/assets/images/generate/template/paidui/paidui_4.png', <<<<<<< HEAD
imgUrl: paidui_4,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 5, id: 5,
imgUrl: 'src/assets/images/generate/template/paidui/paidui_5.png', <<<<<<< HEAD
imgUrl: paidui_5,
peopleCount: 3 peopleCount: 3
}, },
{ {
id: 6, id: 6,
imgUrl: 'src/assets/images/generate/template/paidui/paidui_6.png', <<<<<<< HEAD
imgUrl: paidui_6,
peopleCount: 5 peopleCount: 5
} }
] ]