From 48bb355ddbfb283093a5a7db82c5d03831d258a0 Mon Sep 17 00:00:00 2001 From: "lmxdawn@qq.com" Date: Fri, 6 Jul 2018 18:35:21 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 21 - README.md | 73 ---- src/api/ad/ad.js | 34 ++ src/api/ad/adSite.js | 43 ++ src/api/{ => auth}/authAdmin.js | 2 +- src/api/{ => auth}/authPermissionRule.js | 2 +- src/api/{ => auth}/authRole.js | 2 +- {config => src/config}/env.js | 2 + src/main.js | 2 +- src/pages/adManage/ad.vue | 393 ++++++++++++++++++ src/pages/adManage/adSite.vue | 372 +++++++++++++++++ src/pages/components/uploadList.vue | 2 +- src/pages/user_manage/admin/authAdmin.vue | 2 +- .../user_manage/admin/authPermissionRule.vue | 2 +- src/pages/user_manage/admin/authRole.vue | 2 +- src/router/index.js | 33 +- src/utils/fetch.js | 2 +- 17 files changed, 885 insertions(+), 104 deletions(-) delete mode 100644 LICENSE delete mode 100644 README.md create mode 100644 src/api/ad/ad.js create mode 100644 src/api/ad/adSite.js rename src/api/{ => auth}/authAdmin.js (95%) rename src/api/{ => auth}/authPermissionRule.js (95%) rename src/api/{ => auth}/authRole.js (96%) rename {config => src/config}/env.js (87%) create mode 100644 src/pages/adManage/ad.vue create mode 100644 src/pages/adManage/adSite.vue diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 48e6cf7..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 lmxdawn - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 8a3cf24..0000000 --- a/README.md +++ /dev/null @@ -1,73 +0,0 @@ -

- -

- -

- - vue - - - element-ui - -

