|
@@ -44,11 +44,18 @@ func TouChuan(host string, o Operation, data []byte, c *gin.Context) (resp any,
|
|
|
response.FailWithDetailed(resp.(ResponseStatus), err.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
- _, ok := resp.(ResponseStatus)
|
|
|
+ //断言成功,说明是配置响应,检查配置结果
|
|
|
+ r, ok := resp.(ResponseStatus)
|
|
|
if ok {
|
|
|
- response.OkWithDetailed(resp, "操作成功", c)
|
|
|
- return
|
|
|
+ if r.StatusCode == 0 || r.StatusCode == 1 {
|
|
|
+ response.OkWithDetailed(resp, "操作成功", c)
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ response.FailWithDetailed(resp, "操作失败,请联系管理员", c)
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
+ //断言失败,说明是查询响应,直接返回数据
|
|
|
response.OkWithData(resp, c)
|
|
|
return
|
|
|
}
|