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

chore: 推荐模板优化

parent ba060a3f
import { request } from '@/utils/request' import { request } from '@/utils/request'
// 获取模板 // 获取模板
export function fetchDigitalHumanTemplateStatusList<T>(payload: object) { export function fetchDigitalHumanTemplateStatusList<T>(
return request.post<T>('/aiDigitalHumanTemplateStatusRest/getDigitalHumanTemplateStatusList.json', payload) templateType: string,
pagingInfo: { pageNo: number; pageSize: number },
) {
return request.post<T>('/aiDigitalHumanTemplateStatusRest/getDigitalHumanTemplateStatusList.json', null, {
params: {
templateType,
pageNo: pagingInfo.pageNo,
pageSize: pagingInfo.pageSize,
},
})
} }
// 根据ID获取推荐模板信息 // 根据ID获取推荐模板信息
......
...@@ -7,15 +7,15 @@ const props = defineProps<{ ...@@ -7,15 +7,15 @@ const props = defineProps<{
selectedTemplate: DigitalTemplate selectedTemplate: DigitalTemplate
}>() }>()
const emit = defineEmits<{ const emit = defineEmits<{
(event: 'go-to-create', id: number): void (event: 'go-to-create', template: DigitalTemplate): void
}>() }>()
function handlePreviewModalClose() { function handlePreviewModalClose() {
PreviewModalVisible.value = false PreviewModalVisible.value = false
} }
function handleGoToCreate(this: any) { function handleToCreate(this: any) {
emit('go-to-create', props.selectedTemplate.id) emit('go-to-create', props.selectedTemplate as DigitalTemplate)
} }
</script> </script>
<template> <template>
...@@ -33,8 +33,8 @@ function handleGoToCreate(this: any) { ...@@ -33,8 +33,8 @@ function handleGoToCreate(this: any) {
:src="props.selectedTemplate.demonstrationVideoUrl" :src="props.selectedTemplate.demonstrationVideoUrl"
:poster="props.selectedTemplate.coverUrl" :poster="props.selectedTemplate.coverUrl"
class="h-[448px] w-[752px]" class="h-[448px] w-[752px]"
autoplay
controls controls
autoplay
></video> ></video>
</div> </div>
</div> </div>
...@@ -47,7 +47,7 @@ function handleGoToCreate(this: any) { ...@@ -47,7 +47,7 @@ function handleGoToCreate(this: any) {
</button> </button>
<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]" 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> </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