mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-30 15:04:30 +08:00
调整好可灵 API
This commit is contained in:
@@ -189,7 +189,7 @@ func (h *VideoHandler) KeLingCreate(c *gin.Context) {
|
|||||||
UserId: userId,
|
UserId: userId,
|
||||||
Type: types.VideoKeLing,
|
Type: types.VideoKeLing,
|
||||||
Prompt: data.Prompt,
|
Prompt: data.Prompt,
|
||||||
Power: h.App.SysConfig.LumaPower,
|
Power: power,
|
||||||
TaskInfo: utils.JsonEncode(task),
|
TaskInfo: utils.JsonEncode(task),
|
||||||
}
|
}
|
||||||
tx := h.DB.Create(&job)
|
tx := h.DB.Create(&job)
|
||||||
|
|||||||
@@ -706,8 +706,12 @@ const generate = async () => {
|
|||||||
|
|
||||||
generating.value = true;
|
generating.value = true;
|
||||||
// 处理图片链接
|
// 处理图片链接
|
||||||
params.image = replaceImg(params.image);
|
if (params.image) {
|
||||||
params.image_tail = replaceImg(params.image_tail);
|
params.image = replaceImg(params.image);
|
||||||
|
}
|
||||||
|
if (params.image_tail) {
|
||||||
|
params.image_tail = replaceImg(params.image_tail);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await httpPost("/api/video/keling/create", params);
|
await httpPost("/api/video/keling/create", params);
|
||||||
showMessageOK("任务创建成功");
|
showMessageOK("任务创建成功");
|
||||||
|
|||||||
@@ -92,11 +92,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
checkSession()
|
checkSession()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (isMobile()) {
|
router.back();
|
||||||
router.push("/mobile");
|
|
||||||
} else {
|
|
||||||
router.push("/chat");
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|
||||||
@@ -108,6 +104,7 @@ onMounted(() => {
|
|||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleKeyup = (e) => {
|
const handleKeyup = (e) => {
|
||||||
@@ -140,11 +137,7 @@ const doLogin = (verifyData) => {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
setUserToken(res.data.token);
|
setUserToken(res.data.token);
|
||||||
store.setIsLogin(true);
|
store.setIsLogin(true);
|
||||||
if (isMobile()) {
|
router.back();
|
||||||
router.push("/mobile");
|
|
||||||
} else {
|
|
||||||
router.push("/chat");
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
showMessageError("登录失败," + e.message);
|
showMessageError("登录失败," + e.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user