如图显示报错信息为:TypeError: Failed to execute ‘fetch’ on ‘Window’: Request with GET/HEAD method cannot have body.
大意是:未能在"窗口"上执行"fetch":使用 GET/HEAD 方法请求不能具有主体。
原因是因为接口是get,但是又标注以requestbody(请求体)来接收参数。
说明:在get请求体中不能使用@requestBody来做请求的。
1:GET:不能使用@requestBody
2:POST:可以使用@requestBody(对于参数转化的配置必须统一)和requestParam