From 341cbab1b3dc8741b5c535af817a4a9f5a781f11 Mon Sep 17 00:00:00 2001 From: liyanhong <17806274112@163.com> Date: Wed, 13 Nov 2024 17:32:05 +0800 Subject: [PATCH] 1 --- src/api/table.js | 9 - src/api/user.js | 38 +++- src/components/Breadcrumb/index.vue | 10 +- src/layout/components/Navbar.vue | 15 +- src/main.js | 4 +- src/permission.js | 2 +- src/store/modules/user.js | 57 +++-- src/utils/request.js | 19 +- src/views/dashboard/index.vue | 2 +- src/views/form/index.vue | 335 +++++++++++----------------- src/views/login/index.vue | 6 +- src/views/table/index.vue | 152 +++++++------ 12 files changed, 286 insertions(+), 363 deletions(-) delete mode 100644 src/api/table.js diff --git a/src/api/table.js b/src/api/table.js deleted file mode 100644 index 2752f52..0000000 --- a/src/api/table.js +++ /dev/null @@ -1,9 +0,0 @@ -import request from '@/utils/request' - -export function getList(params) { - return request({ - url: '/vue-admin-template/table/list', - method: 'get', - params - }) -} diff --git a/src/api/user.js b/src/api/user.js index 8ff4389..e5865db 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -1,5 +1,5 @@ import request from '@/utils/request' - +// 登录 export function login(data) { return request({ url: '/vue-admin-template/user/login', @@ -7,7 +7,7 @@ export function login(data) { data }) } - +// 用户信息 export function getInfo(token) { return request({ url: '/vue-admin-template/user/info', @@ -15,10 +15,42 @@ export function getInfo(token) { params: { token } }) } - +// 登出 export function logout() { return request({ url: '/vue-admin-template/user/logout', method: 'post' }) } +// 推广人注册 +export function register(data) { + return request({ + url: '/api/promoter/register', + method: 'post', + data + }) +} +// 图片上传 +export function upload(data) { + return request({ + url: '/api/public/upload', + method: 'post', + data + }) +} +// 所在地区 +export function getArea(data) { + return request({ + url: '/api/public/areas', + method: 'post', + data + }) +} +// 进件列表 +export function getApplyList(data) { + return request({ + url: '/api/promoter/account_list', + method: 'post', + data + }) +} diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 29f9a04..44d1613 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -29,12 +29,12 @@ export default { methods: { getBreadcrumb() { // only show routes with meta.title - let matched = this.$route.matched.filter(item => item.meta && item.meta.title) - const first = matched[0] + const matched = this.$route.matched.filter(item => item.meta && item.meta.title) + // const first = matched[0] - if (!this.isDashboard(first)) { - matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) - } + // if (!this.isDashboard(first)) { + // matched = [{ path: '/dashboard', meta: { title: '推广人' }}].concat(matched) + // } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) }, diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 0ca5cf6..2e06b7b 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -7,21 +7,10 @@