|
本帖最后由 penghao@wifi.co 于 2019-10-9 15:51 编辑
可以修改origin吗,为什么我改了后,发送接口,还是无效呢?
fetch.fetch({
url: 'https://zp.lianwangtech.com/v2/resumes',
data: {
f: 2,
r: JSON.stringify(this.formQuery),
wp: 'eyJ0cyI6MTU3MDYwMzUyMDI0MiwiZyI6ImU2ZmI4Y2YwLTAxMzQtMTVmMC1kZDI2LWM3YzQzZDQzNjQ0ZCIsInAiOiIiLCJiIjoienAiLCJ2IjoiNDk4MTIzZjM0NjM4ZjMyMzVkYzRjMWVkZmE2ZWQ0M2EwZDcyZjIxYiIsImQiOiIiLCJzIjoiIiwiaW0iOiIiLCJhbmlkIjoiMjllNDJmN2FhOTZhODYxNiIsImNoYW5uZWwiOiJvZmZpY2lhbCIsInBnIjp7InB0Ijo0LCJmcHQiOiIyIn0sImFiIjoiIiwiYSI6MTAsImFwIjp7ImZyb21CdG4iOiIifX0%3D'
},
responseType: 'json',
method: 'POST',
mode: 'cors',
header: {
'content-type': 'application/json',
'origin':'https://zp.lianwangtech.com'
},
success: (res) => {
let apiData = res.data;
if (apiData.errorCode === 0) {
prompt.showDialog({
title: '提示',
message: '创建成功'
})
} else {
prompt.showDialog({
title: '提示',
message: apiData.msg
})
}
},
fail: (err) => {
console.log('err-1', err);
}
});
|
-
接口请求
-
接口返回
-
这是H5端正常跨域提交的请求截图
|