Http Method
地址/链接
Optional
options: { 请求配置
Optional
async?: booleanOptional
contentOptional
data?: anyOptional
fail?: anyOptional
params?: anyOptional
raw?: booleanOptional
success?: anyOptional
withxAjax('get', 'https://test.cn', { params: { test: 123, hello: 456 }, success: (data) => console.log('success', data), fail: (error) => console.log('fail', error) }); /// ajax
xAjax('POST', 'https://test.cn', { contentType: 'application/json', data: { test: 123 }, success: (data) => console.log('success', data), fail: (error) => console.log('fail', error) }); /// ajax
ajax 简单封装