-# vue-admin-html - -> 基于Vue.js 2.x系列 + Element UI + RBAC/AUTH权限 的响应式后台管理系统 - -## 前言 ## - -**项目前端地址:** https://github.com/lmxdawn/vue-admin-html - -**项目后端地址:** https://github.com/lmxdawn/vue-admin-php - -欢迎大家的star - -## PC版 -![donate](https://lmxdawn.github.io/images/pc.png) -## 手机版 -![donate](https://lmxdawn.github.io/images/phone.png) -![donate](https://lmxdawn.github.io/images/phone-1.png) - - -## 功能 ## -- [x] 管理员登录 -- [x] 登录 -- [x] 修改密码 -- [x] 角色管理 -- [x] 权限管理 -- [x] 401/404错误页面 -- [x] 动态面包屑 -- [x] 动态侧边栏 - - -## 安装步骤 ## - - git clone https://github.com/lmxdawn/vue-admin-html.git // 把模板下载到本地 - cd vue-admin-html // 进入模板目录 - npm install // 安装项目依赖,等待安装完成之后 - -## 本地开发 ## - - // 开启服务器,浏览器访问 http://localhost:8080 - npm run dev - -## 构建生产 ## - - // 执行构建命令,生成的dist文件夹放在服务器下即可访问 - npm run build - -## Online Demo - (建议使用最新版Chrome浏览器,因为存在跨域) -[在线 Demo](https://lmxdawn.github.io/vue-admin) - -## Donate -鼓励鼓励鼓励,重要的事情说三遍 -![donate](https://lmxdawn.github.io/images/pay.png) - - -## License - -[MIT](https://github.com/lmxdawn/vue-admin-html/blob/master/LICENSE) - -Copyright (c) 2018 lmxdawn - diff --git a/src/api/ad/ad.js b/src/api/ad/ad.js new file mode 100644 index 0000000..57df6e1 --- /dev/null +++ b/src/api/ad/ad.js @@ -0,0 +1,34 @@ +/** + * Created by lk on 17/6/4. + */ +import fetch from '../../utils/fetch' + +// 谁最懂我相关 + +// 列表 +export function adList (query) { + return fetch({ + url: '/admin/ad/index', + method: 'get', + params: query + }) +} + +// 保存 +export function adSave (data, formName, method = 'post') { + var url = formName === 'add' ? '/admin/ad/save' : '/admin/ad/edit' + return fetch({ + url: url, + method: method, + data: data + }) +} + +// 删除 +export function adDelete (data) { + return fetch({ + url: '/admin/ad/delete', + method: 'post', + data: data + }) +} diff --git a/src/api/ad/adSite.js b/src/api/ad/adSite.js new file mode 100644 index 0000000..f6ab813 --- /dev/null +++ b/src/api/ad/adSite.js @@ -0,0 +1,43 @@ +/** + * Created by lk on 17/6/4. + */ +import fetch from '../../utils/fetch' + +// 谁最懂我相关 + +// 列表 +export function adSiteList (query) { + return fetch({ + url: '/admin/ad_site/index', + method: 'get', + params: query + }) +} + +// 广告列表 +export function adSiteAdList (query) { + return fetch({ + url: '/admin/ad_site/adList', + method: 'get', + params: query + }) +} + +// 保存 +export function adSiteSave (data, formName, method = 'post') { + var url = formName === 'add' ? '/admin/ad_site/save' : '/admin/ad_site/edit' + return fetch({ + url: url, + method: method, + data: data + }) +} + +// 删除 +export function adSiteDelete (data) { + return fetch({ + url: '/admin/ad_site/delete', + method: 'post', + data: data + }) +} diff --git a/src/api/authAdmin.js b/src/api/auth/authAdmin.js similarity index 95% rename from src/api/authAdmin.js rename to src/api/auth/authAdmin.js index 1d32c93..06d7643 100644 --- a/src/api/authAdmin.js +++ b/src/api/auth/authAdmin.js @@ -1,7 +1,7 @@ /** * Created by lk on 17/6/4. */ -import fetch from '../utils/fetch' +import fetch from '../../utils/fetch' const API_SUFFIX = process.env.API_SUFFIX diff --git a/src/api/authPermissionRule.js b/src/api/auth/authPermissionRule.js similarity index 95% rename from src/api/authPermissionRule.js rename to src/api/auth/authPermissionRule.js index cc4027c..066bd6e 100644 --- a/src/api/authPermissionRule.js +++ b/src/api/auth/authPermissionRule.js @@ -1,7 +1,7 @@ /** * Created by lk on 17/6/4. */ -import fetch from '../utils/fetch' +import fetch from '../../utils/fetch' const API_SUFFIX = process.env.API_SUFFIX diff --git a/src/api/authRole.js b/src/api/auth/authRole.js similarity index 96% rename from src/api/authRole.js rename to src/api/auth/authRole.js index 4bdc215..ea99814 100644 --- a/src/api/authRole.js +++ b/src/api/auth/authRole.js @@ -1,7 +1,7 @@ /** * Created by lk on 17/6/4. */ -import fetch from '../utils/fetch' +import fetch from '../../utils/fetch' const API_SUFFIX = process.env.API_SUFFIX diff --git a/config/env.js b/src/config/env.js similarity index 87% rename from config/env.js rename to src/config/env.js index 8759062..286a18d 100644 --- a/config/env.js +++ b/src/config/env.js @@ -6,6 +6,8 @@ * imgBaseUrl: 图片所在域名地址 * */ + +// var baseUrl = 'http://www.nihuawocai.com' var baseUrl = process.env.API_BASE // var routerMode = 'history' var routerMode = '' diff --git a/src/main.js b/src/main.js index 10c8298..dd80b4f 100644 --- a/src/main.js +++ b/src/main.js @@ -12,7 +12,7 @@ import './element' import './assets/icons/iconfont' import IconSvg from './components/common/IconSvg.vue'// svg组件 -import './mock' // 模拟数据 +// import './mock' // 模拟数据 // 注册全局组件(register globally) Vue.component('icon-svg', IconSvg) diff --git a/src/pages/adManage/ad.vue b/src/pages/adManage/ad.vue new file mode 100644 index 0000000..fef5c67 --- /dev/null +++ b/src/pages/adManage/ad.vue @@ -0,0 +1,393 @@ + + + + + diff --git a/src/pages/adManage/adSite.vue b/src/pages/adManage/adSite.vue new file mode 100644 index 0000000..8d898c9 --- /dev/null +++ b/src/pages/adManage/adSite.vue @@ -0,0 +1,372 @@ + + + + + diff --git a/src/pages/components/uploadList.vue b/src/pages/components/uploadList.vue index 5f66e19..b6853c9 100644 --- a/src/pages/components/uploadList.vue +++ b/src/pages/components/uploadList.vue @@ -21,7 +21,7 @@