wechat payment for mobile page is ready

This commit is contained in:
RockYang
2024-09-19 17:59:27 +08:00
parent 4d9f89f630
commit 26e3ababcf
12 changed files with 196 additions and 140 deletions

View File

@@ -9,6 +9,7 @@ package utils
import (
"encoding/json"
"fmt"
"geekai/core/types"
logger2 "geekai/logger"
"io"
@@ -76,3 +77,11 @@ func DownloadImage(imageURL string, proxy string) ([]byte, error) {
return imageBytes, nil
}
func GetBaseURL(strURL string) string {
u, err := url.Parse(strURL)
if err != nil {
return ""
}
return fmt.Sprintf("%s://%s", u.Scheme, u.Host)
}