Add headshots api (#146)

This commit is contained in:
HCode authored and GitHub committed 2024-11-06 05:28:57 +00:00
1 parent 91a6fe08d0
commit 23192c50ad
6 files changed
+27 -6

No files matched your search

@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "add headshots api",
"packageName": "@acedatacloud/nexior",
"email": "1348977728@qq.com",
"dependentChangeType": "patch"
}
+1 -1
View File
@@ -2,7 +2,7 @@
<div class="image-gallery">
<div v-for="(image, index) in images" :key="index" class="image-container">
<img :src="image.image_url" alt="Image" />
<button class="view-button" @click="viewImage(image.image_url)">View Image</button>
<button class="view-button" @click="viewImage(image.image_url)">{{ $t('headshots.button.viewImage') }}</button>
</div>
</div>
</template>
@@ -56,7 +56,10 @@ export default defineComponent({
},
urls(): string[] {
// @ts-ignore
return this.fileList.map((file: UploadFile) => file?.response?.file_url);
return this.fileList.map((file: UploadFile) => {
const url = file?.response?.file_url;
return url.replace('https://cdn.acedata.cloud', 'https://acedata-cdn.zhishuyun.com');
});
},
value: {
get() {
+4 -1
View File
@@ -97,7 +97,10 @@
"message": "生成",
"description": "生成Headshots证件照 的按钮文本"
},
"button.viewImage": {
"message": "查看原图",
"description": "生成Headshots证件照 的按钮文本"
},
"button.download": {
"message": "下载视频",
"description": "下载视频按钮文本"
+8
View File
@@ -63,6 +63,10 @@
"message": "Luma",
"description": "展示在编辑框的标题"
},
"field.featuresHeadshots": {
"message": "AI证件照",
"description": "展示在编辑框的标题"
},
"field.featuresSuno": {
"message": "Suno",
"description": "展示在编辑框的标题"
@@ -259,6 +263,10 @@
"message": "打开或关闭 Luma 功能模块。",
"description": "Luma 功能的描述"
},
"message.featuresHeadshots": {
"message": "打开或关闭 AI证件照 功能模块。",
"description": "AI证件照 功能的描述"
},
"message.featuresSupport": {
"message": "打开或关闭客服支持",
"description": "Support 功能的描述"
+3 -3
View File
@@ -10,7 +10,7 @@ import { BASE_URL_API } from '@/constants';
class HeadshotsOperator {
async task(id: string, options: { token: string }): Promise<AxiosResponse<IHeadshotsTaskResponse>> {
return await axios.post(
`/luma/tasks`,
`/headshots/tasks`,
{
action: 'retrieve',
id: id
@@ -32,7 +32,7 @@ class HeadshotsOperator {
options: { token: string }
): Promise<AxiosResponse<IHeadshotsTasksResponse>> {
return await axios.post(
`/luma/tasks`,
`/headshots/tasks`,
{
action: 'retrieve_batch',
...(filter.ids
@@ -79,7 +79,7 @@ class HeadshotsOperator {
token: string;
}
): Promise<AxiosResponse<IHeadshotsGenerateResponse>> {
return await axios.post('/luma/videos', data, {
return await axios.post('/headshots/generate', data, {
headers: {
authorization: `Bearer ${options.token}`,
'content-type': 'application/json',