|
@@ -8,6 +8,7 @@ import (
|
|
|
"fmt"
|
|
|
"io/ioutil"
|
|
|
"net/http"
|
|
|
+ "strings"
|
|
|
)
|
|
|
|
|
|
// ExcelController 表格详情
|
|
@@ -58,9 +59,14 @@ func (this *ExcelController) ExcelDetail() {
|
|
|
br.ErrMsg = err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ bodyStr := string(b)
|
|
|
+ bodyStr = strings.TrimLeft(bodyStr, `"`)
|
|
|
+ bodyStr = strings.TrimRight(bodyStr, `"`)
|
|
|
+
|
|
|
+ bodyResult := utils.DesBase64Decrypt([]byte(bodyStr), utils.DesKey)
|
|
|
|
|
|
result := new(models.BaseResponse)
|
|
|
- if e = json.Unmarshal(b, &result); e != nil {
|
|
|
+ if e = json.Unmarshal(bodyResult, &result); e != nil {
|
|
|
err = fmt.Errorf("result unmarshal err: %s\nresult: %s", e.Error(), string(b))
|
|
|
br.ErrMsg = err.Error()
|
|
|
return
|