forked from natuka/web.puabadge.com
修改:后视图生成
This commit is contained in:
1 parent
43471c3a76
commit
9ede62f450
16 files changed
+921
-74
No files matched your search
+36
-67
@@ -88,53 +88,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-line" v-if="shouldShowPhotoExample">
|
||||
<div class="step-line-item">
|
||||
<div class="step-line-item-title">
|
||||
<span style="display: flex; align-items: center;justify-content: center;">
|
||||
<span :style="`height: 1px; background: ${config.styles.colors.border};width: 50px;`"></span>
|
||||
<span :style="`margin: 0 8px; color: ${config.styles.colors.textTertiary};`">{{ toValueWithout("照片示例") }}</span>
|
||||
<span :style="`height: 1px; background: ${config.styles.colors.border};width: 50px;`"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="step-line-item-desc">
|
||||
<div class="step-line-item-desc-item">
|
||||
<img :src="example1" :style="`width: 20vw;height: 20vw;border-radius: 8px;`" alt="">
|
||||
</div>
|
||||
<div class="step-line-item-desc-item">
|
||||
<img :src="example2" :style="`width: 20vw;height: 20vw;border-radius: 8px;`" alt="">
|
||||
</div>
|
||||
<div class="step-line-item-desc-item">
|
||||
<img :src="example3" :style="`width: 20vw;height: 20vw;border-radius: 8px;`" alt="">
|
||||
</div>
|
||||
<div class="step-line-item-desc-item">
|
||||
<img :src="example4" :style="`width: 20vw;height: 20vw;border-radius: 8px;`" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo-upload-body">
|
||||
<div v-if="!picture" class="photo-upload-box">
|
||||
<div class="photo-upload-area">
|
||||
<div class="photo-upload-plus">
|
||||
+
|
||||
</div>
|
||||
<div class="photo-upload-text">
|
||||
{{ toValueWithout("点击上传照片") }}
|
||||
</div>
|
||||
<div class="photo-upload-tip">
|
||||
*{{ toValueWithout("上传照片时建议勾选[原图]") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo-upload-footer">
|
||||
{{ toValueWithout("请确定您对上传的照片拥有合法使用权利或已取得他人合法授权,且同意本平台分析图片信息以提供生成服务") }}
|
||||
</div>
|
||||
</div>
|
||||
<img class="photo-upload-img" v-if="picture" :src="picture" alt="" srcset="">
|
||||
<div class="photo-upload-box-1">
|
||||
<h5-cropper :option="option" @getbase64Data="getbase64Data" @imgorigoinf="imgorigoinf"></h5-cropper>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="shouldShowKindList">
|
||||
<div :style="`font-size: 16px; color: ${config.styles.colors.textPrimary}; font-weight: bold; margin-top: ${config.styles.spacing.sectionMargin};padding: 0 ${config.styles.spacing.pagePadding};`">
|
||||
{{ toValueWithout("风格类型") }}
|
||||
@@ -147,7 +100,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="shouldShowMultiView">
|
||||
<div v-if="isViews == 1">
|
||||
<div :style="`font-size: 16px; color: ${config.styles.colors.textPrimary}; font-weight: bold; margin-top: ${config.styles.spacing.sectionMargin};padding: 0 ${config.styles.spacing.pagePadding};`">
|
||||
{{ toValueWithout("多视角参考图") }}
|
||||
</div>
|
||||
@@ -176,7 +129,7 @@
|
||||
<div class="mounts-item-list">
|
||||
<img
|
||||
class="mounts-item-image"
|
||||
:src="getImageUrl(item.cover_path)"
|
||||
:src="item.image"
|
||||
:alt="toValueWithout(item.name)"
|
||||
/>
|
||||
<van-icon
|
||||
@@ -241,6 +194,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo-upload-body">
|
||||
<div v-if="!picture" class="photo-upload-box">
|
||||
<div class="photo-upload-area">
|
||||
<div class="photo-upload-plus">
|
||||
+
|
||||
</div>
|
||||
<div class="photo-upload-text">
|
||||
{{ toValueWithout("点击上传照片") }}
|
||||
</div>
|
||||
<div class="photo-upload-tip">
|
||||
*{{ toValueWithout("上传照片时建议勾选[原图]") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo-upload-footer">
|
||||
{{ toValueWithout("请确定您对上传的照片拥有合法使用权利或已取得他人合法授权,且同意本平台分析图片信息以提供生成服务") }}
|
||||
</div>
|
||||
</div>
|
||||
<img class="photo-upload-img" v-if="picture" :src="picture" alt="" srcset="">
|
||||
<div class="photo-upload-box-1">
|
||||
<h5-cropper :option="option" @getbase64Data="getbase64Data" @imgorigoinf="imgorigoinf"></h5-cropper>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="`height: 120px;`"></div>
|
||||
<div class="design-action-bar">
|
||||
<div class="design-left">
|
||||
@@ -268,11 +243,6 @@ import { toValueWithout } from '@/lang/utils'
|
||||
import { cartoonConfig } from '@/config/cartoon'
|
||||
import leafIcon from '@/assets/badge/leaf.png'
|
||||
import arrowIcon from '@/assets/badge/arrow.png'
|
||||
import example1 from '@/assets/badge/1.png'
|
||||
import example2 from '@/assets/badge/2.png'
|
||||
import example3 from '@/assets/badge/3.png'
|
||||
import example4 from '@/assets/badge/4.png'
|
||||
// Element Plus 图标通过组件自动导入,这里使用文本符号作为替代
|
||||
|
||||
// 初始化翻译功能
|
||||
const { t } = useTranslation();
|
||||
@@ -332,6 +302,7 @@ const typeId = ref(0)
|
||||
const subjectId = ref(0)
|
||||
const typeName = ref('')
|
||||
const subjectName = ref('')
|
||||
const isViews = ref(0)
|
||||
const getOrderStat = () => {
|
||||
badgeApi.getOrderStat({}).then((res: any) => {
|
||||
orderStat.value = res
|
||||
@@ -341,9 +312,9 @@ const getOrderStat = () => {
|
||||
typeName.value = res.type_name
|
||||
subjectId.value = res.subject_id
|
||||
subjectName.value = res.subject_name
|
||||
if (res.type_id === 4) {
|
||||
getKindList()
|
||||
} else if (res.type_id === 8) {
|
||||
isViews.value = res.is_views
|
||||
getKindList()
|
||||
if (res.type_id === 8) {
|
||||
mountsId.value = 0
|
||||
getmountsList()
|
||||
} else if (res.type_id === 9) {
|
||||
@@ -361,12 +332,7 @@ const shouldShowPhotoExample = computed(() => {
|
||||
|
||||
// 计算属性:是否显示风格类型
|
||||
const shouldShowKindList = computed(() => {
|
||||
return typeId.value === 4 && kindList.value.length > 0
|
||||
})
|
||||
|
||||
// 计算属性:是否显示多视角参考图
|
||||
const shouldShowMultiView = computed(() => {
|
||||
return typeId.value === 4 && config.productLimits.multiViewSupported.includes(prodId.value)
|
||||
return kindList.value.length > 0
|
||||
})
|
||||
|
||||
const kindList = ref([])
|
||||
@@ -403,7 +369,10 @@ const getmountsList = () => {
|
||||
}
|
||||
badgeApi.getMountsList({
|
||||
prod_id: prodId.value,
|
||||
type_id: typeId.value
|
||||
type_id: typeId.value,
|
||||
status: 1,
|
||||
page: 1,
|
||||
size: 1000
|
||||
}).then((res: any) => {
|
||||
if (res && res.list && res.list.length > 0) {
|
||||
mountsList.value = res.list
|
||||
@@ -645,7 +614,7 @@ const getPid = async () => {
|
||||
sendToOss(imgurl.value, res.url),
|
||||
]
|
||||
await Promise.all(uploadTasks)
|
||||
if (shouldShowMultiView.value && referPicture.value.length > 0) {
|
||||
if (isViews.value == 1 && referPicture.value.length > 0) {
|
||||
const multiUrlTasks = referPicture.value.map((item) => {
|
||||
return badgeApi.getMultiUrl({
|
||||
pid: pid.value,
|
||||
@@ -1064,7 +1033,7 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
padding: 16px 36px;
|
||||
padding: 16px;
|
||||
}
|
||||
.kind-box-item {
|
||||
margin-right: 10px;
|
||||
@@ -1114,7 +1083,7 @@ onMounted(() => {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
border-radius: 8px;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user