mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-11 19:53:50 +08:00
optimize download function for suno
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user