This commit is contained in:
hrx 2026-04-09 15:04:36 +08:00
parent 17bdec62bc
commit 71aba3f929
11 changed files with 38 additions and 36 deletions

View File

@ -1,2 +1 @@
VITE_API_BASE_URL = 'https://opencomputing.ai'
VITE_IMG_BASE_URL = 'https://opencomputing.ai'
VITE_API_BASE_URL = 'https://ai.atvoe.com/'

1
.env.production Normal file
View File

@ -0,0 +1 @@
VITE_API_BASE_URL = 'https://opencomputing.ai'

View File

@ -1,19 +1,19 @@
import {get, post} from '../utlis/request'
// 文生视频
export const textvideo = <T,D>(data:D):Promise<T> =>post('/api/llmage/vidu_inference.dspy',data)
export const textvideo = <T,D>(data:D):Promise<T> =>post('/llmage/vidu_inference.dspy',data)
// 图生视频
export const imagetovideo = <T,D>(data:D):Promise<T> =>post('/api/llmage/vidu_inference.dspy',data)
export const imagetovideo = <T,D>(data:D):Promise<T> =>post('/llmage/vidu_inference.dspy',data)
// 获取所有模型
export const AllModel = <T,D>(data:D):Promise<T> =>get('/api/llmage/get_type_llms.dspy',data)
export const AllModel = <T,D>(data:D):Promise<T> =>get('/llmage/get_type_llms.dspy',data)
// 查询当前模型价格
export const queryModelPrice = <T,D>(data:D):Promise<T> =>post('/api/platformbiz/product_query_price.dspy',data)
export const queryModelPrice = <T,D>(data:D):Promise<T> =>post('/platformbiz/product_query_price.dspy',data)
// 获取当天任务列表
export const getTodayTask = <T>():Promise<T> =>get('/api/llmage/get_my_asynctasks.dspy')
export const getTodayTask = <T>():Promise<T> =>get('/llmage/get_my_asynctasks.dspy')
// 获取任务状态
export const getAsyncTaskStatus = <T,D>(data:D):Promise<T> =>get('/api/llmage/get_asynctask_status.dspy',data)
export const getAsyncTaskStatus = <T,D>(data:D):Promise<T> =>get('/llmage/get_asynctask_status.dspy',data)

View File

@ -4,13 +4,13 @@ import { get, post } from '../utlis/request'
export const getVideos = <T, D>(data: D): Promise<T> => get('https://vidu.opencomputing.cn/v1/feed/list', data)
// 充值
export const recharge = <T, D>(data: D): Promise<T> => post('/api/unipay/user_recharge.dspy', data)
export const recharge = <T, D>(data: D): Promise<T> => post('/unipay/user_recharge.dspy', data)
// 开户
export const openAccount = <T>(): Promise<T> => post('/api/accounting/open_customer_accounts.dspy')
export const openAccount = <T>(): Promise<T> => post('/accounting/open_customer_accounts.dspy')
// 余额
export const balance = <T>(): Promise<T> => get('/api/accounting/mybalance.dspy')
export const balance = <T>(): Promise<T> => get('/accounting/mybalance.dspy')
// 充值记录
export const consumptionRecord = <T,D>(data:D):Promise<T> => get('/api/platformbiz/query_orders.dspy',data)
export const consumptionRecord = <T,D>(data:D):Promise<T> => get('/platformbiz/query_orders.dspy',data)

View File

@ -1,5 +1,5 @@
import {get, post} from '@/utlis/request'
export const Code = <T,D>(data:D):Promise<T> =>get('/api/rbac/gen_sms_code.dspy',data)
export const Code = <T,D>(data:D):Promise<T> =>get('/rbac/gen_sms_code.dspy',data)
export const LoginApi = <T,D>(data:D):Promise<T> =>post('/api/rbac/phone_login.dspy',data)
export const LoginApi = <T,D>(data:D):Promise<T> =>post('/rbac/phone_login.dspy',data)

View File

@ -19,10 +19,9 @@
</div>
</template>
<script setup lang='ts'>
import { ref, watch } from 'vue';
// activeTab
const props = defineProps<{
defineProps<{
activeTab: string;
}>();

View File

@ -83,7 +83,7 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue'
import { ref, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
//

View File

@ -31,7 +31,7 @@
type TabType = 'reference' | 'image' | 'text';
// activeTab使
const props = defineProps<{
defineProps<{
activeTab: TabType;
}>();

View File

@ -14,12 +14,14 @@ axios.interceptors.request.use(
// console.log('请求数据 (data):', config.data)
// console.log('请求头:', config.headers)
// config.baseURL = import.meta.env.VITE_API_BASE_URL
config.baseURL = import.meta.env.VITE_API_BASE_URL
const Store = useLoginStore()
if (Store.userInfo && Store.userInfo.user && Store.userInfo.user.id) {
config.headers.Authorization = Store.userInfo.user.id
}
return config
},

View File

@ -61,23 +61,24 @@ export function transformShareElementItem(item: ShareElementItem): StencilItem |
const width = firstCreation.resolution?.width || 1920;
const height = firstCreation.resolution?.height || 1080;
aspectRatio = `${width}/${height}`;
} else if (element.components?.[0]) {
// 从 components 获取(降级方案)
const component = element.components[0];
src = component.content;
poster = component.cover_uri || component.src_img;
}
// else if (element.components?.[0]) {
// // 从 components 获取(降级方案)
// const component = element.components[0];
// src = component.content;
// poster = component.cover_uri || component.src_img;
// 尝试从 selected_region 获取宽高
if (component.selected_region) {
const { x: x1, y: y1 } = component.selected_region.top_left;
const { x: x2, y: y2 } = component.selected_region.bottom_right;
const width = x2 - x1;
const height = y2 - y1;
if (width > 0 && height > 0) {
aspectRatio = `${width}/${height}`;
}
}
}
// // 尝试从 selected_region 获取宽高
// if (component.selected_region) {
// const { x: x1, y: y1 } = component.selected_region.top_left;
// const { x: x2, y: y2 } = component.selected_region.bottom_right;
// const width = x2 - x1;
// const height = y2 - y1;
// if (width > 0 && height > 0) {
// aspectRatio = `${width}/${height}`;
// }
// }
// }
// 如果仍然没有数据,返回 null
if (!src) return null;

View File

@ -107,7 +107,7 @@ import { reactive, ref, computed, onUnmounted } from 'vue';
import type { FormInstance, FormRules } from 'element-plus';
import { Iphone, Key } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
import { Code, LoginApi } from '@/apis/login';
import { Code } from '@/apis/login';
import type { CodeResult, LoginParams, CaptchaParams } from '@/types/login';
import { useLoginStore } from '@/store/LoginStore';