Commit e70dc362 authored by shirlyn.guo's avatar shirlyn.guo 🤡

chore: 推荐模板优化

parent ba060a3f
import { request } from '@/utils/request'
// 获取模板
export function fetchDigitalHumanTemplateStatusList<T>(payload: object) {
return request.post<T>('/aiDigitalHumanTemplateStatusRest/getDigitalHumanTemplateStatusList.json', payload)
export function fetchDigitalHumanTemplateStatusList<T>(
templateType: string,
pagingInfo: { pageNo: number; pageSize: number },
) {
return request.post<T>('/aiDigitalHumanTemplateStatusRest/getDigitalHumanTemplateStatusList.json', null, {
params: {
templateType,
pageNo: pagingInfo.pageNo,
pageSize: pagingInfo.pageSize,
},
})
}
// 根据ID获取推荐模板信息
......
......@@ -7,15 +7,15 @@ const props = defineProps<{
selectedTemplate: DigitalTemplate
}>()
const emit = defineEmits<{
(event: 'go-to-create', id: number): void
(event: 'go-to-create', template: DigitalTemplate): void
}>()
function handlePreviewModalClose() {
PreviewModalVisible.value = false
}
function handleGoToCreate(this: any) {
emit('go-to-create', props.selectedTemplate.id)
function handleToCreate(this: any) {
emit('go-to-create', props.selectedTemplate as DigitalTemplate)
}
</script>
<template>
......@@ -33,8 +33,8 @@ function handleGoToCreate(this: any) {
:src="props.selectedTemplate.demonstrationVideoUrl"
:poster="props.selectedTemplate.coverUrl"
class="h-[448px] w-[752px]"
autoplay
controls
autoplay
></video>
</div>
</div>
......@@ -47,7 +47,7 @@ function handleGoToCreate(this: any) {
</button>
<button
class="!box-content !h-[38px] !w-[74px] cursor-pointer rounded-[6px] border-[1px] border-solid border-[#dde3f0] bg-gradient-to-r from-[#30b5f2] to-[#2468f2] px-[10px] text-[#ffffff] transition-all duration-300 hover:from-[#30b5f2] hover:to-[#528eff]"
@click="handleGoToCreate"
@click="handleToCreate"
>
做同款
</button>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment