对应参数选择
This commit is contained in:
+68
-68
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-BxMLe-RT.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-Cbav91yV.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BhPFzWLH.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -429,7 +429,15 @@ const AIChatPage: React.FC = () => {
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
getCreditRatios()
|
||||
.then((data: any) => {
|
||||
// console.log('积分', data);
|
||||
|
||||
setCreditRatios(data.video || []);
|
||||
setCimage(data.image || []);
|
||||
})
|
||||
.catch((error) => {
|
||||
});
|
||||
calculateCredits().then((data: any) => {
|
||||
// console.log('积分计算', data);
|
||||
// 保存积分计算数据
|
||||
@@ -441,7 +449,36 @@ const AIChatPage: React.FC = () => {
|
||||
setGen_list(mess_list)
|
||||
setTotalnumber(total)
|
||||
})
|
||||
getParameters()
|
||||
.then((data) => {
|
||||
let supportedSizes = (data as any).items?.[0]?.supportedSizes || {};
|
||||
let supportedResolutions = [];
|
||||
let twokwidth = [];
|
||||
let fourkwidth = [];
|
||||
|
||||
for (let key in supportedSizes["2K"]) {
|
||||
supportedResolutions.push(key);
|
||||
twokwidth.push(supportedSizes["2K"][key]);
|
||||
}
|
||||
|
||||
const newRatioOptions = supportedResolutions.map((res: any, index: number) => ({
|
||||
value: res,
|
||||
label: String(index),
|
||||
}));
|
||||
setRatioOptions(newRatioOptions);
|
||||
|
||||
for (let key in supportedSizes["4K"]) {
|
||||
fourkwidth.push(supportedSizes["4K"][key]);
|
||||
}
|
||||
|
||||
const newWidthandHeight = [twokwidth, fourkwidth];
|
||||
setWidthandHeight(newWidthandHeight);
|
||||
setResolutionOptions([
|
||||
{ value: '2K', label: '高清 2K' },
|
||||
{ value: '4K', label: '超清 4K' },
|
||||
]);
|
||||
})
|
||||
.catch(() => { });
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user