Browse Source

返回值处理

WH01243 1 year ago
parent
commit
2883094940
1 changed files with 3 additions and 1 deletions
  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
 }