mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 10:13:44 +08:00
wechat payment for mobile page is ready
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user