vue使用resource发送ajax请求
来源:互联网 发布:网络游戏服务器编程 编辑:程序博客网 时间:2024/06/11 06:05
不简写
getcode:function(){ this.$http({ method:'POST', url:'/mobile/edit', data:{'a':'123124'}, headers: {"X-Requested-With": "XMLHttpRequest"}, }).then(function(response){ this.posts=response.data; },function(error){ alert('数据插入失败,请稍后重试') }) }
简写发送get请求
this.$http.get('data.php').then(function(response){ this.posts=response.data;})
简写发送post请求
this.$http.post('data.php').then(function(response){ this.posts=response.data;})
0 0
- vue使用resource发送ajax请求
- 使用vue-resource请求数据
- ajax请求插件vue-resource的学习
- ajax请求插件vue-resource的学习
- ajax请求插件vue-resource的学习
- vuejs中vue-resource或使用axios发送请求及解决跨域问题
- Vue-resource实现ajax请求和跨域请求
- vue项目使用axios发送请求让ajax请求头部携带cookie
- ajax 跨域请求 vue-resource jsonp跨域
- vue+vue-resource post请求
- 使用jQuery发送Ajax请求
- 使用jquery发送ajax请求
- vue开发-使用axios发送请求
- Vue-resource实现ajax请求和跨域请求--李帅醒博客
- vue-resource+jquery+axios请求
- vue的ajax库 ----- vue-resource
- vue-resource插件使用
- vue-resource插件使用
- ffmpeg学习三:《FFmpeg Basics》读书笔记(下)
- Linux文件系统以及目录结构简介
- 创建输入法指南
- 第三章_万物皆对象
- 名词性从句 - 宾语从句
- vue使用resource发送ajax请求
- Android Handler消息机制源码解析(下)
- 数据集中不确定数据列的报表制作
- Android工具类(历史最全)
- 设计模式之(单例模式)
- OpenCV入门阶段环境搭建 opencv2.4.9+VS2010
- SpringMvc教程(三)--核心流程图
- 人脸对齐:Face Alignment at 3000 FPS via Regressing Local Binary Features
- 数据类型(3)