diff --git a/src/api/user.js b/src/api/user.js new file mode 100644 index 0000000..205b410 --- /dev/null +++ b/src/api/user.js @@ -0,0 +1,9 @@ +import request from '@/service' + +export const addUserApi = data => { + return request({ + url: `/account/register`, + method: 'POST', + data, + }) +} diff --git a/src/components/Publish.vue b/src/components/Publish.vue index 2e605c2..03fba30 100644 --- a/src/components/Publish.vue +++ b/src/components/Publish.vue @@ -7,53 +7,32 @@ @reset="onReset" @submit="onSubmit" > - - - - - - - - - - + - - - - - - - + + + 横向 + 纵向 - - - - + - - - - - - - - + + + + {{ item.label }} + + - - + + placeholder="请选择分配的操作员" + > + + {{ item.label }} + + @@ -103,102 +89,31 @@ diff --git a/src/pages/Login.vue b/src/pages/Login.vue index 7dc072c..efbb15c 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -118,7 +118,9 @@ const onSubmit = async ({ validateResult, firstError }) => { // 将token存入store中 accountStore.updateToken(res?.data?.token) accountStore.updateUsername(res?.data?.username) + accountStore.updateRole(res?.data.authorities[0]?.authority) Cookie.setCookie('t', res?.data?.token) + Cookie.setCookie('r', res?.data.authorities[0]?.authority) window.location.href = '/' } else { MessagePlugin.error({ content: '请输入正确的用户名和密码!' }) diff --git a/src/pages/index.vue b/src/pages/index.vue index a95d9e3..0b215ac 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -64,7 +64,7 @@

任务管理中心

-