-----------关于axios
1、baseURL:’’, --基础地址,写上接口的服务器地址
2、timeout:30000, --接口的请求时间,30000毫秒=30秒
3、headers:{‘Content-Type’: ‘application/x-www-form-urlencoded’},
–headers请求头,POST请求时,出现Form Data
①application/x-www-form-urlencoded(默认值)
②multipart/form-data
4、import axios from axios 导入
5、export default http 导出
6、如何调用接口:
post请求:this.
h
t
t
p
.
p
o
s
t
(
"
v
1
/
c
o
n
f
i
g
/
d
a
t
a
"
,
f
o
r
m
D
a
t
a
)
g
e
t
请
求
:
t
h
i
s
.
http.post("v1/config/data", formData) get请求:this.
http.post("v1/config/data",formData)get请求:this.http.get(/queryAuditReportData?docCode=${this.formdata.docCode}
)
-----------关于路由
7、mode: ‘history’
–默认hash模式——使用URL的hash来模拟一个完整的URL,于是当URL改变时,页面不会重新加载。
–history模式,利用 history.pushState API 来完成 URL 跳转而无须重新加载页面。
–history.pushState() 方法向当前浏览器会话的历史堆栈中添加一个状态
-----------关于vuex
8、