第一种请求方式:
let customer_id = localStorage.getItem('customer_id')
this.$http.post('/health_record/health_status_list.do',customer_id)
使用这种方式从请求回来的数据是空的
第二种请求方式:
let param = new URLSearchParams();
param.append('customer_id', customer_id);
this.$http({
method: 'post',
url: '/health_record/health_status_list.do',
data: param
})
使用这种方式就有数据
问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
Content-type