略略略

This commit is contained in:
lzp
2026-03-27 16:07:13 +08:00
parent 2aa5ac8044
commit 0be1c9743c
10 changed files with 129 additions and 32 deletions

View File

@@ -11,12 +11,12 @@
import { useRoute } from 'vue-router'
const route = useRoute()
const url =
'https://www.minio-api.aida.com.hk/fida-test/furniture/sketches/1a48ed3a-1faa-4fcd-bf07-765dba1702c5.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20260320%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260320T020948Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=7dc192bac887bce7b02c99d7037c08d9d684310f00add9b0e63b74b36ee63d37'
'https://minio-api.aida.com.hk/fida-public-bucket/furniture/sketches/e3082a38-55d2-4313-ad53-55aad715cf67.png'
const openCanvas = () => {
myEvent.emit('openFlowCanvas', { url })
}
const openDepthCanvas = () => {
myEvent.emit('openDepthCanvas', { url, canvasId: '69c34539ce996b52f07e625f' })
myEvent.emit('openDepthCanvas', { url, canvasId: '' })
}
onMounted(() => {
if (route.query.depth) {

View File

@@ -62,6 +62,7 @@
}
})
} else {
data.vibe = JSON.parse(data.vibe)
onSubmit(data)
}
}

View File

@@ -3,9 +3,9 @@
<p class="title" v-html="$t('Nuic.nuic2Title')"></p>
<div class="list">
<div v-for="v in list" :key="v.id" @click="v.active = !v.active">
<img :src="v.url" draggable="false" />
<img :src="v.imageUrl" draggable="false" />
<div class="active" v-show="v.active">
<span>{{ v.title }}</span>
<span>{{ v.styleName }}</span>
</div>
</div>
</div>
@@ -22,28 +22,35 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { useRouter } from 'vue-router'
import { GetUserStyleImages } from '@/api/user'
const router = useRouter()
const emit = defineEmits(['next'])
const list = ref([
{ id: 1, url: '/image/nuic/style-1.png', title: '凳子', active: false },
{ id: 2, url: '/image/nuic/style-2.png', title: '沙发', active: false },
{ id: 3, url: '/image/nuic/style-3.png', title: '凳子', active: false },
{ id: 4, url: '/image/nuic/style-4.png', title: '桌子', active: false },
{ id: 5, url: '/image/nuic/style-5.png', title: '桌子', active: false },
{ id: 6, url: '/image/nuic/style-6.png', title: '桌子', active: false },
{ id: 7, url: '/image/nuic/style-7.png', title: '沙发', active: false },
{ id: 8, url: '/image/nuic/style-8.png', title: '桌子', active: false }
])
const list = ref([])
const pageSize = ref(8)
const pageNum = ref(1)
const totalPages = ref(1)
const onNext = () => {
const data = {
vibe: list.value
.filter((v) => v.active)
.map((v) => v.id)
.join(',')
vibe: JSON.stringify(list.value.filter((v) => v.active).map((v) => v.id))
}
emit('next', data)
}
const onLoadMore = () => {}
const onLoadMore = () => {
GetUserStyleImages({
pageNum: pageNum.value,
pageSize: pageSize.value
}).then((res) => {
if (!res) return
list.value = res.images.map((v) => ({
...v,
active: false
}))
totalPages.value = res.totalPages
pageNum.value++
if (pageNum.value > totalPages.value) pageNum.value = 1
})
}
onLoadMore()
</script>
<style lang="less" scoped>