optimize download function for suno

This commit is contained in:
RockYang
2024-09-11 08:39:28 +08:00
parent 8b2e2d61af
commit 49f2e1a71e
6 changed files with 45 additions and 10 deletions

View File

@@ -9,6 +9,8 @@
* Util lib functions
*/
import {showConfirmDialog} from "vant";
import {httpDownload} from "@/utils/http";
import {showMessageError} from "@/utils/dialog";
// generate a random string
export function randString(length) {
@@ -221,8 +223,8 @@ export function showLoginDialog(router) {
}
export const replaceImg =(img) => {
const devHost = "172.22.11.69"
const localhost = "localhost"
const devHost = process.env.VUE_APP_API_HOST
const localhost = "http://localhost:5678"
if (img.includes(localhost)) {
return img?.replace(localhost, devHost)
}