瀏覽代碼

返回值处理

WH01243 1 年之前
父節點
當前提交
2883094940
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      api/internal/logic/upfilelogic.go

+ 3 - 1
api/internal/logic/upfilelogic.go

@@ -5,6 +5,7 @@ import (
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 	"context"
 	"fmt"
+	"github.com/gogf/gf/v2/util/gconv"
 	"io"
 	"net/http"
 	"net/url"
@@ -70,5 +71,6 @@ func (l *UpFileLogic) UpFile(req *types.UpFileReq) (resp *types.BiResp, err erro
 		FileName:   fileName,
 		FileSize:   fileSize,
 	})
-	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	data := gconv.Map(gconv.UnsafeBytesToStr(res.Data))
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: data}, err
 }