This commit is contained in:
laodaming 2023-08-14 15:46:28 +08:00
parent 357f402031
commit 50da55d7bb
2 changed files with 6 additions and 5 deletions

View File

@ -17,6 +17,7 @@ import (
"github.com/zeromicro/go-zero/core/logx"
"gorm.io/gorm"
"io/ioutil"
"os"
"strconv"
"time"
)
@ -233,9 +234,9 @@ func getCombineImage(ctx context.Context, svcCtx *svc.ServiceContext, parseInfo
url := svcCtx.Config.PythonApi.CombineImageUrl
header := make(map[string]string)
header["content-type"] = "application/json"
/*f, _ := os.Create("a.txt")
defer f.Close()
f.Write(postData)*/
/* f, _ := os.Create("a.txt")
defer f.Close()
f.Write(postData)*/
httpRsp, err := curl.ApiCall(url, "POST", header, bytes.NewReader(postData), time.Second*20)
if err != nil {
logx.Error("failed to combine logo:", err)
@ -252,7 +253,6 @@ func getCombineImage(ctx context.Context, svcCtx *svc.ServiceContext, parseInfo
logx.Error("failed to parse python api rsp:", err)
return "", err
}
//fmt.Println("××××××××××××××××××××", pythonApiInfo)
//上传刀版图
var upload = file.Upload{
Ctx: ctx,
@ -271,5 +271,6 @@ func getCombineImage(ctx context.Context, svcCtx *svc.ServiceContext, parseInfo
logx.Error("上传刀版图到s3失败:", err)
return "", err
}
logx.Info("发送渲染组装数据到unity成功")
return uploadRes.ResourceUrl, nil
}

View File

@ -14,4 +14,4 @@ AWS:
Secret: sjCEv0JxATnPCxno2KNLm0X8oDc7srUR+4vkYhvm
Token:
PythonApi: #python接口
CombineImageUrl: http://192.168.1.7:45678/LogoCombine #合成刀版图接口
CombineImageUrl: http://18.119.109.254:8999/LogoCombine #合成刀版图接口