fix
This commit is contained in:
parent
357f402031
commit
50da55d7bb
|
@ -17,6 +17,7 @@ import (
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -233,9 +234,9 @@ func getCombineImage(ctx context.Context, svcCtx *svc.ServiceContext, parseInfo
|
||||||
url := svcCtx.Config.PythonApi.CombineImageUrl
|
url := svcCtx.Config.PythonApi.CombineImageUrl
|
||||||
header := make(map[string]string)
|
header := make(map[string]string)
|
||||||
header["content-type"] = "application/json"
|
header["content-type"] = "application/json"
|
||||||
/*f, _ := os.Create("a.txt")
|
/* f, _ := os.Create("a.txt")
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
f.Write(postData)*/
|
f.Write(postData)*/
|
||||||
httpRsp, err := curl.ApiCall(url, "POST", header, bytes.NewReader(postData), time.Second*20)
|
httpRsp, err := curl.ApiCall(url, "POST", header, bytes.NewReader(postData), time.Second*20)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logx.Error("failed to combine logo:", err)
|
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)
|
logx.Error("failed to parse python api rsp:", err)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
//fmt.Println("××××××××××××××××××××:", pythonApiInfo)
|
|
||||||
//上传刀版图
|
//上传刀版图
|
||||||
var upload = file.Upload{
|
var upload = file.Upload{
|
||||||
Ctx: ctx,
|
Ctx: ctx,
|
||||||
|
@ -271,5 +271,6 @@ func getCombineImage(ctx context.Context, svcCtx *svc.ServiceContext, parseInfo
|
||||||
logx.Error("上传刀版图到s3失败:", err)
|
logx.Error("上传刀版图到s3失败:", err)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
logx.Info("发送渲染组装数据到unity成功")
|
||||||
return uploadRes.ResourceUrl, nil
|
return uploadRes.ResourceUrl, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,4 @@ AWS:
|
||||||
Secret: sjCEv0JxATnPCxno2KNLm0X8oDc7srUR+4vkYhvm
|
Secret: sjCEv0JxATnPCxno2KNLm0X8oDc7srUR+4vkYhvm
|
||||||
Token:
|
Token:
|
||||||
PythonApi: #python接口
|
PythonApi: #python接口
|
||||||
CombineImageUrl: http://192.168.1.7:45678/LogoCombine #合成刀版图接口
|
CombineImageUrl: http://18.119.109.254:8999/LogoCombine #合成刀版图接口
|
Loading…
Reference in New Issue
Block a user