From a1d7a1321b6d010dc33506ac85975a70b1c65202 Mon Sep 17 00:00:00 2001 From: Linzm <1015157648@qq.com> Date: Mon, 13 Oct 2025 17:19:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=9E=E6=96=B0=E5=A2=9E=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 2 ++ src/views/badge/index.vue | 60 +++++++++++++++++++++++++++++++++++-- src/views/badge/preview.vue | 10 +++++-- 3 files changed, 67 insertions(+), 5 deletions(-) diff --git a/components.d.ts b/components.d.ts index 19a5e08..7982ed8 100644 --- a/components.d.ts +++ b/components.d.ts @@ -28,6 +28,8 @@ declare module '@vue/runtime-core' { VanIcon: typeof import('vant/es')['Icon'] VanList: typeof import('vant/es')['List'] VanPullRefresh: typeof import('vant/es')['PullRefresh'] + VanRadio: typeof import('vant/es')['Radio'] + VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanStepper: typeof import('vant/es')['Stepper'] } } diff --git a/src/views/badge/index.vue b/src/views/badge/index.vue index b9a132a..c2084e5 100644 --- a/src/views/badge/index.vue +++ b/src/views/badge/index.vue @@ -176,6 +176,16 @@ +
+
风格类型
+
+
+
+ {{ item.name }} +
+
+
+
温馨提示:请上传只有{{ prop == '3D真人肖像' ? '1' : '1-3' }}人的照片
温馨提示:请上传只有1-3只宠物的照片
@@ -330,6 +340,7 @@ const getOrderStat = () => { orderStat.value = res if (res.type_id == 4) { prodId.value = res.prod_id == 1 ? 1 : 2 + getKindList() } else { prodId.value = res.type_id == 3 ? 8 : res.prod_id } @@ -339,6 +350,18 @@ const getOrderStat = () => { }) } +const kindList = ref([]) +const getKindList = () => { + badgeApi.getKindList({ + support_subject: 1, + type_id: 4 + }).then((res: any) => { + kindList.value = res.list + kindId.value = res.list && res.list[0].id + console.log('kindList', kindList.value) + }) +} + const prodChange = (id: number) => { console.log('prodChange', id) if (typeId.value == 3 && id == 7) { @@ -351,6 +374,13 @@ const prodChange = (id: number) => { } prodId.value = typeId.value == 4 ? id == 8 ? 2 : 1 : id == 7 ? 7 : 8 picture.value = null + kindId.value = 0 +} + +const kindId = ref(0) +const kindChange = (id: number) => { + kindId.value = id + console.log('kindChange', id) } const isLoading = ref(false) @@ -612,7 +642,8 @@ const sendToOss = async (src: string, url: string) => { group: 1, prod_id: prodId.value, extend_value: -1, - type_id: typeId.value + type_id: typeId.value, + kind_id: kindId.value } badgeApi.putModeling(params).then((res: any) => { console.log('putModeling', res) @@ -640,7 +671,8 @@ const createLog = () => { pid: pid.value, group: 1, prod_id: prodId.value, - type_id: typeId.value + type_id: typeId.value, + kind_id: kindId.value } badgeApi.createLog(params).then((res: any) => { console.log('createLog', res) @@ -657,7 +689,8 @@ const createLog = () => { pid: pid.value, group: 1, prod_id: prodId.value, - type_id: typeId.value + type_id: typeId.value, + kind_id: kindId.value }, }) }, 1000); @@ -1281,4 +1314,25 @@ onMounted(() => { background: #50CF54; color: #fff; } +.kind-box { + display: flex; + align-items: center; + justify-content: flex-start; + flex-wrap: wrap; + padding: 16px 36px; +} +.kind-box-item { + margin-right: 10px; + padding: 6px 10px; + background: #f5f5f5; + border-radius: 8px; + color: #333; +} +.kind-item-title { + font-size: 14px; +} +.kind-box-item.styleActive { + background: #50CF54; + color: #fff; +} diff --git a/src/views/badge/preview.vue b/src/views/badge/preview.vue index bc84129..3dc56e0 100644 --- a/src/views/badge/preview.vue +++ b/src/views/badge/preview.vue @@ -234,7 +234,8 @@ function sureReload() { pid: pid.value, group: 1, prod_id: prodId.value, - type_id: typeId.value + type_id: typeId.value, + kind_id: kindId.value } badgeApi.putModeling(params).then((res: any) => { console.log('putModeling', res) @@ -274,7 +275,8 @@ const createLog = () => { pid: pid.value, group: 1, prod_id: prodId.value, - type_id: typeId.value + type_id: typeId.value, + kind_id: kindId.value }).then((res: any) => { console.log('createLog', res) showReload.value = false @@ -873,6 +875,7 @@ function handleBeforeUnload(_event: BeforeUnloadEvent) { const pid = ref(0) const route = useRoute() const prodId = ref(0) +const kindId = ref(0) onMounted(() => { pid.value = route.query.pid group.value = route.query.group @@ -882,6 +885,9 @@ onMounted(() => { if (route.query.prod_id) { prodId.value = route.query.prod_id } + if (route.query.kind_id) { + kindId.value = Number(route.query.kind_id) + } getTrialCode() // pid.value = 281505;