cos upload
2
.vscode/settings.json
vendored
@@ -5,7 +5,7 @@
|
||||
"editor.quickSuggestions": {
|
||||
"strings": true
|
||||
},
|
||||
"workbench.colorTheme": "One Monokai",
|
||||
"workbench.colorTheme": "Default Dark Modern",
|
||||
"editor.tabSize": 2,
|
||||
"editor.detectIndentation": false,
|
||||
"emmet.triggerExpansionOnTab": true,
|
||||
|
||||
287
README.md
@@ -1,287 +0,0 @@
|
||||
<div>
|
||||
|
||||
简体中文 | [English](./README.en.md)
|
||||
|
||||
<div align="center"><img width="200" src="https://gcore.jsdelivr.net/gh/zxwk1998/image/logo/vab.png"/>
|
||||
<h1> vue-admin-better</h1>
|
||||
<p>瑞雪兆丰年,红梅报新春,愿您新的一年平安喜乐,万事顺意,所得皆所愿!</p>
|
||||
</div>
|
||||
|
||||
[](https://github.com/zxwk1998/vue-admin-better)
|
||||
[](https://gitee.com/chu1204505056/vue-admin-better)
|
||||
[](https://en.wikipedia.org/wiki/MIT_License)
|
||||
|
||||
---
|
||||
|
||||
<!-- ## 🎉 全新版本
|
||||
|
||||
基于 vite5.x + vue3.x + arco-design2.x 全新的前端框架 vue-admin-arco, 欢迎点击查看或试用 👏🏻👏🏻👏🏻
|
||||
|
||||
[开源地址](https://github.com/zxwk1998/vue-admin-arco) | [演示地址](https://vuejs-core.cn/vue-admin-arco) -->
|
||||
|
||||
## 🎉 特性
|
||||
|
||||
- 💪 40+高质量单页
|
||||
- 💅 RBAC 模型 + JWT 权限控制
|
||||
- 🌍 10 万+ 项目实际应用
|
||||
- 👏 良好的类型定义
|
||||
- 🥳 开源版本支持免费商用
|
||||
- 🚀 跨平台 PC、手机端、平板
|
||||
- 📦️ 后端路由动态渲染
|
||||
|
||||
## 🌐 付费版演示地址
|
||||
|
||||
- [🚀 Vue Admin Pro 演示地址(vue2.x + element-ui 2.x 付费版本,支持 PC、平板、手机)](https://vuejs-core.cn/admin-pro/)
|
||||
|
||||
- [🚀 Vue Admin Plus 演示地址(vue3.x + element-plus 2.x 付费版本,支持 PC、平板、手机)](https://vuejs-core.cn/admin-plus/)
|
||||
|
||||
- [🚀 Vue Shop Vite 演示地址(vue3.x + vite 5.x + element-plus 2.x 付费版本,支持 PC、平板、手机)](https://vuejs-core.cn/shop-vite/)
|
||||
|
||||
- [📌 Vue Admin Pro 及 Vue Admin Plus 购买地址](https://vuejs-core.cn/authorization/)
|
||||
|
||||
- [📌 Vue Shop Vite 购买地址](https://vuejs-core.cn/authorization/shop-vite.html)
|
||||
|
||||
<!-- ## 🔊 温馨提示
|
||||
|
||||
近期,我们发现少数不法互联网用户通过 IDC 云服务器、代理 ip、本地计算机等方式对我们的演示地址,发起了大规模攻击,包括但不限于 DDOS 攻击、SQL 注入、大文件上传、端口扫描、目录扫描等方式,我们已第一时间通过技术手段追踪到其攻击服务器部署的网站内容,并由此推断出其所入职公司或相关联的公司,望其迷途知返,切勿再做损人不利己的事情。我们不清楚其这样做的原因,也不愿意通过以牙还牙,以眼还眼的方式,将事态扩大,为保障正常用户的访问演示地址的体验,提升访问速度,目前,演示地址已采取以下防范措施:
|
||||
|
||||
- 1、演示地址服务器已购买 DDOS 高防包,有效防止了大多数恶意攻击。
|
||||
- 2、演示地址服务器已禁止.git、.svn、.env、.php 等后缀文件访问,单个 ip 累计访问以上文件超过 20 次,将被永久封禁,并无法再次打开演示地址。
|
||||
- 3、演示地址每晚 3 点进行备份恢复、重启服务器操作,预计将有 2 到 3 分钟访问超时。
|
||||
- 4、演示地址已加入恶意 ip 共享计划,对于存在恶意扫描服务器端口、服务器文件的问题 ip,我们将立即封禁,并同步至云服务器厂商恶意 ip 名单。
|
||||
|
||||
以上措施真实有效,正常用户切勿因好奇前去尝试 DDOS 高防包的准确性,采取以上措施,实属迫不得已,地球这么大,容得下每一个前端框架,希望大家在各自的人生里各自发光,把余下的时间多用来陪陪家人孩子。(温馨提示:如果您发现自己的 ip 被误封,可联系微信客服申请解除)。 -->
|
||||
|
||||
## 🌐 免费版演示地址
|
||||
|
||||
- [🎉 Vue Admin Better (vue2.x + element-ui 免费商用,支持 PC、平板、手机)](https://vuejs-core.cn/vue-admin-better)
|
||||
|
||||
<!-- - [⚡️ vue3.x + element-plus(alpha 版本,免费商用,支持 PC、平板、手机)](https://vuejs-core.cn/vue-admin-better-plus/) -->
|
||||
|
||||
<!-- - [⚡️ Vue Admin Ant (vue3.x + ant-design-vue 免费商用,支持 PC、平板、手机)](https://vuejs-core.cn/vue-admin-better-antdv/) -->
|
||||
|
||||
- [⚡️ Vue Admin Arco (vue3.x + vite5.x + arco2.x 免费商用,支持 PC)](https://vuejs-core.cn/vue-admin-arco/)
|
||||
|
||||
## 🌐 仓库地址
|
||||
|
||||
- [🌐 vue2.x github 仓库地址](https://github.com/zxwk1998/vue-admin-better/)
|
||||
|
||||
- [🌐 vue3.x github 仓库地址](https://github.com/zxwk1998/vue-admin-arco/)
|
||||
|
||||
- [🌐 vue2.x 码云仓库地址](https://gitee.com/chu1204505056/vue-admin-better/)
|
||||
|
||||
- [🌐 vue3.x 码云仓库地址](https://gitee.com/chu1204505056/vue-admin-arco/)
|
||||
|
||||
## 🍻 前端讨论 QQ 群
|
||||
|
||||
- 请我们喝杯咖啡,打赏后联系 QQ 783963206 邀请您进入讨论群(由于用户数较多,如果您打赏后未通过好友请求,可以尝试多加几次),不管您请还是不请,您都可以享受到开源的代码,感谢您的支持和信任,群内提供
|
||||
vue-admin-better 基础版本、开发工具自动配置教程及项目开发文档。
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img width="200px" src="https://gcore.jsdelivr.net/gh/zxwk1998/image/zfb_kf.jpg">
|
||||
</td>
|
||||
<td>
|
||||
<img width="200px" src="https://gcore.jsdelivr.net/gh/zxwk1998/image/qq_group/vab-2.jpg">
|
||||
</td>
|
||||
<td>
|
||||
<img width="200px" src="https://gcore.jsdelivr.net/gh/zxwk1998/image/qq_group/vab-3.jpg">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 📦️ 桌面应用程序
|
||||
|
||||
- [Admin Pro](https://gitee.com/chu1204505056/microsoft-store/raw/master/AdminPlus.zip)
|
||||
- [Admin Plus](https://gitee.com/chu1204505056/microsoft-store/raw/master/AdminPlus.zip)
|
||||
|
||||
<!-- ## 🌱 vue3.x vue3.0-antdv 分支(ant-design-vue)[点击切换分支](https://github.com/zxwk1998/vue-admin-better/tree/vue3.0-antdv)
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
git clone -b vue3.0-antdv https://github.com/zxwk1998/vue-admin-better.git
|
||||
# 安装依赖
|
||||
npm i --registry=http://mirrors.cloud.tencent.com/npm/
|
||||
# 本地开发 启动项目
|
||||
npm run serve
|
||||
``` -->
|
||||
|
||||
## 🌱 vue3.x arco-design [点击切换仓库](https://github.com/zxwk1998/vue-admin-arco)
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
git clonehttps://github.com/zxwk1998/vue-admin-arco.git
|
||||
# 安装依赖
|
||||
npm i --registry=http://mirrors.cloud.tencent.com/npm/
|
||||
# 本地开发 启动项目
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 🌱vue2.x master 分支(element-ui)[点击切换分支](https://github.com/zxwk1998/vue-admin-better/tree/master)
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
git clone -b master https://github.com/zxwk1998/vue-admin-better.git
|
||||
# 安装依赖
|
||||
npm i --registry=http://mirrors.cloud.tencent.com/npm/
|
||||
# 本地开发 启动项目
|
||||
npm run serve
|
||||
```
|
||||
|
||||
## 🔊 友情链接
|
||||
|
||||
- [OPSLI 基于 vue-admin-better 开源版的最佳实践](https://github.com/hiparker/opsli-boot)
|
||||
|
||||
- [uView uni-app 生态最优秀的 UI 框架](https://github.com/YanxinNet/uView/)
|
||||
|
||||
- [form-generator Element 表单设计代码生成器](https://github.com/JakHuang/form-generator/)
|
||||
|
||||
- [wangEditor 国产最强开源富文本编辑](https://github.com/wangeditor-team/wangEditor)
|
||||
|
||||
## 🙈 赞助
|
||||
|
||||
- 如果您觉得 vue admin better 帮到了您 ,如果情况允许,您可以选择赞助以下项目
|
||||
|
||||
<a title="vue" href="https://opencollective.com/vuejs" target="_blank">
|
||||
<img width="64px" src="https://gcore.jsdelivr.net/gh/zxwk1998/image/vue.png"/>
|
||||
</a>
|
||||
<a title="element-plus" href="https://opencollective.com/element-plus" target="_blank">
|
||||
<img width="64px" src="https://gcore.jsdelivr.net/gh/zxwk1998/image/element-plus.png"/>
|
||||
</a>
|
||||
<a title="ant-design-vue" href="https://opencollective.com/ant-design-vue" target="_blank">
|
||||
<img width="64px" src="https://images.opencollective.com/ant-design-vue/2ec179b/logo/256.png"/>
|
||||
</a>
|
||||
|
||||
## 👷 框架杰出贡献者
|
||||
|
||||
<a href="https://github.com/fwfmiao" target="_blank">
|
||||
<img width="50px" style="border-radius:999px" src="https://avatars.githubusercontent.com/u/29328241?s=50"/>
|
||||
</a>
|
||||
<a href="https://github.com/buuing" target="_blank">
|
||||
<img width="50px" style="border-radius:999px" src="https://avatars.githubusercontent.com/u/36689704?s=50"/>
|
||||
</a>
|
||||
<a href="https://github.com/hipi" target="_blank">
|
||||
<img width="50px" style="border-radius:999px" src="https://avatars.githubusercontent.com/u/22478003?s=50"/>
|
||||
</a>
|
||||
<a href="https://github.com/hdtopku" target="_blank">
|
||||
<img width="50px" style="border-radius:999px" src="https://avatars.githubusercontent.com/u/14859466?s=50"/>
|
||||
</a>
|
||||
<a href="https://github.com/shaonialife" target="_blank">
|
||||
<img width="50px" style="border-radius:999px" src="https://avatars.githubusercontent.com/u/16135960?s=50"/>
|
||||
</a>
|
||||
<a href="https://github.com/1511578084" target="_blank">
|
||||
<img width="50px" style="border-radius:999px" src="https://avatars.githubusercontent.com/u/24790218?s=50"/>
|
||||
</a>
|
||||
<a href="https://github.com/Arooba-git" target="_blank">
|
||||
<img width="50px" style="border-radius:999px" src="https://avatars.githubusercontent.com/u/56495631?s=50"/>
|
||||
</a>
|
||||
|
||||
## 📌 优势及注意事项
|
||||
|
||||
```
|
||||
对比其他开源 admin 框架有如下优势:
|
||||
1. 支持前端控制路由权限 intelligence、后端控制路由权限 all 模式
|
||||
2. 已知开源 vue admin 框架中首家支持 mock 自动生成自动导出功能
|
||||
3. 提供 50 余项全局精细化配置
|
||||
4. 支持 scss 自动排序,eslint 自动修复
|
||||
5. axios 精细化封装,支持多数据源、多成功 code 数组,支持 application/json;charset=UTF-8、application/x-www-form-urlencoded;charset=UTF-8 多种传参方式
|
||||
6. 支持登录RSA加密
|
||||
7. 支持打包自动生成7Z压缩包
|
||||
8. 支持errorlog错误拦截
|
||||
9. 支持多主题、多布局切换
|
||||
|
||||
使用注意事项:
|
||||
1. 项目默认使用lf换行符而非crlf换行符,新建文件时请注意选择文件换行符
|
||||
2. 项目默认使用的最严格的eslint校验规范(plugin:vue/recommended),使用之前建议配置开发工具实现自动修复(建议使用vscode开发)
|
||||
3. 项目使用的是要求最宽泛的MIT开源协议,保留MIT开源协议即可免费商用
|
||||
|
||||
```
|
||||
|
||||
## 💚 适合人群
|
||||
|
||||
- 正在以及想使用 element-ui/element-plus 开发,前端开发经验 1 年+。
|
||||
- 熟悉 Vue.js 技术栈,使用它开发过几个实际项目。
|
||||
- 对原理技术感兴趣,想进阶和提升的同学。
|
||||
|
||||
## 🎨 Star
|
||||
|
||||
[](https://github.com/zxwk1998/vue-admin-better/stargazers)
|
||||
|
||||
## ✨ Fork
|
||||
|
||||
[](https://github.com/zxwk1998/vue-admin-better/network/members)
|
||||
|
||||
## 🎉 功能地图
|
||||
|
||||

|
||||
|
||||
## 🗃️ 效果图
|
||||
|
||||
以下是截取的是 pro 版的效果图展示:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/2.png">
|
||||
</td>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/6.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/8.png">
|
||||
</td>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/9.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/3.png">
|
||||
</td>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/5.png">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
以下是截取的是 shop 版的效果图展示:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/16.png">
|
||||
</td>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/17.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/18.png">
|
||||
</td>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/19.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/20.png">
|
||||
</td>
|
||||
<td>
|
||||
<img src="https://gcore.jsdelivr.net/gh/zxwk1998/image/21.png">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 📄 商用注意事项
|
||||
|
||||
开源版本可免费用于商业用途,如果方便就留个 Star 吧
|
||||
|
||||
<!-- ,请遵守 MIT 协议并保留作者技术支持声明,当然如果不愿意保留可以删掉,毕竟我也拿您没办法,能帮到您也当是给自己积德了,至于[Admin](https://vuejs-core.cn/admin-plus/)、[Shop](https://vuejs-core.cn/shop-vite/) 的付费版本的相关说明如下:
|
||||
本人只参与了前期小部分的开发,所以不必跟开源版做对比,同事的代码功底比我好太多,我自愧不如,关于买这件事,没有强买强卖,您愿意买就买,不愿意买就忽略。我们不高尚,写代码就是为了养家糊口,不是为了用爱发电。这几年看到那么多开源项目借鉴了我们付费版本的布局、主题配置的灵感和创意,一开始我是鄙视的,现在还好状态调整过来了,能够被借鉴,被讨论恰好说明了我们的产品有价值,为了产品卖的更好我们也必须更加用心的去维护付费版本以保持我们产品的竞争力。
|
||||
当然,最后还有几句话不得不说,身处互联网由盛转衰的大变革的洪流中,能活下来就已经是千难万难了,希望所有的程序员哥哥姐姐们,早日实现自己的梦想,完成自己的心愿,也想对刚要毕业准备做一名程序员的学弟学妹们说几句,互联网行业没有你们想象的那么高大上,如果想成为一名程序员那就做好加班的准备,如果有更好的选择那就别选这个行业了。 -->
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
webpackBarName: '',
|
||||
webpackBarName: '管理后台',
|
||||
webpackBanner: '',
|
||||
donationConsole() {
|
||||
const chalk = require('chalk')
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 15 KiB |
47
src/api/banner.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(data) {
|
||||
return request({
|
||||
url: '/management/api/banner/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doAdd(data) {
|
||||
return request({
|
||||
url: '/management/api/banner',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doEdit(id, data) {
|
||||
return request({
|
||||
url: `/management/api/banner/${id}`,
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doDelete(data) {
|
||||
return request({
|
||||
url: '/management/api/banner/delete',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doMoveUp(id) {
|
||||
return request({
|
||||
url: `/management/api/banner/moveUp/${id}`,
|
||||
method: 'patch',
|
||||
})
|
||||
}
|
||||
|
||||
export function doMoveDown(id) {
|
||||
return request({
|
||||
url: `/management/api/banner/moveDown/${id}`,
|
||||
method: 'patch',
|
||||
})
|
||||
}
|
||||
40
src/api/miniAnli.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(data) {
|
||||
return request({
|
||||
url: '/management/api/article/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doAdd(data) {
|
||||
return request({
|
||||
url: '/management/api/article',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doDelete(data) {
|
||||
return request({
|
||||
url: '/management/api/article/delete',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function getArticle(id) {
|
||||
return request({
|
||||
url: `/management/api/article/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function doEdit(id, data) {
|
||||
return request({
|
||||
url: `/management/api/article/${id}`,
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function getList(data) {
|
||||
return request({
|
||||
url: '/management/api/role/list',
|
||||
url: '/management/api/article/category/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function getList(data) {
|
||||
|
||||
export function doAdd(data) {
|
||||
return request({
|
||||
url: '/management/api/role',
|
||||
url: '/management/api/article/category',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function doAdd(data) {
|
||||
|
||||
export function doEdit(id, data) {
|
||||
return request({
|
||||
url: `/management/api/role/${id}`,
|
||||
url: `/management/api/article/category/${id}`,
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
@@ -26,7 +26,7 @@ export function doEdit(id, data) {
|
||||
|
||||
export function doDelete(data) {
|
||||
return request({
|
||||
url: '/management/api/role/delete',
|
||||
url: '/management/api/article/category/delete',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
|
||||
47
src/api/miniMember.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(data) {
|
||||
return request({
|
||||
url: '/management/api/member/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doAdd(data) {
|
||||
return request({
|
||||
url: '/management/api/member',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doEdit(id, data) {
|
||||
return request({
|
||||
url: `/management/api/member/${id}`,
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doDelete(data) {
|
||||
return request({
|
||||
url: '/management/api/member/delete',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function doMoveUp(id) {
|
||||
return request({
|
||||
url: `/management/api/member/moveUp/${id}`,
|
||||
method: 'patch',
|
||||
})
|
||||
}
|
||||
|
||||
export function doMoveDown(id) {
|
||||
return request({
|
||||
url: `/management/api/member/moveDown/${id}`,
|
||||
method: 'patch',
|
||||
})
|
||||
}
|
||||
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 122 KiB |
@@ -29,6 +29,10 @@
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
picUrl: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -10,11 +10,6 @@
|
||||
</span>
|
||||
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="github">github地址</el-dropdown-item>
|
||||
<el-dropdown-item command="gitee" divided>码云地址</el-dropdown-item>
|
||||
<el-dropdown-item command="pro" divided>pro付费版地址</el-dropdown-item>
|
||||
<el-dropdown-item command="plus" divided>plus付费版地址</el-dropdown-item>
|
||||
<el-dropdown-item command="shop" divided>shop-vite付费版地址</el-dropdown-item>
|
||||
<el-dropdown-item command="logout" divided>退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<span v-if="themeBar">
|
||||
<vab-icon :icon="['fas', 'palette']" title="主题配置" @click="handleOpenThemeBar" />
|
||||
<div class="theme-bar-setting">
|
||||
<!-- <vab-icon :icon="['fas', 'palette']" title="主题配置" @click="handleOpenThemeBar" /> -->
|
||||
<!-- <div class="theme-bar-setting">
|
||||
<div @click="handleOpenThemeBar">
|
||||
<vab-icon :icon="['fas', 'palette']" />
|
||||
<p>主题配置</p>
|
||||
@@ -10,7 +10,7 @@
|
||||
<vab-icon :icon="['fas', 'laptop-code']"></vab-icon>
|
||||
<p>拷贝源码</p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<el-drawer :visible.sync="drawerVisible" append-to-body direction="rtl" size="300px" title="主题配置">
|
||||
<el-scrollbar style="height: 80vh; overflow: hidden">
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/**
|
||||
* @author https://github.com/zxwk1998/vue-admin-better (不想保留author可删除)
|
||||
* @description 公共布局及样式自动引入
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
|
||||
const requireComponents = require.context('./components', true, /\.vue$/)
|
||||
|
||||
@@ -4,10 +4,6 @@ import store from './store'
|
||||
import router from './router'
|
||||
import './plugins'
|
||||
import '@/layouts/export'
|
||||
/**
|
||||
* @author https://github.com/zxwk1998/vue-admin-better (不想保留author可删除)
|
||||
* @description 生产环境默认都使用mock,如果正式用于生产环境时,记得去掉
|
||||
*/
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
const { mockXHR } = require('@/utils/static')
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/**
|
||||
* @author https://github.com/zxwk1998/vue-admin-better (不想保留author可删除)
|
||||
* @description router全局配置,如有必要可分文件抽离,其中asyncRoutes只有在intelligence模式下才会用到,vip文档中已提供路由的基础图标与小清新图标的配置方案,请仔细阅读
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Layout from '@/layouts'
|
||||
@@ -58,7 +53,7 @@ export const asyncRoutes = [
|
||||
component: Layout,
|
||||
redirect: 'noRedirect',
|
||||
name: 'CxshMini',
|
||||
meta: { title: '小程序', icon: 'comment', permissions: ['admin'] },
|
||||
meta: { title: '小程序', icon: 'comment', permissions: ['admin', 'csxh_admin', 'csxh_user'] },
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
@@ -69,7 +64,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'home',
|
||||
permissions: ['admin'],
|
||||
permissions: ['admin', 'csxh_admin', 'csxh_user'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@@ -89,14 +84,20 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '精彩案例',
|
||||
icon: 'handshake',
|
||||
permissions: ['admin'],
|
||||
permissions: ['admin', 'csxh_admin', 'csxh_user'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'article',
|
||||
name: 'Article',
|
||||
component: () => import('@/views/cxshMini/anli/article/index'),
|
||||
meta: { title: '案例' },
|
||||
meta: { title: '新建案例' },
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
name: 'List',
|
||||
component: () => import('@/views/cxshMini/anli/list/index'),
|
||||
meta: { title: '案例列表' },
|
||||
},
|
||||
{
|
||||
path: 'category',
|
||||
@@ -115,7 +116,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '联系我们',
|
||||
icon: 'user-friends',
|
||||
permissions: ['admin'],
|
||||
permissions: ['admin', 'csxh_admin', 'csxh_user'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@@ -152,7 +153,7 @@ export const asyncRoutes = [
|
||||
redirect: 'noRedirect',
|
||||
name: 'Vab',
|
||||
alwaysShow: true,
|
||||
meta: { title: '组件', icon: 'box-open' },
|
||||
meta: { title: '组件', icon: 'box-open', permissions: ['admin'] },
|
||||
children: [
|
||||
{
|
||||
path: 'permissions',
|
||||
@@ -323,51 +324,52 @@ export const asyncRoutes = [
|
||||
component: () => import('@/views/personnelManagement/roleManagement/index'),
|
||||
meta: { title: '角色管理' },
|
||||
},
|
||||
{
|
||||
path: 'menuManagement',
|
||||
name: 'MenuManagement',
|
||||
component: () => import('@/views/personnelManagement/menuManagement/index'),
|
||||
meta: { title: '菜单管理', badge: 'New' },
|
||||
},
|
||||
// {
|
||||
// path: 'menuManagement',
|
||||
// name: 'MenuManagement',
|
||||
// component: () => import('@/views/personnelManagement/menuManagement/index'),
|
||||
// meta: { title: '菜单管理', badge: 'New' },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/mall',
|
||||
component: Layout,
|
||||
redirect: 'noRedirect',
|
||||
name: 'Mall',
|
||||
meta: {
|
||||
title: '商城',
|
||||
icon: 'shopping-cart',
|
||||
permissions: ['admin'],
|
||||
},
|
||||
// {
|
||||
// path: '/mall',
|
||||
// component: Layout,
|
||||
// redirect: 'noRedirect',
|
||||
// name: 'Mall',
|
||||
// meta: {
|
||||
// title: '商城',
|
||||
// icon: 'shopping-cart',
|
||||
// permissions: ['admin'],
|
||||
// },
|
||||
|
||||
children: [
|
||||
{
|
||||
path: 'pay',
|
||||
name: 'Pay',
|
||||
component: () => import('@/views/mall/pay/index'),
|
||||
meta: {
|
||||
title: '支付',
|
||||
noKeepAlive: true,
|
||||
},
|
||||
children: null,
|
||||
},
|
||||
{
|
||||
path: 'goodsList',
|
||||
name: 'GoodsList',
|
||||
component: () => import('@/views/mall/goodsList/index'),
|
||||
meta: {
|
||||
title: '商品列表',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// children: [
|
||||
// {
|
||||
// path: 'pay',
|
||||
// name: 'Pay',
|
||||
// component: () => import('@/views/mall/pay/index'),
|
||||
// meta: {
|
||||
// title: '支付',
|
||||
// noKeepAlive: true,
|
||||
// },
|
||||
// children: null,
|
||||
// },
|
||||
// {
|
||||
// path: 'goodsList',
|
||||
// name: 'GoodsList',
|
||||
// component: () => import('@/views/mall/goodsList/index'),
|
||||
// meta: {
|
||||
// title: '商品列表',
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
path: '/error',
|
||||
component: EmptyLayout,
|
||||
redirect: 'noRedirect',
|
||||
name: 'Error',
|
||||
hidden: true,
|
||||
meta: { title: '错误页', icon: 'bug' },
|
||||
children: [
|
||||
{
|
||||
|
||||
@@ -2,34 +2,27 @@
|
||||
<div class="cxshMini-article-container">
|
||||
<el-button style="margin-bottom: 10px" type="primary" @click="handlePublish">发布</el-button>
|
||||
<el-form ref="form" label-width="80px" :model="form" :rules="rules">
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-input v-model.trim="form.username" autocomplete="off" />
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model.trim="form.title" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input v-model.trim="form.password" autocomplete="off" type="password" />
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称" prop="nickname">
|
||||
<el-input v-model.trim="form.nickname" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="权限" prop="permissions">
|
||||
<el-select v-model="form.permissions" multiple placeholder="请选择权限">
|
||||
<el-option v-for="item in permissionList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
<el-form-item label="分类" prop="categoryId">
|
||||
<el-select v-model="form.categoryId" placeholder="请选择分类">
|
||||
<el-option v-for="item in categoryList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用" prop="appId">
|
||||
<el-select v-model="form.appId" placeholder="请选择应用">
|
||||
<el-option v-for="item in applicationList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-form-item label="描述" prop="desc">
|
||||
<el-input v-model.trim="form.desc" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="头像" prop="avatar">
|
||||
<el-form-item label="封面" prop="coverUrl">
|
||||
<single-upload
|
||||
style="width: 100px; height: 100px"
|
||||
upload-url="http://127.0.0.1:3999/management/api/common/upload"
|
||||
:value="form.coverUrl"
|
||||
@upload-success="handleUploadSuccess"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<quill-editor v-model="content" :options="editorOptions" />
|
||||
<quill-editor v-model="form.content" :options="editorOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,6 +30,8 @@
|
||||
import { quillEditor } from 'vue-quill-editor'
|
||||
import 'quill/dist/quill.snow.css'
|
||||
import SingleUpload from '@/components/SingleUpload'
|
||||
import { getList as getCategoryList } from '@/api/miniAnliCategory'
|
||||
import { getArticle, doAdd, doEdit } from '@/api/miniAnli'
|
||||
|
||||
export default {
|
||||
name: 'CxshMiniArticle',
|
||||
@@ -44,22 +39,20 @@
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
username: '',
|
||||
password: '',
|
||||
nickname: '',
|
||||
permissions: '',
|
||||
appId: '',
|
||||
avatar: '',
|
||||
},
|
||||
permissionList: [],
|
||||
applicationList: [],
|
||||
rules: {
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入用户名' }],
|
||||
password: [{ required: true, trigger: 'blur', message: '请输入密码' }],
|
||||
permissions: [{ required: true, trigger: 'blur', message: '请选择权限' }],
|
||||
appId: [{ required: true, trigger: 'blur', message: '请选择应用' }],
|
||||
},
|
||||
title: '',
|
||||
categoryId: '',
|
||||
desc: '',
|
||||
coverUrl: '',
|
||||
content: '',
|
||||
},
|
||||
categoryList: [],
|
||||
rules: {
|
||||
title: [{ required: true, trigger: 'blur', message: '请输入标题' }],
|
||||
categoryId: [{ required: true, trigger: 'blur', message: '请选择分类' }],
|
||||
coverUrl: [{ required: true, trigger: 'blur', message: '请上传封面' }],
|
||||
content: [{ required: true, trigger: 'blur', message: '请输入内容' }],
|
||||
},
|
||||
articleId: '',
|
||||
editorOptions: {
|
||||
theme: 'snow',
|
||||
},
|
||||
@@ -67,15 +60,45 @@
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.articleId = this.$route.query.id
|
||||
if (this.articleId) {
|
||||
this.fetchArticle()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlePublish() {
|
||||
console.log(11111, this.content)
|
||||
console.log('发布')
|
||||
if (this.articleId) {
|
||||
this.$refs['form'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
await doEdit(this.articleId, this.form)
|
||||
this.$baseMessage('编辑成功', 'success')
|
||||
this.$router.push(`/cxshMini/anli/list`)
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$refs['form'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
await doAdd(this.form)
|
||||
this.$baseMessage('发布成功', 'success')
|
||||
this.$router.push(`/cxshMini/anli/list`)
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async fetchData() {},
|
||||
handleUploadSuccess(res) {
|
||||
this.form.avatar = res.data.url
|
||||
async fetchData() {
|
||||
const { data } = await getCategoryList(this.queryForm)
|
||||
this.categoryList = data.list
|
||||
},
|
||||
handleUploadSuccess(url) {
|
||||
this.form.coverUrl = url
|
||||
},
|
||||
async fetchArticle() {
|
||||
const { data } = await getArticle(this.articleId)
|
||||
this.form = data
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { doEdit, doAdd } from '@/api/roleManagement'
|
||||
import { doEdit, doAdd } from '@/api/miniAnliCategory'
|
||||
|
||||
export default {
|
||||
name: 'CxshMiniAnliCategoryEdit',
|
||||
@@ -59,7 +59,7 @@
|
||||
save() {
|
||||
this.$refs['form'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.id) {
|
||||
if (this.title === '编辑') {
|
||||
const { msg } = await doEdit(this.id, this.form)
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<el-table v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText" @selection-change="setSelectRows">
|
||||
<el-table-column show-overflow-tooltip type="selection" />
|
||||
<el-table-column label="名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="权限码" prop="permission" show-overflow-tooltip />
|
||||
<el-table-column label="描述" prop="desc" show-overflow-tooltip />
|
||||
<el-table-column label="操作" show-overflow-tooltip width="200">
|
||||
<template #default="{ row }">
|
||||
@@ -43,7 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { doDelete, getList } from '@/api/roleManagement'
|
||||
import { doDelete, getList } from '@/api/miniAnliCategory'
|
||||
import Edit from './components/CxshMiniAnliCategoryEdit'
|
||||
|
||||
export default {
|
||||
|
||||
124
src/views/cxshMini/anli/list/index.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<div class="cxshMini-anli-category-container">
|
||||
<vab-query-form>
|
||||
<vab-query-form-left-panel :span="12">
|
||||
<el-button icon="el-icon-plus" type="primary" @click="handleEdit">添加案例</el-button>
|
||||
</vab-query-form-left-panel>
|
||||
<vab-query-form-right-panel :span="12">
|
||||
<el-form :inline="true" :model="queryForm" @submit.native.prevent>
|
||||
<el-form-item>
|
||||
<el-input v-model.trim="queryForm.permission" clearable placeholder="请输入查询条件" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" @click="queryData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</vab-query-form-right-panel>
|
||||
</vab-query-form>
|
||||
|
||||
<el-table v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText" @selection-change="setSelectRows">
|
||||
<el-table-column show-overflow-tooltip type="selection" />
|
||||
<el-table-column align="center" label="封面" prop="coverUrl" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-image :src="row.coverUrl" style="width: 100px; height: 100px" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="标题" prop="title" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="分类" prop="categoryName" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="作者" prop="authorName" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="修改时间" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ formatTime(row.updatedAt) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" show-overflow-tooltip width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="queryForm.pageNo"
|
||||
:layout="layout"
|
||||
:page-size="queryForm.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { doDelete, getList } from '@/api/miniAnli'
|
||||
import { formatTime } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'CxshMiniAnliList',
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
listLoading: true,
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
total: 0,
|
||||
selectRows: '',
|
||||
elementLoadingText: '正在加载...',
|
||||
queryForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
permission: '',
|
||||
},
|
||||
timeOutID: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
clearTimeout(this.timeOutID)
|
||||
},
|
||||
methods: {
|
||||
formatTime,
|
||||
setSelectRows(val) {
|
||||
this.selectRows = val
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (row.id) {
|
||||
this.$router.push(`/cxshMini/anli/article?id=${row.id}`)
|
||||
} else {
|
||||
this.$router.push(`/cxshMini/anli/article`)
|
||||
}
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$baseConfirm('你确定要删除当前项吗', null, async () => {
|
||||
const { msg } = await doDelete({ ids: [row.id] })
|
||||
this.$baseMessage(msg, 'success')
|
||||
this.fetchData()
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.queryForm.pageSize = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.queryForm.pageNo = val
|
||||
this.fetchData()
|
||||
},
|
||||
queryData() {
|
||||
this.queryForm.pageNo = 1
|
||||
this.fetchData()
|
||||
},
|
||||
async fetchData() {
|
||||
this.listLoading = true
|
||||
const { data } = await getList(this.queryForm)
|
||||
this.list = data.list
|
||||
this.total = data.totalCount
|
||||
this.timeOutID = setTimeout(() => {
|
||||
this.listLoading = false
|
||||
}, 300)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -1,23 +1,14 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" width="500px" @close="close">
|
||||
<el-form ref="form" label-width="80px" :model="form" :rules="rules">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" autocomplete="off" />
|
||||
<el-form-item label="描述" prop="desc">
|
||||
<el-input v-model="form.desc" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择 APP 类型">
|
||||
<el-option label="小程序" :value="1" />
|
||||
<el-option label="H5" :value="2" />
|
||||
<el-option label="后台管理" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="form.description" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="APP图标" prop="appIcon">
|
||||
<el-form-item label="轮播图片" prop="appIcon">
|
||||
<single-upload
|
||||
style="width: 100px; height: 100px"
|
||||
upload-url="http://127.0.0.1:3999/management/api/common/upload"
|
||||
:value="form.url"
|
||||
@upload-success="handleUploadSuccess"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -31,24 +22,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { doEdit, doAdd } from '@/api/appManagement'
|
||||
import { doEdit, doAdd } from '@/api/banner'
|
||||
import SingleUpload from '@/components/SingleUpload'
|
||||
|
||||
export default {
|
||||
name: 'AppManagementEdit',
|
||||
name: 'BannerEdit',
|
||||
components: { SingleUpload },
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
form: {
|
||||
name: '',
|
||||
type: '',
|
||||
description: '',
|
||||
icon: '',
|
||||
desc: '',
|
||||
url: '',
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, trigger: 'blur', message: '请输入名称' }],
|
||||
type: [{ required: true, trigger: 'blur', message: '请选择类型' }],
|
||||
url: [{ required: true, trigger: 'blur', message: '请上传 banner' }],
|
||||
},
|
||||
title: '',
|
||||
dialogFormVisible: false,
|
||||
@@ -57,7 +45,7 @@
|
||||
created() {},
|
||||
methods: {
|
||||
handleUploadSuccess(url) {
|
||||
this.form.icon = url
|
||||
this.form.url = url
|
||||
},
|
||||
showEdit(row) {
|
||||
if (!row) {
|
||||
@@ -65,9 +53,8 @@
|
||||
} else {
|
||||
this.title = '编辑'
|
||||
this.form = {
|
||||
name: row.name,
|
||||
description: row.description,
|
||||
icon: row.icon,
|
||||
desc: row.desc,
|
||||
url: row.url,
|
||||
}
|
||||
this.id = row.id
|
||||
}
|
||||
@@ -81,7 +68,7 @@
|
||||
save() {
|
||||
this.$refs['form'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.id) {
|
||||
if (this.title === '编辑') {
|
||||
const { msg } = await doEdit(this.id, this.form)
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<div class="appManagement-container">
|
||||
<el-divider content-position="left">
|
||||
演示环境仅做基础功能展示,若想实现不同角色的真实菜单配置,需将settings.js路由加载模式改为all模式,由后端全面接管路由渲染与权限控制
|
||||
</el-divider>
|
||||
<div class="banner-container">
|
||||
<vab-query-form>
|
||||
<vab-query-form-left-panel :span="12">
|
||||
<el-button icon="el-icon-plus" type="primary" @click="handleEdit">添加</el-button>
|
||||
@@ -22,23 +19,20 @@
|
||||
|
||||
<el-table v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText" @selection-change="setSelectRows">
|
||||
<el-table-column show-overflow-tooltip type="selection" />
|
||||
<el-table-column align="center" label="图标" width="100">
|
||||
<el-table-column align="center" label="顺序" prop="sort" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="图片" width="100">
|
||||
<template slot-scope="scope">
|
||||
<!-- 使用 show-overflow-tooltip 显示图片,并添加 tooltip -->
|
||||
<el-tooltip class="item" :content="scope.row.name" effect="dark" placement="top">
|
||||
<img alt="image" :src="scope.row.icon" style="width: 50px; height: 50px; object-fit: cover; border-radius: 50%" />
|
||||
<img alt="image" :src="scope.row.url" style="width: 50px; height: 50px; object-fit: cover" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="类型" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ row.type === 1 ? '小程序' : row.type === 2 ? 'H5' : '后台管理' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="描述" prop="description" show-overflow-tooltip />
|
||||
<el-table-column label="操作" show-overflow-tooltip width="200">
|
||||
<el-table-column align="center" label="描述" prop="desc" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="操作" show-overflow-tooltip width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button :disabled="!row.canUp" type="text" @click="moveUp(row.id)">上移</el-button>
|
||||
<el-button :disabled="!row.canDown" type="text" @click="moveDown(row.id)">下移</el-button>
|
||||
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row)">删除</el-button>
|
||||
</template>
|
||||
@@ -58,12 +52,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { doDelete, getList } from '@/api/appManagement'
|
||||
import { formatTime } from '@/utils'
|
||||
import Edit from './components/AppManagementEdit'
|
||||
import { getList, doDelete, doMoveUp, doMoveDown } from '@/api/banner'
|
||||
import Edit from './components/BannerEdit.vue'
|
||||
|
||||
export default {
|
||||
name: 'AppManagement',
|
||||
name: 'Banner',
|
||||
components: { Edit },
|
||||
data() {
|
||||
return {
|
||||
@@ -141,6 +134,18 @@
|
||||
this.listLoading = false
|
||||
}, 300)
|
||||
},
|
||||
|
||||
async moveUp(id) {
|
||||
console.log('moveUp', id)
|
||||
await doMoveUp(id)
|
||||
this.$baseMessage('移动成功', 'success')
|
||||
this.fetchData()
|
||||
},
|
||||
async moveDown(id) {
|
||||
await doMoveDown(id)
|
||||
this.$baseMessage('移动成功', 'success')
|
||||
this.fetchData()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" width="500px" @close="close">
|
||||
<el-form ref="form" label-width="80px" :model="form" :rules="rules">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-form-item label="昵称" prop="name">
|
||||
<el-input v-model="form.name" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择 APP 类型">
|
||||
<el-option label="小程序" :value="1" />
|
||||
<el-option label="H5" :value="2" />
|
||||
<el-option label="后台管理" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="form.description" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="APP图标" prop="appIcon">
|
||||
<el-form-item label="照片" prop="appIcon">
|
||||
<single-upload
|
||||
style="width: 100px; height: 100px"
|
||||
upload-url="http://127.0.0.1:3999/management/api/common/upload"
|
||||
:value="form.url"
|
||||
@upload-success="handleUploadSuccess"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="格言" prop="maxim">
|
||||
<el-input v-model="form.maxim" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标签" prop="tags">
|
||||
<el-input v-model="form.tags" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -31,24 +28,26 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { doEdit, doAdd } from '@/api/appManagement'
|
||||
import { doEdit, doAdd } from '@/api/miniMember'
|
||||
import SingleUpload from '@/components/SingleUpload'
|
||||
|
||||
export default {
|
||||
name: 'AppManagementEdit',
|
||||
name: 'MemberEdit',
|
||||
components: { SingleUpload },
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
form: {
|
||||
name: '',
|
||||
type: '',
|
||||
description: '',
|
||||
icon: '',
|
||||
url: '',
|
||||
maxim: '',
|
||||
tags: '',
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, trigger: 'blur', message: '请输入名称' }],
|
||||
type: [{ required: true, trigger: 'blur', message: '请选择类型' }],
|
||||
url: [{ required: true, trigger: 'blur', message: '请上传照片' }],
|
||||
maxim: [{ required: true, trigger: 'blur', message: '请填写格言' }],
|
||||
tags: [{ required: true, trigger: 'blur', message: '请填写标签' }],
|
||||
name: [{ required: true, trigger: 'blur', message: '请填写昵称' }],
|
||||
},
|
||||
title: '',
|
||||
dialogFormVisible: false,
|
||||
@@ -57,7 +56,7 @@
|
||||
created() {},
|
||||
methods: {
|
||||
handleUploadSuccess(url) {
|
||||
this.form.icon = url
|
||||
this.form.url = url
|
||||
},
|
||||
showEdit(row) {
|
||||
if (!row) {
|
||||
@@ -66,8 +65,9 @@
|
||||
this.title = '编辑'
|
||||
this.form = {
|
||||
name: row.name,
|
||||
description: row.description,
|
||||
icon: row.icon,
|
||||
url: row.url,
|
||||
tags: row.tags,
|
||||
maxim: row.maxim,
|
||||
}
|
||||
this.id = row.id
|
||||
}
|
||||
@@ -81,7 +81,7 @@
|
||||
save() {
|
||||
this.$refs['form'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.id) {
|
||||
if (this.title === '编辑') {
|
||||
const { msg } = await doEdit(this.id, this.form)
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<div class="appManagement-container">
|
||||
<el-divider content-position="left">
|
||||
演示环境仅做基础功能展示,若想实现不同角色的真实菜单配置,需将settings.js路由加载模式改为all模式,由后端全面接管路由渲染与权限控制
|
||||
</el-divider>
|
||||
<div class="member-container">
|
||||
<vab-query-form>
|
||||
<vab-query-form-left-panel :span="12">
|
||||
<el-button icon="el-icon-plus" type="primary" @click="handleEdit">添加</el-button>
|
||||
@@ -22,23 +19,28 @@
|
||||
|
||||
<el-table v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText" @selection-change="setSelectRows">
|
||||
<el-table-column show-overflow-tooltip type="selection" />
|
||||
<el-table-column align="center" label="图标" width="100">
|
||||
<el-table-column align="center" label="顺序" prop="sort" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="照片" width="100">
|
||||
<template slot-scope="scope">
|
||||
<!-- 使用 show-overflow-tooltip 显示图片,并添加 tooltip -->
|
||||
<el-tooltip class="item" :content="scope.row.name" effect="dark" placement="top">
|
||||
<img alt="image" :src="scope.row.icon" style="width: 50px; height: 50px; object-fit: cover; border-radius: 50%" />
|
||||
<img alt="image" :src="scope.row.url" style="width: 50px; height: 50px; object-fit: cover" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="类型" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="昵称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="格言" prop="maxim" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="标签" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ row.type === 1 ? '小程序' : row.type === 2 ? 'H5' : '后台管理' }}
|
||||
<el-tag v-for="(item, index) in row.tags.split(',')" :key="index">
|
||||
{{ item }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="描述" prop="description" show-overflow-tooltip />
|
||||
<el-table-column label="操作" show-overflow-tooltip width="200">
|
||||
<el-table-column align="center" label="操作" show-overflow-tooltip width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button :disabled="!row.canUp" type="text" @click="moveUp(row.id)">上移</el-button>
|
||||
<el-button :disabled="!row.canDown" type="text" @click="moveDown(row.id)">下移</el-button>
|
||||
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row)">删除</el-button>
|
||||
</template>
|
||||
@@ -58,12 +60,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { doDelete, getList } from '@/api/appManagement'
|
||||
import { formatTime } from '@/utils'
|
||||
import Edit from './components/AppManagementEdit'
|
||||
import { getList, doDelete, doMoveUp, doMoveDown } from '@/api/miniMember'
|
||||
import Edit from './components/AppMemberEdit'
|
||||
|
||||
export default {
|
||||
name: 'AppManagement',
|
||||
name: 'Member',
|
||||
components: { Edit },
|
||||
data() {
|
||||
return {
|
||||
@@ -141,6 +142,18 @@
|
||||
this.listLoading = false
|
||||
}, 300)
|
||||
},
|
||||
|
||||
async moveUp(id) {
|
||||
console.log('moveUp', id)
|
||||
await doMoveUp(id)
|
||||
this.$baseMessage('移动成功', 'success')
|
||||
this.fetchData()
|
||||
},
|
||||
async moveDown(id) {
|
||||
await doMoveDown(id)
|
||||
this.$baseMessage('移动成功', 'success')
|
||||
this.fetchData()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="index-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
|
||||
<el-alert v-if="noticeList">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
@@ -57,7 +57,7 @@
|
||||
<el-card class="card" shadow="never">
|
||||
<div slot="header">
|
||||
<span>依赖信息</span>
|
||||
<!-- <div style="float: right">部署时间:{{ updateTime }}</div> -->
|
||||
<div style="float: right">部署时间:{{ updateTime }}</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
@@ -112,54 +112,22 @@
|
||||
<vab-colorful-icon icon-class="vab" style="font-size: 140px" />
|
||||
<h1 style="font-size: 30px">vue-admin-better</h1>
|
||||
</div>
|
||||
<div class="bottom-btn">
|
||||
<el-popover placement="top" trigger="hover" width="250">
|
||||
<p>
|
||||
请我们喝杯咖啡,付款后联系qq
|
||||
783963206,我们将邀请您加入我们的讨论群,谢谢您愿意支持开源,加群获取文档、及基础模板,群内大佬众多,希望能帮到大家(如情况不允许,请勿勉强)。
|
||||
</p>
|
||||
<el-image :src="require('@/assets/zfb_kf.jpg')" />
|
||||
<a slot="reference" target="_blank">
|
||||
<el-button type="primary">QQ讨论群、基础版、文档</el-button>
|
||||
</a>
|
||||
</el-popover>
|
||||
<a href="https://github.com/zxwk1998/vue-admin-better" target="_blank">
|
||||
<el-button type="plain">vue2.x版本 github下载源码点star</el-button>
|
||||
</a>
|
||||
<a href="https://gitee.com/chu1204505056/vue-admin-better" target="_blank">
|
||||
<el-button type="plain">vue2.x版本 码云下载源码点star</el-button>
|
||||
</a>
|
||||
<a href="https://github.com/zxwk1998/vue-admin-arco" target="_blank">
|
||||
<el-button type="plain">vue3.x版本 github下载源码点star</el-button>
|
||||
</a>
|
||||
<a href="https://vuejs-core.cn/admin-pro" target="_blank">
|
||||
<el-button type="primary">Admin Pro ¥699</el-button>
|
||||
</a>
|
||||
<a href="https://vuejs-core.cn/admin-plus" target="_blank">
|
||||
<el-button type="primary">Admin Plus ¥799</el-button>
|
||||
</a>
|
||||
<a href="https://vuejs-core.cn/shop-vite" target="_blank">
|
||||
<el-button type="success">Shop Vite ¥1899</el-button>
|
||||
</a>
|
||||
<a @click="handleChangeTheme">
|
||||
<el-button type="danger">修改主题和布局</el-button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-btn"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VabChart from '@/plugins/echarts'
|
||||
// import VabChart from '@/plugins/echarts'
|
||||
import { dependencies, devDependencies } from '../../../package.json'
|
||||
import { getNoticeList } from '@/api/notice'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
VabChart,
|
||||
// VabChart,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||