添加get

This commit is contained in:
sunnie 2020-04-22 17:49:25 +08:00
parent eca985dd36
commit 6f9a717070
3 changed files with 13 additions and 4 deletions

View File

@ -522,7 +522,7 @@ import request from '@/utils/request'
export function getUserInfo(params) {
return request({
url: '/user/userinfo',
method: 'get',
method: 'post',
data: qs.stringify(params),
hideloading: true // 隐藏 loading 组件
})

View File

@ -11,12 +11,21 @@ export function login(params) {
data: qs.stringify(params)
})
}
// 用户信息
// 用户信息 post 方法
export function getUserInfo(params) {
return request({
url: '/user/userinfo',
method: 'get',
method: 'post',
data: qs.stringify(params),
hideloading: true
})
}
// 用户名称 get 方法
export function getUserName(params) {
return request({
url: '/user/name?' + qs.stringify(params),
method: 'get',
hideloading: true
})
}

View File

@ -5,7 +5,7 @@
<div class="list">
<div class="logo"></div>
<div class="demo-home__title"> VUE H5开发模板</div>
<div class="item">项目地址: <a href="https://github.com/sunniejs">https://github.com/sunniejs</a></div>
<div class="item">项目地址: <a href="https://github.com/sunniejs/vue-h5-template">https://github.com/sunniejs/vue-h5-template</a></div>
<div class="item">项目作者: sunnie</div>
<div class="item"></div>