前端模块之登录
来源:互联网 发布:iphone4s越狱软件 编辑:程序博客网 时间:2024/05/21 14:01
记住密码
除了普通的记住,有时候还会有时间限制
自动登录
请求配置
{ // `url` 是用于请求的服务器URL url: '/user', // `method` 是在发出请求时使用的请求方法 method: 'get', // default // `baseURL` 将会作为 `url`的前缀 ,除非 `url` 是绝对路径 // 设置baseURL以传递相对url是很方便的。 // 对当前实例有效 baseURL: 'https://some-domain.com/api/', // `transformRequest` allows changes to the request data before it is sent to the server // This is only applicable for request methods 'PUT', 'POST', and 'PATCH' // The last function in the array must return a string or an ArrayBuffer transformRequest: [function (data) { // Do whatever you want to transform the data return data; }], // `transformResponse` allows changes to the response data to be made before // it is passed to then/catch transformResponse: [function (data) { // Do whatever you want to transform the data return data; }], // `headers` are custom headers to be sent headers: {'X-Requested-With': 'XMLHttpRequest'}, // `params` 是要用请求发送的URL参数 如url?id=12345 params: { ID: 12345 }, // `paramsSerializer` is an optional function in charge of serializing `params` // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/) paramsSerializer: function(params) { return Qs.stringify(params, {arrayFormat: 'brackets'}) }, // `data` 是作为请求主体发送的数据,也就真正想要上传的数据 // 只适用于请求方法 'PUT', 'POST', 和 'PATCH' // 当没有 `transformRequest` 被设置时, 必须是一个字符串,数组缓冲区或者哈希 data: { firstName: 'Fred' }, // `timeout` specifies the number of milliseconds before the request times out. // If the request takes longer than `timeout`, the request will be aborted. timeout: 1000, // `withCredentials` indicates whether or not cross-site Access-Control requests // should be made using credentials withCredentials: false, // default // `adapter` allows custom handling of requests which makes testing easier. // Call `resolve` or `reject` and supply a valid response (see [response docs](#response-api)). adapter: function (resolve, reject, config) { /* ... */ }, // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. // This will set an `Authorization` header, overwriting any existing // `Authorization` custom headers you have set using `headers`. auth: { username: 'janedoe', password: 's00pers3cret' } // `responseType` indicates the type of data that the server will respond with // options are 'arraybuffer', 'blob', 'document', 'json', 'text' responseType: 'json', // default // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token xsrfCookieName: 'XSRF-TOKEN', // default // `xsrfHeaderName` is the name of the http header that carries the xsrf token value xsrfHeaderName: 'X-XSRF-TOKEN', // default // `progress` allows handling of progress events for 'POST' and 'PUT uploads' // as well as 'GET' downloads progress: function(progressEvent) { // Do whatever you want with the native progress event }}
二级标题
三级标题
四级标题
注:
阅读全文
0 0
- 前端模块之登录
- 前端模块之数据
- 前端之页面模块
- php实现前端的登录登出模块
- web-前端之登录界面
- 前端之用户登录页面
- 项目常用模块之异步登录
- Python之tkinter模块实现登录功能
- 登录模块
- 登录模块
- 登录模块
- iOS转前端之仿写登录页面
- 前端学习笔记之5 静态页面练习(登录)
- 前端面试之模块化-1、模块的写法
- 前端面试之模块化-1、模块的写法
- 利用CAS之SSO模块实现单点登录认证
- 百思不得姐之立即登录注册模块(五)
- web学习之博客小项目(登录注册模块)
- 两行代码去掉顶部标题栏
- 陆历川的宝藏
- 洛谷P1081:开车旅行 (Treap+倍增)
- jquery组织默认行为事件
- MFC列表控件
- 前端模块之登录
- Java--File类
- 树莓派用HDMI-VGA转换器显示屏提示VGA Input: No Input Signal后黑屏
- CodeForces 855C Helga Hufflepuff's Cup(树形dp)
- 超全面的JavaWeb笔记day15<mysql数据库>
- chrome jsonView插件安装
- vue按需引入element Transfer 穿梭框
- Java--枚举
- jquery完成表单验证