修改健康包 多点执业的判断
This commit is contained in:
@@ -58,52 +58,6 @@ func getRequestUrlParams(userId string) (bool, string) {
|
||||
return true, queryString
|
||||
}
|
||||
|
||||
//
|
||||
// // 统一请求
|
||||
// func postRequest(url string, requestBody []byte) (map[string]interface{}, error) {
|
||||
// responseMap := make(map[string]interface{})
|
||||
//
|
||||
// // 发起 POST 请求
|
||||
// resp, err := http.Post(url, "application/json", bytes.NewBuffer(requestBody))
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// defer func(Body io.ReadCloser) {
|
||||
// _ = Body.Close()
|
||||
// }(resp.Body)
|
||||
//
|
||||
// body, err := io.ReadAll(resp.Body)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// err = json.Unmarshal([]byte(string(body)), &responseMap)
|
||||
// if err != nil {
|
||||
// // json解析失败
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// if responseMap == nil {
|
||||
// return nil, errors.New("请求im失败")
|
||||
// }
|
||||
//
|
||||
// if _, ok := responseMap["ErrorCode"]; ok {
|
||||
// errorCode := responseMap["ErrorCode"].(int)
|
||||
// if errorCode != 0 {
|
||||
// if errorInfo, ok := responseMap["ErrorInfo"].(string); ok {
|
||||
// return nil, errors.New(errorInfo)
|
||||
// } else {
|
||||
// return nil, errors.New("请求im失败")
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// return nil, errors.New("请求im失败")
|
||||
// }
|
||||
//
|
||||
// return responseMap, nil
|
||||
// }
|
||||
|
||||
// 统一请求
|
||||
func postRequest(url string, requestBody []byte) (*responseData, error) {
|
||||
var responseData responseData
|
||||
|
||||
Reference in New Issue
Block a user