Skip to content

Commit

Permalink
feat(system-client): add application user apis
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Aug 31, 2021
1 parent d36bc50 commit 0883253
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
12 changes: 12 additions & 0 deletions packages/system-client/src/api/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import request from '@/utils/request'

/**
* 请求我的应用
* @returns 返回我的应用列表
*/
export function getMyApplications() {
return request({
url: '/apps/my',
method: 'get'
})
}
18 changes: 9 additions & 9 deletions packages/system-client/src/api/user.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
import request from '@/utils/request'

/**
* 管理员登录
* 账户登录
* @param {username: string, password: string} data
* @returns
*/
export function login(data) {
return request({
url: '/admin/login',
url: '/account/login',
method: 'post',
data
})
}

/**
* 获取管理员信息
* 获取帐户信息
* @param {string} token
* @returns
*/
export function getInfo() {
return request({
url: '/admin/info',
url: '/account/profile',
method: 'get'
})
}

/**
* 添加管理员
* 注册帐户
*/
export function add(data) {
export function signup(data) {
return request({
url: '/admin/add',
url: '/account/signup',
method: 'post',
data
})
}

/**
* 编辑管理员
* 编辑帐户信息
*/
export function edit(data) {
return request({
url: '/admin/edit',
url: '/account/edit',
method: 'post',
data
})
Expand Down

0 comments on commit 0883253

Please sign in to comment.