因为有规定必须用post提交
example:
vue:

withdrawCount(){
    let formData = new FormData();
    formData.append("date",this.date);
    withdrawCount(formData).then(response => {

    });
},

js:

export function withdrawCount(query) {
    return fetch({
        url: commonUrl + '/withdrawCount',
        method: 'POST',
        data: query
    });
}

后台:

@PostMapping(value = "withdrawCount")
public Object withdrawCount(@RequestParam(required = true) int date) {
    return new UpmsResult(UpmsResultConstant.SUCCESS, dashboardService.withdrawCount(date));
}

如果传对象直接使用注解@RequestBody

Logo

前往低代码交流专区

更多推荐