|
@@ -17,6 +17,8 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
+var ServerUrl = "http://127.0.0.1:5008/"
|
|
|
+
|
|
|
// SharePosterReq 分享海报请求体
|
|
|
type SharePosterReq struct {
|
|
|
CodePage string `json:"code_page" description:"太阳码page"`
|
|
@@ -128,13 +130,8 @@ type Html2ImgResp struct {
|
|
|
|
|
|
// postHtml2Img 请求htm2img接口
|
|
|
func postHtml2Img(param map[string]interface{}) (resp *Html2ImgResp, err error) {
|
|
|
- pythonUrl := ""
|
|
|
- if global.CONFIG.Serve.RunMode == "release" {
|
|
|
-
|
|
|
- } else {
|
|
|
- pythonUrl = "http://127.0.0.1:5008/"
|
|
|
- }
|
|
|
- postUrl := pythonUrl + "htm2img"
|
|
|
+ // 目前仅此处调用该接口,暂不加授权、校验等
|
|
|
+ postUrl := ServerUrl + "htm2img"
|
|
|
postData, err := json.Marshal(param)
|
|
|
if err != nil {
|
|
|
return
|