From 08832536cd90a8fb81566b40238c1a3116f1de80 Mon Sep 17 00:00:00 2001 From: maslow Date: Tue, 31 Aug 2021 19:54:04 +0800 Subject: [PATCH] feat(system-client): add application user apis --- packages/system-client/src/api/application.js | 12 ++++++++++++ packages/system-client/src/api/user.js | 18 +++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 packages/system-client/src/api/application.js diff --git a/packages/system-client/src/api/application.js b/packages/system-client/src/api/application.js new file mode 100644 index 0000000000..bffeaa8bef --- /dev/null +++ b/packages/system-client/src/api/application.js @@ -0,0 +1,12 @@ +import request from '@/utils/request' + +/** + * 请求我的应用 + * @returns 返回我的应用列表 + */ +export function getMyApplications() { + return request({ + url: '/apps/my', + method: 'get' + }) +} diff --git a/packages/system-client/src/api/user.js b/packages/system-client/src/api/user.js index 337fa6c34b..44e4a8f9af 100644 --- a/packages/system-client/src/api/user.js +++ b/packages/system-client/src/api/user.js @@ -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 })