解决 vue axios 带 header 时,会默认发起 OPTIONS 请求的方法的问题
This commit is contained in:
@@ -71,5 +71,33 @@ export function ExchangeCoupon(code){
|
||||
})
|
||||
}
|
||||
|
||||
export function getUserInfo() {
|
||||
return request({
|
||||
url: 'user-api/users/user/info',
|
||||
method: 'get',
|
||||
headers: {
|
||||
test: 1,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function doPassportMobileRegister(mobile, code) {
|
||||
return request({
|
||||
url: 'user-api/users/passport/mobile/register',
|
||||
method: 'post',
|
||||
params: {
|
||||
mobile,
|
||||
code,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function doPassportMobileSendRegisterCode(mobile) {
|
||||
return request({
|
||||
url: 'user-api/users/passport/mobile/send_register_code',
|
||||
method: 'post',
|
||||
params: {
|
||||
mobile,
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user