fix GC parse data
This commit is contained in:
		
							parent
							
								
									f9046088ea
								
							
						
					
					
						commit
						68fe77da6c
					
				| 
						 | 
					@ -1,6 +1,10 @@
 | 
				
			||||||
package globalcare
 | 
					package globalcare
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import "encoding/json"
 | 
					import (
 | 
				
			||||||
 | 
						"encoding/json"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"github.com/Selly-Modules/3pl/util/base64"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// CommonResponse ...
 | 
					// CommonResponse ...
 | 
				
			||||||
type CommonResponse struct {
 | 
					type CommonResponse struct {
 | 
				
			||||||
| 
						 | 
					@ -28,7 +32,8 @@ func (r *CommonResponse) DecodeError() (res ResponseError, err error) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Decode ...
 | 
					// Decode ...
 | 
				
			||||||
func (r *CommonResponse) Decode(resultPointer interface{}) error {
 | 
					func (r *CommonResponse) Decode(resultPointer interface{}) error {
 | 
				
			||||||
	return json.Unmarshal([]byte(r.Data), resultPointer)
 | 
						b := base64.Decode(r.Data)
 | 
				
			||||||
 | 
						return json.Unmarshal(b, resultPointer)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// CreateOrderResponseDecoded ...
 | 
					// CreateOrderResponseDecoded ...
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue