update code

This commit is contained in:
全栈小学生 2023-09-06 14:52:30 +08:00
parent 8f2e36cfa4
commit 36967076d4
1706 changed files with 63614 additions and 17748 deletions

123
README.md
View File

@ -11,10 +11,10 @@
:small_blue_diamond: :small_orange_diamond: :small_blue_diamond: :small_blue_diamond: :small_orange_diamond: :small_blue_diamond: :small_blue_diamond: :small_orange_diamond: :small_blue_diamond: :small_blue_diamond: :small_orange_diamond: :small_blue_diamond:
<br> <br>
### niucloud-admin是什么? ### niucloud-admin介绍
niucloud-admin是一款快速开发SaaS通用管理系统后台框架前端采用最新的技术栈Vite+TypeScript+Vue3+ElementPlus最流行技术架构后台结合PHP8、Java SDK、Python等主流后端语言搭建内置集成Saas多站点、多租户套餐、用户权限、代码生成器、表单设计、云存储、短信发送、素材中心、微信及公众号、支付宝小程序、Api模块一系列开箱即用功能是一款快速可以开发企业级应用的软件系统。 niucloud-admin是一款快速开发SaaS通用管理系统后台框架前端采用最新的技术栈Vite+TypeScript+Vue3+ElementPlus最流行技术架构后台结合PHP8、Java SDK、Python等主流后端语言搭建内置集成Saas多站点、多租户套餐、用户权限、代码生成器、表单设计、云存储、短信发送、素材中心、微信及公众号、支付宝小程序、Api模块一系列开箱即用功能是一款快速可以开发企业级应用的软件系统。
### niucloud-admin产品特性说明 ### 产品特性说明
1.niucloud-admin 软件开发框架内置各种基础功能可大量节省SaaS系统开发周期快速完成交付。 1.niucloud-admin 软件开发框架内置各种基础功能可大量节省SaaS系统开发周期快速完成交付。
@ -29,7 +29,7 @@ niucloud-admin是一款快速开发SaaS通用管理系统后台框架前端
6.niucloud-admin是一款真正的二次开发神器 6.niucloud-admin是一款真正的二次开发神器
### niucloud-admin技术说明 ### 技术说明
- 后台php采用thinkphp6+php8+mysql,支持composer快速安装扩展支持redis缓存以及消息队列支持多语言设计开发同时开发采用严格的restful的api设计开发。 - 后台php采用thinkphp6+php8+mysql,支持composer快速安装扩展支持redis缓存以及消息队列支持多语言设计开发同时开发采用严格的restful的api设计开发。
@ -55,13 +55,19 @@ niucloud-admin是一款快速开发SaaS通用管理系统后台框架前端
- 手机端使用uniapp 同时使用uview页面展示可以开发出丰富的手机样式同时不需要专门学习小程序app等开发语言只需要通过uniapp编译就可以。 - 手机端使用uniapp 同时使用uview页面展示可以开发出丰富的手机样式同时不需要专门学习小程序app等开发语言只需要通过uniapp编译就可以。
### 操作指南
[官网地址](https://www.niucloud.com) ### 官网地址
| [服务市场](https://www.niucloud.com) https://www.niucloud.com
| [使用手册](https://www.kancloud.cn/niucloud/niucloud-admin-develop/3153336) ### 应用市场
| [二开手册](https://www.kancloud.cn/niucloud/niucloud-admin-develop/3153336) https://www.niucloud.com
| [API接口手册](https://www.niucloud.com/apidoc.html) ### 使用手册
| [论坛地址](https://www.niucloud.com/bbs) https://www.kancloud.cn/niucloud/niucloud-admin-develop/3153336
### 二开手册
https://www.kancloud.cn/niucloud/niucloud-admin-develop/3153336
### API接口手册
https://www.niucloud.com/apidoc.html
### 论坛地址
https://www.niucloud.com/bbs
### 演示地址 ### 演示地址
- 电脑端演示网址:[<a href='https://demo.niucloud.com/web/s2/' target="_blank"> 查看 </a>] - 电脑端演示网址:[<a href='https://demo.niucloud.com/web/s2/' target="_blank"> 查看 </a>]
@ -71,104 +77,20 @@ niucloud-admin是一款快速开发SaaS通用管理系统后台框架前端
- 平台后台演示网址:[<a href='https://demo.niucloud.com/admin/login' target="_blank"> 查看 </a>] - 平台后台演示网址:[<a href='https://demo.niucloud.com/admin/login' target="_blank"> 查看 </a>]
<a href='https://demo.niucloud.com/admin/login' target="_blank">https://demo.niucloud.com/admin/login</a> 账号admin 密码123456 <a href='https://demo.niucloud.com/admin/login' target="_blank">https://demo.niucloud.com/admin/login</a> 账号admin 密码123456
- 前端演示二维码 - 前端演示二维码
![输入图片说明](https://www.niucloud.com/img/readme/%E6%BC%94%E7%A4%BA%E5%89%8D%E7%AB%AF-new.png) ![输入图片说明](https://www.niucloud.com/img/readme/%E6%BC%94%E7%A4%BA%E5%89%8D%E7%AB%AF-new.png)
### 安装部署
#### 宝塔部署 环境要求<br/>
- 1.环境要求<br/>
php 8.0 <br/> mysql5.6及以上 <br/> 启用redis <br/> Nignx/Apache php 8.0 <br/> mysql5.6及以上 <br/> 启用redis <br/> Nignx/Apache
- 2.登录网站【<a href='https://gitee.com/niucloud-team/niucloud-admin.git' target="_blank">https://gitee.com/niucloud-team/niucloud-admin/</a>】下载框架源码。
- 3.源码放置到宝塔根目录,访问域名/niucloud/public/index.php进入安装界面点击下一步输入数据库安装信息下一步完成安装。详细教程查看 :arrow_right: <a href='https://www.kancloud.cn/niucloud/niucloud-admin-develop/3148343' target="_blank">【开发手册】 :arrow_left: </a>
- 4.redis配置<br/>
①安装redis如下图
![输入图片说明](https://www.niucloud.com/img/readme/%E5%AE%9D%E5%A1%94%E5%AE%89%E8%A3%85redis.png)
②安装php的扩展redis如下图所示
![输入图片说明](https://www.niucloud.com/img/readme/php%E6%89%A9%E5%B1%95%E5%AE%89%E8%A3%85redis%E6%89%A9%E5%B1%95.png)
③将redis密码填入到niucloud/.env文件中如下图
![输入图片说明](https://www.niucloud.com/img/readme/%E9%85%8D%E7%BD%AEredis%E5%AF%86%E7%A0%81.png)
- 5.配置伪静态<br/>
可直接复制下方代码:
Nginx配置
```html
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
}
}
```
apache配置
```
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
RewriteEngine on RewriteCond % !^$
</IfModule>
```
粘贴位置如下图:
![输入图片说明](https://www.niucloud.com/img/readme/%E6%B7%BB%E5%8A%A0%E4%BC%AA%E9%9D%99%E6%80%81%E4%BD%8D%E7%BD%AE.png)
#### docker快速部署
- 1.启动docker打开终端输入命令行回车执行命令。
```
docker run -d --name niucloudadmin_php -p 20221:80 niucloud/niucloudadmin_php:1.6.0
```
- 2.访问配置的虚拟域名或者localhost或者127.0.0.1/niucloud/public/index.php即可进入安装界面。
#### 前端运行
- 1.拉取代码
```
git clone https://gitee.com/niucloud-team/niucloud-admin.git
```
- 2.安装依赖
```
cd niucloud-admin template
npm install
```
- 3.本地运行
```
npm run dev
```
- 4.前端代码打包
```
npm run build
```
快来添加属于你的专属客服吧~
![输入图片说明](https://www.niucloud.com/img/readme/%E6%B7%BB%E5%8A%A0%E5%AE%A2%E6%9C%8D-old.png) ![输入图片说明](https://www.niucloud.com/img/readme/%E6%B7%BB%E5%8A%A0%E5%AE%A2%E6%9C%8D-old.png)
#### 扫描下方二维码加入niucloud-admin开发者交流群 扫描下方二维码加入niucloud-admin开发者交流群
![输入图片说明](https://www.niucloud.com/img/readme/%E5%BC%80%E5%8F%91%E8%80%85%E4%BA%A4%E6%B5%81%E7%BE%A4-old.png) ![输入图片说明](https://www.niucloud.com/img/readme/%E5%BC%80%E5%8F%91%E8%80%85%E4%BA%A4%E6%B5%81%E7%BE%A4.png)
### 框架管理端部分页面展示
- 管理端控制台页面,可直观体现站点会员数量、平台拥有的站点数、所有访客数量统计;同时也加入了统计走势图,便于平台根据需求制定或者调整运营策略;主要快捷入口可方便快速打开需要处理的业务数据
![输入图片说明](https://www.niucloud.com/img/readme/%E6%8E%A7%E5%88%B6%E5%8F%B0.png)
- 系统性设置,可助力平台更好的运营
![输入图片说明](https://www.niucloud.com/img/readme/%E7%9F%AD%E4%BF%A1%E3%80%81%E6%8F%90%E7%8E%B0%E8%AE%BE%E7%BD%AE.png)
![输入图片说明](https://www.niucloud.com/img/readme/%E7%BD%91%E7%AB%99%E3%80%81%E7%89%88%E6%9D%83%E8%AE%BE%E7%BD%AE.png)
![输入图片说明](https://www.niucloud.com/img/readme/%E5%AD%98%E5%82%A8%E3%80%82.png)
- 文章模块管理页面展示
![输入图片说明](https://www.niucloud.com/img/readme/%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8.png)
- 可自动生成代码
![输入图片说明](https://www.niucloud.com/img/readme/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90.png)
- 素材管理
![输入图片说明](https://www.niucloud.com/img/readme/%E7%B4%A0%E6%9D%90%E7%AE%A1%E7%90%86.png)
### 开源使用须知 ### 开源使用须知
@ -184,9 +106,6 @@ npm run build
6.一切事物有个人喜好的标准,本开源代码意在分享,不喜勿喷。 6.一切事物有个人喜好的标准,本开源代码意在分享,不喜勿喷。
### 战略合作伙伴
![输入图片说明](https://www.niucloud.com/img/readme/%E5%90%88%E4%BD%9C%E4%BC%99%E4%BC%B4.png)
### 版权信息 ### 版权信息
版权所有Copyright 2015-2035 niucloud-admin 版权所有 版权所有Copyright 2015-2035 niucloud-admin 版权所有
All rights reserved。 All rights reserved。

View File

@ -11,6 +11,3 @@ VITE_REQUEST_HEADER_TOKEN_KEY='token'
# 请求时header中站点的参数名 # 请求时header中站点的参数名
VITE_REQUEST_HEADER_SITEID_KEY='site-id' VITE_REQUEST_HEADER_SITEID_KEY='site-id'
# wap手机端请求地址
VITE_WAP_DOMAIN=''

View File

@ -11,6 +11,3 @@ VITE_REQUEST_HEADER_TOKEN_KEY='token'
# 请求时header中站点的参数名 # 请求时header中站点的参数名
VITE_REQUEST_HEADER_SITEID_KEY='site-id' VITE_REQUEST_HEADER_SITEID_KEY='site-id'
# wap手机端请求地址
VITE_WAP_DOMAIN=''

View File

@ -1,5 +1,5 @@
// Generated by 'unplugin-auto-import' // Generated by 'unplugin-auto-import'
export {} export {}
declare global { declare global {
const ElMessage: typeof import('element-plus/es')['ElMessage']
} }

View File

@ -18,7 +18,6 @@ declare module '@vue/runtime-core' {
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard'] ElCard: typeof import('element-plus/es')['ElCard']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
ElCollapse: typeof import('element-plus/es')['ElCollapse'] ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
@ -29,13 +28,11 @@ declare module '@vue/runtime-core' {
ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog'] ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer'] ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElFooter: typeof import('element-plus/es')['ElFooter']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader'] ElHeader: typeof import('element-plus/es')['ElHeader']
@ -49,7 +46,6 @@ declare module '@vue/runtime-core' {
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElOptionGroup: typeof import('element-plus/es')['ElOptionGroup']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover'] ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadio: typeof import('element-plus/es')['ElRadio']
@ -72,6 +68,7 @@ declare module '@vue/runtime-core' {
ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree'] ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload'] ElUpload: typeof import('element-plus/es')['ElUpload']
HeatMap: typeof import('./src/components/heat-map/index.vue')['default']
Icon: typeof import('./src/components/icon/index.vue')['default'] Icon: typeof import('./src/components/icon/index.vue')['default']
PopoverInput: typeof import('./src/components/popover-input/index.vue')['default'] PopoverInput: typeof import('./src/components/popover-input/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']

View File

@ -12,7 +12,6 @@ import useSystemStore from '@/stores/modules/system'
import useAppStore from '@/stores/modules/app' import useAppStore from '@/stores/modules/app'
import { useDark, useToggle } from '@vueuse/core' import { useDark, useToggle } from '@vueuse/core'
import { setThemeColor } from '@/utils/common' import { setThemeColor } from '@/utils/common'
import { language } from '@/lang'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
@ -20,15 +19,14 @@ const route = useRoute()
// //
const systemStore = useSystemStore() const systemStore = useSystemStore()
const locale = computed(() => (systemStore.lang === 'zh-cn' ? zhCn : en)) const locale = computed(() => (systemStore.lang === 'zh-cn' ? zhCn : en))
language.loadLocaleMessages(route.path, systemStore.lang)
const toggleDark = useToggle(useDark()) const toggleDark = useToggle(useDark())
watch(route, () => { watch(route, () => {
useAppStore().$patch(state => { useAppStore().$patch(state => {
state.route = route.path state.route = route.meta.view || route.path
}) })
}) }, { immediate: true })
onMounted(() => { onMounted(() => {
// //

View File

@ -5,7 +5,7 @@ import request from '@/utils/request'
* @returns * @returns
*/ */
export function getAddonLocal(params: Record<string, any>) { export function getAddonLocal(params: Record<string, any>) {
return request.get('addon/local', params, { showSuccessMessage: true }) return request.get('addon/local', params, {showSuccessMessage: true})
} }
/** /**
@ -31,7 +31,7 @@ export function installAddon(params: Record<string, any>) {
* @returns * @returns
*/ */
export function uninstallAddon(params: Record<string, any>) { export function uninstallAddon(params: Record<string, any>) {
return request.post(`addon/uninstall/${params.addon}`, params, { showSuccessMessage: true }) return request.post(`addon/uninstall/${params.addon}`, params, {showSuccessMessage: true})
} }
/** /**
@ -40,7 +40,7 @@ export function uninstallAddon(params: Record<string, any>) {
* @returns * @returns
*/ */
export function preInstallCheck(addon: string) { export function preInstallCheck(addon: string) {
return request.get(`addon/install/check/${addon}`, { timeout: 30 * 1000 }) return request.get(`addon/install/check/${addon}`, {timeout: 30 * 1000})
} }
/** /**
@ -55,8 +55,7 @@ export function getAddonInstallTaskState(addon: string, key: string) {
/** /**
* *
* @param params * @param addon
* @returns
*/ */
export function executeInstall(addon: string) { export function executeInstall(addon: string) {
return request.post(`addon/install/execute/${addon}`, {}) return request.post(`addon/install/execute/${addon}`, {})

View File

@ -14,7 +14,7 @@ export function getAliappConfig() {
* @returns * @returns
*/ */
export function setAliappConfig(params: Record<string, any>) { export function setAliappConfig(params: Record<string, any>) {
return request.put('aliapp/config', params, { showSuccessMessage: true }) return request.put('aliapp/config', params, {showSuccessMessage: true})
} }
/** /**

View File

@ -8,7 +8,7 @@ import request from '@/utils/request'
* @returns * @returns
*/ */
export function getArticleList(params: Record<string, any>) { export function getArticleList(params: Record<string, any>) {
return request.get(`article/article`, { params }) return request.get(`article/article`, {params})
} }
/** /**
@ -26,17 +26,15 @@ export function getArticleInfo(id: number) {
* @returns * @returns
*/ */
export function addArticle(params: Record<string, any>) { export function addArticle(params: Record<string, any>) {
return request.post('article/article', params, { showSuccessMessage: true }) return request.post('article/article', params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editArticle(params: Record<string, any>) { export function editArticle(params: Record<string, any>) {
return request.put(`article/article/${params.id}`, params, { showSuccessMessage: true }) return request.put(`article/article/${params.id}`, params, {showSuccessMessage: true})
} }
/** /**
@ -45,8 +43,9 @@ export function editArticle(params: Record<string, any>) {
* @returns * @returns
*/ */
export function deleteArticle(id: number) { export function deleteArticle(id: number) {
return request.delete(`article/article/${id}`, { showSuccessMessage: true }) return request.delete(`article/article/${id}`, {showSuccessMessage: true})
} }
/***************************************************** 文章分类管理 ****************************************************/ /***************************************************** 文章分类管理 ****************************************************/
/** /**
@ -55,7 +54,7 @@ export function deleteArticle(id: number) {
* @returns * @returns
*/ */
export function getArticleCategoryList(params: Record<string, any>) { export function getArticleCategoryList(params: Record<string, any>) {
return request.get(`article/category`, { params }) return request.get(`article/category`, {params})
} }
@ -70,8 +69,7 @@ export function getArticleCategoryAll(params: Record<string, any>) {
/** /**
* *
* @param id id * @param category_id
* @returns
*/ */
export function getArticleCategoryInfo(category_id: number) { export function getArticleCategoryInfo(category_id: number) {
return request.get(`article/category/${category_id}`); return request.get(`article/category/${category_id}`);
@ -83,7 +81,7 @@ export function getArticleCategoryInfo(category_id: number) {
* @returns * @returns
*/ */
export function addArticleCategory(params: Record<string, any>) { export function addArticleCategory(params: Record<string, any>) {
return request.post('article/category', params, { showSuccessMessage: true }) return request.post('article/category', params, {showSuccessMessage: true})
} }
/** /**
@ -92,14 +90,13 @@ export function addArticleCategory(params: Record<string, any>) {
* @returns * @returns
*/ */
export function editArticleCategory(params: Record<string, any>) { export function editArticleCategory(params: Record<string, any>) {
return request.put(`article/category/${params.category_id}`, params, { showSuccessMessage: true }) return request.put(`article/category/${params.category_id}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id id * @param category_id
* @returns
*/ */
export function deleteArticleCategory(category_id: number) { export function deleteArticleCategory(category_id: number) {
return request.delete(`article/category/${category_id}`, { showSuccessMessage: true }); return request.delete(`article/category/${category_id}`, {showSuccessMessage: true});
} }

View File

@ -3,10 +3,10 @@ import request from '@/utils/request'
/** /**
* *
* @param params * @param params
* @returns * @param app_type
*/ */
export function login(params: Record<string, any>, app_type: string) { export function login(params: Record<string, any>, app_type: string) {
return request.get(`login/${app_type}`, { params }) return request.get(`login/${app_type}`, {params})
} }
/** /**

View File

@ -2,13 +2,22 @@ import request from '@/utils/request'
/***************************************************** 自定义页面 ****************************************************/ /***************************************************** 自定义页面 ****************************************************/
/**
*
* @param params
* @returns
*/
export function getDiyPageList(params: Record<string, any>) {
return request.get(`diy/diy`, {params})
}
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function getDiyPageList(params: Record<string, any>) { export function getDiyList(params: Record<string, any>) {
return request.get(`diy/diy`, { params }) return request.get(`diy/list`, {params})
} }
/** /**
@ -26,7 +35,7 @@ export function getDiyPageInfo(id: number) {
* @returns * @returns
*/ */
export function addDiyPage(params: Record<string, any>) { export function addDiyPage(params: Record<string, any>) {
return request.post('diy/diy', params, { showSuccessMessage: true }) return request.post('diy/diy', params, {showSuccessMessage: true})
} }
/** /**
@ -34,7 +43,7 @@ export function addDiyPage(params: Record<string, any>) {
* @param params * @param params
*/ */
export function editDiyPage(params: Record<string, any>) { export function editDiyPage(params: Record<string, any>) {
return request.put(`diy/diy/${params.id}`, params, { showSuccessMessage: true }) return request.put(`diy/diy/${params.id}`, params, {showSuccessMessage: true})
} }
/** /**
@ -42,7 +51,7 @@ export function editDiyPage(params: Record<string, any>) {
* @param params * @param params
*/ */
export function setUseDiyPage(params: Record<string, any>) { export function setUseDiyPage(params: Record<string, any>) {
return request.put(`diy/use`, params, { showSuccessMessage: true }) return request.put(`diy/use`, params, {showSuccessMessage: true})
} }
/** /**
@ -50,7 +59,7 @@ export function setUseDiyPage(params: Record<string, any>) {
* @param params * @param params
*/ */
export function editDiyPageShare(params: Record<string, any>) { export function editDiyPageShare(params: Record<string, any>) {
return request.put(`diy/diy/share`, params, { showSuccessMessage: true }) return request.put(`diy/diy/share`, params, {showSuccessMessage: true})
} }
/** /**
@ -59,28 +68,28 @@ export function editDiyPageShare(params: Record<string, any>) {
* @returns * @returns
*/ */
export function deleteDiyPage(id: number) { export function deleteDiyPage(id: number) {
return request.delete(`diy/diy/${id}`, { showSuccessMessage: true }) return request.delete(`diy/diy/${id}`, {showSuccessMessage: true})
} }
/** /**
* *
*/ */
export function initPage(params: Record<string, any>) { export function initPage(params: Record<string, any>) {
return request.get(`diy/init`, { params }) return request.get(`diy/init`, {params})
} }
/** /**
* *
*/ */
export function getLink(params: Record<string, any>) { export function getLink(params: Record<string, any>) {
return request.get(`diy/link`, { params }) return request.get(`diy/link`, {params})
} }
/** /**
* *
*/ */
export function getDiyBottom(params: Record<string, any>) { export function getDiyBottom(params: Record<string, any>) {
return request.get(`diy/bottom`, { params }) return request.get(`diy/bottom`, {params})
} }
/** /**
@ -89,14 +98,14 @@ export function getDiyBottom(params: Record<string, any>) {
* @returns * @returns
*/ */
export function setDiyBottom(params: Record<string, any>) { export function setDiyBottom(params: Record<string, any>) {
return request.post('diy/bottom', params, { showSuccessMessage: true }) return request.post('diy/bottom', params, {showSuccessMessage: true})
} }
/** /**
* *
*/ */
export function getDiyTemplate(params: Record<string, any>) { export function getDiyTemplate(params: Record<string, any>) {
return request.get(`diy/template`, { params }) return request.get(`diy/template`, {params})
} }
/** /**
@ -105,7 +114,7 @@ export function getDiyTemplate(params: Record<string, any>) {
* @returns * @returns
*/ */
export function getDiyRouteList(params: Record<string, any>) { export function getDiyRouteList(params: Record<string, any>) {
return request.get(`diy/route`, { params }) return request.get(`diy/route`, {params})
} }
/** /**
@ -113,7 +122,7 @@ export function getDiyRouteList(params: Record<string, any>) {
* @param params * @param params
*/ */
export function getDiyRouteInfo(params: Record<string, any>) { export function getDiyRouteInfo(params: Record<string, any>) {
return request.get(`diy/route/info`, { params }); return request.get(`diy/route/info`, {params});
} }
/** /**
@ -121,5 +130,32 @@ export function getDiyRouteInfo(params: Record<string, any>) {
* @param params * @param params
*/ */
export function editDiyRouteShare(params: Record<string, any>) { export function editDiyRouteShare(params: Record<string, any>) {
return request.put(`diy/route/share`, params, { showSuccessMessage: true }) return request.put(`diy/route/share`, params, {showSuccessMessage: true})
}
/**
*
* @param params
* @returns
*/
export function getDecoratePage(params: Record<string, any>) {
return request.get(`diy/decorate`, {params})
}
/**
*
* @param params
* @returns
*/
export function changeTemplate(params: Record<string, any>) {
return request.put(`diy/change`, params, {showSuccessMessage: true})
}
/**
*
* @param params
* @returns
*/
export function getPreviewData(params: Record<string, any>) {
return request.put(`diy/preview`, params, {showSuccessMessage: false})
} }

View File

@ -14,5 +14,5 @@ export function getH5Config() {
* @returns * @returns
*/ */
export function setH5Config(params: Record<string, any>) { export function setH5Config(params: Record<string, any>) {
return request.put('channel/h5/config', params, { showSuccessMessage: true }) return request.put('channel/h5/config', params, {showSuccessMessage: true})
} }

View File

@ -9,7 +9,7 @@ import request from '@/utils/request'
* @returns * @returns
*/ */
export function getMemberList(params: Record<string, any>) { export function getMemberList(params: Record<string, any>) {
return request.get(`member/member`, { params }) return request.get(`member/member`, {params})
} }
/** /**
@ -35,7 +35,7 @@ export function getMemberNo() {
* @returns * @returns
*/ */
export function addMember(params: Record<string, any>) { export function addMember(params: Record<string, any>) {
return request.post(`member/member`, params, { showSuccessMessage: true }) return request.post(`member/member`, params, {showSuccessMessage: true})
} }
/** /**
@ -58,15 +58,13 @@ export function getRegisterChannelType(params: Record<string, any>) {
/** /**
* *
* @param params * @param member_id
* @returns
*/ */
export function deleteMember(member_id: number) { export function deleteMember(member_id: number) {
return request.delete(`member/member/${member_id}`, { showSuccessMessage: true }) return request.delete(`member/member/${member_id}`, {showSuccessMessage: true})
} }
/***************************************************** 会员标签 ****************************************************/ /***************************************************** 会员标签 ****************************************************/
/** /**
@ -75,7 +73,7 @@ export function deleteMember(member_id: number) {
* @returns * @returns
*/ */
export function getMemberLabelList(params: Record<string, any>) { export function getMemberLabelList(params: Record<string, any>) {
return request.get(`member/label`, { params }) return request.get(`member/label`, {params})
} }
/** /**
@ -93,17 +91,15 @@ export function getMemberLabelInfo(label_id: number) {
* @returns * @returns
*/ */
export function addMemberLabel(params: Record<string, any>) { export function addMemberLabel(params: Record<string, any>) {
return request.post('member/label', params, { showSuccessMessage: true }) return request.post('member/label', params, {showSuccessMessage: true})
} }
/** /**
* *
* @param label_id
* @param params * @param params
* @returns
*/ */
export function updateMemberLabel(params: Record<string, any>) { export function updateMemberLabel(params: Record<string, any>) {
return request.put(`member/label/${params.label_id}`, params, { showSuccessMessage: true }) return request.put(`member/label/${params.label_id}`, params, {showSuccessMessage: true})
} }
/** /**
@ -112,13 +108,11 @@ export function updateMemberLabel(params: Record<string, any>) {
* @returns * @returns
*/ */
export function deleteMemberLabel(label_id: number) { export function deleteMemberLabel(label_id: number) {
return request.delete(`member/label/${label_id}`, { showSuccessMessage: true }) return request.delete(`member/label/${label_id}`, {showSuccessMessage: true})
} }
/** /**
* *
* @param label_id label_id
* @returns
*/ */
export function getMemberLabelAll() { export function getMemberLabelAll() {
return request.get(`member/label/all`); return request.get(`member/label/all`);
@ -126,25 +120,20 @@ export function getMemberLabelAll() {
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editMemberDetail(params: Record<string, any>) { export function editMemberDetail(params: Record<string, any>) {
return request.put(`member/member/modify/${params.member_id}/${params.field}`, params, { showSuccessMessage: true }) return request.put(`member/member/modify/${params.member_id}/${params.field}`, params, {showSuccessMessage: true})
} }
/***************************************************** 会员零钱 ****************************************************/ /***************************************************** 会员零钱 ****************************************************/
/***************************************************** 会员账户 ****************************************************/ /***************************************************** 会员账户 ****************************************************/
/** /**
* *
* @param params * @param change_type
* @returns
*/ */
export function getChangeTypeList(change_type: string) { export function getChangeTypeList(change_type: string) {
return request.get(`member/account/change_type/${change_type}`) return request.get(`member/account/change_type/${change_type}`)
@ -156,73 +145,74 @@ export function getChangeTypeList(change_type: string) {
* @returns * @returns
*/ */
export function getPointList(params: Record<string, any>) { export function getPointList(params: Record<string, any>) {
return request.get(`member/account/point`, { params }) return request.get(`member/account/point`, {params})
} }
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function getBalanceList(params: Record<string, any>) { export function getBalanceList(params: Record<string, any>) {
return request.get(`member/account/balance`, { params }) return request.get(`member/account/balance`, {params})
} }
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function getMoneyList(params: Record<string, any>) { export function getMoneyList(params: Record<string, any>) {
return request.get(`member/account/money`, { params }) return request.get(`member/account/money`, {params})
} }
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function getCommissionList(params: Record<string, any>) { export function getCommissionList(params: Record<string, any>) {
return request.get(`member/account/commission`, { params }) return request.get(`member/account/commission`, {params})
} }
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function adjustPoint(params: Record<string, any>) { export function adjustPoint(params: Record<string, any>) {
return request.post(`member/account/point`, params, { showSuccessMessage: true }) return request.post(`member/account/point`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function adjustBalance(params: Record<string, any>) { export function adjustBalance(params: Record<string, any>) {
return request.post(`member/account/balance`, params, { showSuccessMessage: true }) return request.post(`member/account/balance`, params, {showSuccessMessage: true})
} }
/***************************************************** 会员相关设置 ****************************************************/ /***************************************************** 会员相关设置 ****************************************************/
/** /**
* *
* @param params
* @returns
*/ */
export function getLoginConfig() { export function getLoginConfig() {
return request.get(`member/config/login`) return request.get(`member/config/login`)
} }
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function setLoginConfig(params: Record<string, any>) { export function setLoginConfig(params: Record<string, any>) {
return request.post(`member/config/login`, params, { showSuccessMessage: true }) return request.post(`member/config/login`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param params
* @returns
*/ */
export function getMemberConfig() { export function getMemberConfig() {
return request.get(`member/config/member`) return request.get(`member/config/member`)
@ -234,14 +224,12 @@ export function getMemberConfig() {
* @returns * @returns
*/ */
export function setMemberConfig(params: Record<string, any>) { export function setMemberConfig(params: Record<string, any>) {
return request.post(`member/config/member`, params, { showSuccessMessage: true }) return request.post(`member/config/member`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param params
* @returns
*/ */
export function getTransfertype() { export function getTransfertype() {
return request.get(`member/cash_out/transfertype`) return request.get(`member/cash_out/transfertype`)
@ -254,7 +242,7 @@ export function getTransfertype() {
* @returns * @returns
*/ */
export function getCommissionSum(params: Record<string, any>) { export function getCommissionSum(params: Record<string, any>) {
return request.get(`member/account/sum_commission`, { params }) return request.get(`member/account/sum_commission`, {params})
} }
/** /**
@ -263,7 +251,7 @@ export function getCommissionSum(params: Record<string, any>) {
* @returns * @returns
*/ */
export function getPointSum(params: Record<string, any>) { export function getPointSum(params: Record<string, any>) {
return request.get(`member/account/sum_point`, { params }) return request.get(`member/account/sum_point`, {params})
} }
/** /**
@ -272,13 +260,11 @@ export function getPointSum(params: Record<string, any>) {
* @returns * @returns
*/ */
export function getBalanceSum(params: Record<string, any>) { export function getBalanceSum(params: Record<string, any>) {
return request.get(`member/account/sum_balance`, { params }) return request.get(`member/account/sum_balance`, {params})
} }
/** /**
* *
* @param params
* @returns
*/ */
export function getBalanceStatus() { export function getBalanceStatus() {
return request.get(`member/account/type`) return request.get(`member/account/type`)
@ -296,19 +282,18 @@ export function getAccountType(params: Record<string, any>) {
/** /**
* *
* @param params
* @returns
*/ */
export function getCashOutConfig() { export function getCashOutConfig() {
return request.get(`member/config/cash_out`) return request.get(`member/config/cash_out`)
} }
/** /**
* *
* @param params * @param params
* @returns * @returns
*/ */
export function setCashOutConfig(params: Record<string, any>) { export function setCashOutConfig(params: Record<string, any>) {
return request.post(`member/config/cash_out`, params, { showSuccessMessage: true }) return request.post(`member/config/cash_out`, params, {showSuccessMessage: true})
} }
/** /**
@ -317,13 +302,12 @@ export function setCashOutConfig(params: Record<string, any>) {
* @returns * @returns
*/ */
export function getCashOutList(params: Record<string, any>) { export function getCashOutList(params: Record<string, any>) {
return request.get(`member/cash_out`, { params }) return request.get(`member/cash_out`, {params})
} }
/** /**
* *
* @param params * @param id
* @returns id
*/ */
export function getCashOutDetail(id: number) { export function getCashOutDetail(id: number) {
return request.get(`member/cash_out/${id}`, {}) return request.get(`member/cash_out/${id}`, {})
@ -331,38 +315,30 @@ export function getCashOutDetail(id: number) {
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function memberAudit(params: Record<string, any>) { export function memberAudit(params: Record<string, any>) {
return request.put(`member/cash_out/audit/${params.id}/${params.action}`, params, { showSuccessMessage: true }) return request.put(`member/cash_out/audit/${params.id}/${params.action}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function memberTransfer(params: Record<string, any>) { export function memberTransfer(params: Record<string, any>) {
return request.put(`member/cash_out/transfer/${params.id}`, params, { showSuccessMessage: true }) return request.put(`member/cash_out/transfer/${params.id}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editMemberStatus(params: Record<string, any>) { export function editMemberStatus(params: Record<string, any>) {
return request.put(`member/setstatus/${params.status}`, params, { showSuccessMessage: true }) return request.put(`member/setstatus/${params.status}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param params
* @returns
*/ */
export function getCashOutStatusList() { export function getCashOutStatusList() {
return request.get(`member/cash_out/status`) return request.get(`member/cash_out/status`)

50
admin/src/api/module.ts Normal file
View File

@ -0,0 +1,50 @@
import request from '@/utils/request'
/**
*
*/
export function getAuthinfo() {
return request.get('niucloud/authinfo')
}
/**
*
*/
export function setAuthinfo(params: Record<string, any>) {
return request.post('niucloud/authinfo', params, {showSuccessMessage: true})
}
/**
*
*/
export function getAdminAuthinfo() {
return request.get('niucloud/admin/authinfo')
}
/**
*
* @returns
*/
export function getModule() {
return request.get('niucloud/module')
}
/**
*
* @param params
* @returns
*/
export function getModuleVersion() {
return request.get(`niucloud/module`)
}
/**
*
* @param params
* @returns
*/
export function downloadVersion(addon) {
return request.post(`addon/download/${addon}`, {}, {showSuccessMessage: true})
}

View File

@ -25,7 +25,7 @@ export function getNoticeInfo(key: string) {
* @returns * @returns
*/ */
export function getNoticeLog(params: any) { export function getNoticeLog(params: any) {
return request.get(`notice/log`, { params }) return request.get(`notice/log`, {params})
} }
@ -35,7 +35,7 @@ export function getNoticeLog(params: any) {
* @returns * @returns
*/ */
export function editNoticeStatus(params: Record<string, any>) { export function editNoticeStatus(params: Record<string, any>) {
return request.post(`notice/notice/editstatus`, params, { showSuccessMessage: true }) return request.post(`notice/notice/editstatus`, params, {showSuccessMessage: true})
} }
/** /**
@ -44,7 +44,7 @@ export function editNoticeStatus(params: Record<string, any>) {
* @returns * @returns
*/ */
export function editNotice(params: Record<string, any>) { export function editNotice(params: Record<string, any>) {
return request.post(`notice/notice/edit`, params, { showSuccessMessage: true }) return request.post(`notice/notice/edit`, params, {showSuccessMessage: true})
} }
/** /**
@ -66,19 +66,15 @@ export function getSmsInfo(sms_type: string) {
/** /**
* *
* @param sms_type
* @param params * @param params
* @returns
*/ */
export function editSms(params: Record<string, any>) { export function editSms(params: Record<string, any>) {
return request.put(`notice/notice/sms/${params.sms_type}`, params, { showSuccessMessage: true }) return request.put(`notice/notice/sms/${params.sms_type}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param sms_type
* @param params * @param params
* @returns
*/ */
export function getSmsLog(params: Record<string, any>) { export function getSmsLog(params: Record<string, any>) {
return request.get(`notice/sms/log`, params) return request.get(`notice/sms/log`, params)

View File

@ -8,7 +8,7 @@ import request from '@/utils/request'
* @returns * @returns
*/ */
export function getRechargeOrderList(params: Record<string, any>) { export function getRechargeOrderList(params: Record<string, any>) {
return request.get(`order/recharge`, { params }) return request.get(`order/recharge`, {params})
} }
/** /**
@ -17,7 +17,7 @@ export function getRechargeOrderList(params: Record<string, any>) {
* @returns * @returns
*/ */
export function getRechargeStat(params: Record<string, any>) { export function getRechargeStat(params: Record<string, any>) {
return request.get(`order/recharge/stat`, { params }) return request.get(`order/recharge/stat`, {params})
} }
/** /**
@ -42,7 +42,7 @@ export function getRechargeOrderStatusList() {
* @returns * @returns
*/ */
export function getRechargeRefund(params: Record<string, any>) { export function getRechargeRefund(params: Record<string, any>) {
return request.get(`order/recharge/refund`, { params }) return request.get(`order/recharge/refund`, {params})
} }
/** /**
@ -54,15 +54,15 @@ export function getRechargeRefundStatus() {
} }
/** /**
* 退 * 退
* @returns * @returns
*/ */
export function rechargeRefund(id: number) { export function rechargeRefund(id: number) {
return request.put(`order/recharge/refund/${id}`, {}, { showSuccessMessage: true }); return request.put(`order/recharge/refund/${id}`, {}, {showSuccessMessage: true});
} }
/** /**
* 退 * 退
* @returns * @returns
*/ */
export function getRechargeRefundStat() { export function getRechargeRefundStat() {

View File

@ -13,6 +13,6 @@ export function getUserInfo(type: string) {
* @returns * @returns
*/ */
export function setUserInfo(params: Record<string, any>) { export function setUserInfo(params: Record<string, any>) {
return request.put(`auth/edit`, params, { showSuccessMessage: true }); return request.put(`auth/edit`, params, {showSuccessMessage: true});
} }

View File

@ -10,13 +10,12 @@ import request from '@/utils/request'
* @returns * @returns
*/ */
export function getSiteList(params: Record<string, any>) { export function getSiteList(params: Record<string, any>) {
return request.get(`site/site`, { params }) return request.get(`site/site`, {params})
} }
/** /**
* *
* @param id id * @param site_id
* @returns
*/ */
export function getSiteInfo(site_id: number) { export function getSiteInfo(site_id: number) {
return request.get(`site/site/${site_id}`); return request.get(`site/site/${site_id}`);
@ -28,43 +27,35 @@ export function getSiteInfo(site_id: number) {
* @returns * @returns
*/ */
export function addSite(params: Record<string, any>) { export function addSite(params: Record<string, any>) {
return request.post('site/site', params, { showSuccessMessage: true }) return request.post('site/site', params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editSite(params: Record<string, any>) { export function editSite(params: Record<string, any>) {
return request.put(`site/site/${params.site_id}`, params, { showSuccessMessage: true }) return request.put(`site/site/${params.site_id}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function closeSite(params: Record<string, any>) { export function closeSite(params: Record<string, any>) {
return request.put(`site/closesite/${params.site_id}`, params, { showSuccessMessage: true }) return request.put(`site/closesite/${params.site_id}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function openSite(params: Record<string, any>) { export function openSite(params: Record<string, any>) {
return request.put(`site/opensite/${params.site_id}`, params, { showSuccessMessage: true }) return request.put(`site/opensite/${params.site_id}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param params
* @returns
*/ */
export function getStatusList() { export function getStatusList() {
return request.get(`site/statuslist`) return request.get(`site/statuslist`)
@ -79,13 +70,12 @@ export function getStatusList() {
* @returns * @returns
*/ */
export function getSiteGroupList(params: Record<string, any>) { export function getSiteGroupList(params: Record<string, any>) {
return request.get(`site/group`, { params }) return request.get(`site/group`, {params})
} }
/** /**
* *
* @param id id * @param site_id
* @returns
*/ */
export function getSiteGroupInfo(site_id: number) { export function getSiteGroupInfo(site_id: number) {
return request.get(`site/group/${site_id}`); return request.get(`site/group/${site_id}`);
@ -97,27 +87,23 @@ export function getSiteGroupInfo(site_id: number) {
* @returns * @returns
*/ */
export function addSiteGroup(params: Record<string, any>) { export function addSiteGroup(params: Record<string, any>) {
return request.post('site/group', params, { showSuccessMessage: true }) return request.post('site/group', params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editSiteGroup(params: Record<string, any>) { export function editSiteGroup(params: Record<string, any>) {
return request.put(`site/group/${params.group_id}`, params, { showSuccessMessage: true }) return request.put(`site/group/${params.group_id}`, params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id * @param group_id
* @param params
* @returns
*/ */
export function deleteSiteGroup(group_id: number) { export function deleteSiteGroup(group_id: number) {
return request.delete(`site/group/${group_id}`, { showSuccessMessage: true }); return request.delete(`site/group/${group_id}`, {showSuccessMessage: true});
} }
/** /**
@ -137,13 +123,12 @@ export function getSiteGroupAll(params: Record<string, any>) {
* @returns * @returns
*/ */
export function getUserList(params: Record<string, any>) { export function getUserList(params: Record<string, any>) {
return request.get(`site/user`, { params }) return request.get(`site/user`, {params})
} }
/** /**
* *
* @param id id * @param uid
* @returns
*/ */
export function getUserInfo(uid: number) { export function getUserInfo(uid: number) {
return request.get(`site/user/${uid}`); return request.get(`site/user/${uid}`);
@ -155,17 +140,15 @@ export function getUserInfo(uid: number) {
* @returns * @returns
*/ */
export function addUser(params: Record<string, any>) { export function addUser(params: Record<string, any>) {
return request.post('site/user', params, { showSuccessMessage: true }) return request.post('site/user', params, {showSuccessMessage: true})
} }
/** /**
* *
* @param uid
* @param params * @param params
* @returns
*/ */
export function editUser(params: Record<string, any>) { export function editUser(params: Record<string, any>) {
return request.put(`site/user/${params.uid}`, params, { showSuccessMessage: true }) return request.put(`site/user/${params.uid}`, params, {showSuccessMessage: true})
} }
/** /**
@ -174,7 +157,7 @@ export function editUser(params: Record<string, any>) {
* @returns * @returns
*/ */
export function deleteUser(uid: number) { export function deleteUser(uid: number) {
return request.delete(`site/user/${uid}`, { showSuccessMessage: true }) return request.delete(`site/user/${uid}`, {showSuccessMessage: true})
} }
@ -206,14 +189,48 @@ export function unlockUser(uid: number) {
* @returns * @returns
*/ */
export function getLogList(params: Record<string, any>) { export function getLogList(params: Record<string, any>) {
return request.get(`site/log`, { params }) return request.get(`site/log`, {params})
} }
/** /**
* *
* @param params * @param id
* @returns
*/ */
export function getLogInfo(id: number) { export function getLogInfo(id: number) {
return request.get(`site/log/${id}`) return request.get(`site/log/${id}`)
} }
/***************************************************** 账单列表 **************************************************/
/**
*
* @param params
* @returns
*/
export function getAccountList(params: Record<string, any>) {
return request.get(`site/account`, {params})
}
/**
*
* @param id
*/
export function getAccountInfo(id: number) {
return request.get(`site/account/${id}`)
}
/**
*
* @returns
*/
export function getAccountStat() {
return request.get(`site/account/stat`)
}
/**
*
* @returns
*/
export function getAccountType() {
return request.get(`site/account/type`)
}

View File

@ -3,16 +3,13 @@ import request from '@/utils/request'
/***************************************************** 统计信息 **************************************************/ /***************************************************** 统计信息 **************************************************/
/** /**
* *
* @param params
* @returns
*/ */
export function getStatInfo() { export function getStatInfo() {
return request.get(`stat/index`) return request.get(`stat/index`)
} }
/** /**
* *
* @param params
* @returns
*/ */
export function getSiteStatInfo() { export function getSiteStatInfo() {
return request.get(`stat/siteindex`) return request.get(`stat/siteindex`)

View File

@ -17,6 +17,7 @@ export function getInfo() {
export function getUrl() { export function getUrl() {
return request.get('sys/url') return request.get('sys/url')
} }
/***************************************************** 用户组 ****************************************************/ /***************************************************** 用户组 ****************************************************/
/** /**
@ -29,8 +30,7 @@ export function getRoleList(params: Record<string, any>) {
/** /**
* *
* @param params * @param roleId
* @returns
*/ */
export function getRoleInfo(roleId: number) { export function getRoleInfo(roleId: number) {
return request.get(`sys/role/${roleId}`) return request.get(`sys/role/${roleId}`)
@ -47,9 +47,7 @@ export function addRole(params: Record<string, any>) {
/** /**
* *
* @param role_id
* @param params * @param params
* @returns
*/ */
export function editRole(params: Record<string, any>) { export function editRole(params: Record<string, any>) {
return request.put(`sys/role/${params.role_id}`, params, { showSuccessMessage: true }) return request.put(`sys/role/${params.role_id}`, params, { showSuccessMessage: true })
@ -57,8 +55,7 @@ export function editRole(params: Record<string, any>) {
/** /**
* *
* @param role_id * @param roleId
* @returns
*/ */
export function deleteRole(roleId: number) { export function deleteRole(roleId: number) {
return request.delete(`sys/role/${roleId}`, { showSuccessMessage: true }) return request.delete(`sys/role/${roleId}`, { showSuccessMessage: true })
@ -84,8 +81,7 @@ export function getMenus(type: string) {
/** /**
* *
* @param id * @param menu_key
* @returns
*/ */
export function getMenuInfo(menu_key: string) { export function getMenuInfo(menu_key: string) {
return request.get(`sys/menu/info/${menu_key}`); return request.get(`sys/menu/info/${menu_key}`);
@ -102,9 +98,7 @@ export function addMenu(params: Record<string, any>) {
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editMenu(params: Record<string, any>) { export function editMenu(params: Record<string, any>) {
return request.put(`sys/menu/${params.menu_key}`, params, { showSuccessMessage: true }) return request.put(`sys/menu/${params.menu_key}`, params, { showSuccessMessage: true })
@ -112,8 +106,7 @@ export function editMenu(params: Record<string, any>) {
/** /**
* *
* @param id * @param menu_key
* @returns
*/ */
export function deleteMenu(menu_key: string) { export function deleteMenu(menu_key: string) {
return request.delete(`sys/menu/${menu_key}`, { showSuccessMessage: true }) return request.delete(`sys/menu/${menu_key}`, { showSuccessMessage: true })
@ -244,13 +237,50 @@ export function moveAttachment(params: Record<string, any>) {
return request.put(`sys/attachment/batchmove`, params) return request.put(`sys/attachment/batchmove`, params)
} }
/**
* menu菜单
*/
export function getAuthMenu() {
return request.get(`auth/site/showmenu`)
}
/**
*
*/
export function getShortcutMenu() {
return request.get(`sys/config/shortcut_menu`)
}
/**
*
*/
export function setShortcutMenu(params: Record<string, any>) {
return request.put(`sys/config/shortcut_menu`, params, { showSuccessMessage: true })
}
/**
*
* @param params
* @returns
*/
export function getIconCategoryList(params: Record<string, any>) {
return request.get(`sys/attachment/icon_category`, { params })
}
/**
*
* @param params
* @returns
*/
export function getIconList(params: Record<string, any>) {
return request.get(`sys/attachment/icon`, { params })
}
/***************************************************** 地址管理 ****************************************************/ /***************************************************** 地址管理 ****************************************************/
/** /**
* *
* @param params * @param pid
* @returns
*/ */
export function getAreaListByPid(pid: number = 0) { export function getAreaListByPid(pid: number = 0) {
return request.get(`sys/area/list_by_pid/${pid}`) return request.get(`sys/area/list_by_pid/${pid}`)
@ -258,19 +288,31 @@ export function getAreaListByPid(pid: number = 0) {
/** /**
* *
* @param params * @param level
* @returns
*/ */
export function getAreatree(level: number = 1) { export function getAreatree(level: number = 1) {
return request.get(`sys/area/tree/${level}`) return request.get(`sys/area/tree/${level}`)
} }
/**
*
*/
export function getAddressInfo(params: any) {
return request.get(`sys/area/get_info`, { params })
}
/**
*
*/
export function getContraryAddress(params: any) {
return request.get(`sys/area/contrary`, { params })
}
/***************************************************** 存储设置 ****************************************************/ /***************************************************** 存储设置 ****************************************************/
/** /**
* *
* @param params
* @returns
*/ */
export function getStorageList() { export function getStorageList() {
return request.get(`sys/storage`) return request.get(`sys/storage`)
@ -278,8 +320,7 @@ export function getStorageList() {
/** /**
* *
* @param params * @param type
* @returns
*/ */
export function getStorageInfo(type: string) { export function getStorageInfo(type: string) {
return request.get(`sys/storage/${type}`) return request.get(`sys/storage/${type}`)
@ -323,8 +364,7 @@ export function getPayList() {
/***************************************************** 打款设置 ****************************************************/ /***************************************************** 打款设置 ****************************************************/
/** /**
* *
* @returns channel * @param channel
* @returns
*/ */
export function getTransferInfo(channel) { export function getTransferInfo(channel) {
return request.get(`pay/channel/lists/${channel}`) return request.get(`pay/channel/lists/${channel}`)
@ -338,6 +378,7 @@ export function getTransferInfo(channel) {
export function setTransferInfo(params: Record<string, any>) { export function setTransferInfo(params: Record<string, any>) {
return request.post(`pay/channel/set/transfer`, params) return request.post(`pay/channel/set/transfer`, params)
} }
/***************************************************** 定时任务 ****************************************************/ /***************************************************** 定时任务 ****************************************************/
/** /**
@ -345,7 +386,7 @@ export function setTransferInfo(params: Record<string, any>) {
* @returns * @returns
*/ */
export function getCronList(params: any) { export function getCronList(params: any) {
return request.get(`sys/cron`, { params }) return request.get(`sys/schedule/list`, { params })
} }
/** /**
@ -357,11 +398,51 @@ export function getCronInfo(id: string) {
} }
/** /**
* *
* @returns * @returns
*/ */
export function getCronType() { export function getCronTemplate() {
return request.get(`sys/cron/type`) return request.get(`sys/schedule/template`)
}
/**
*
* @returns
*/
export function getCronDateType() {
return request.get(`sys/schedule/datetype`)
}
/**
*
* @returns
*/
export function getWeek() {
return request.get(`sys/date/week`)
}
/**
*
* @returns
*/
export function addCron(params: Record<string, any>) {
return request.post(`sys/schedule`, params, { showSuccessMessage: true })
}
/**
*
* @returns
*/
export function editCron(params: Record<string, any>) {
return request.put(`sys/schedule/${params.id}`, params, { showSuccessMessage: true })
}
/**
*
* @returns
*/
export function deleteCron(id: string) {
return request.delete(`sys/schedule/${id}`, { showSuccessMessage: true })
} }
/***************************************************** 协议管理 ****************************************************/ /***************************************************** 协议管理 ****************************************************/
@ -411,8 +492,6 @@ export function getSceneDomain() {
/** /**
* *
* @param params
* @returns
*/ */
export function getConfigLogin() { export function getConfigLogin() {
return request.get(`sys/config/login`) return request.get(`sys/config/login`)
@ -474,6 +553,7 @@ export function getAppMange() {
export function setMap(params: Record<string, any>) { export function setMap(params: Record<string, any>) {
return request.put(`sys/config/map`, params, { showSuccessMessage: true }) return request.put(`sys/config/map`, params, { showSuccessMessage: true })
} }
/** /**
* *
*/ */
@ -481,5 +561,63 @@ export function getMap() {
return request.get(`sys/config/map`) return request.get(`sys/config/map`)
} }
/***************************************************** 首页 ****************************************************/
/**
*
*/
export function getIndexList() {
return request.get(`sys/config/site_index`)
}
/**
*
*/
export function setIndexList(params: Record<string, any>) {
return request.put(`sys/config/site_index`, params, { showSuccessMessage: true })
}
/**
*
* @returns
*/
export function getLayouts() {
return request.get('sys/layout')
}
/**
*
* @returns
*/
export function setLayout(key: string) {
return request.put('sys/layout', { key }, { showSuccessMessage: true })
}
/**
*
*/
export function getPayAuditList(params: Record<string, any>) {
return request.get('pay/audit', { params })
}
/**
*
* @returns
*/
export function payAuditPass(outTradeNo: string) {
return request.put(`pay/pass/${outTradeNo}`, {}, { showSuccessMessage: true })
}
/**
*
* @returns
*/
export function payAuditRefuse(params: Record<string, any>) {
return request.put(`pay/refuse/${params.out_trade_no}`, params, { showSuccessMessage: true })
}
/**
*
*/
export function getPayDetail(id: number) {
return request.get(`pay/detail/${id}`)
}

View File

@ -8,7 +8,7 @@ import request from '@/utils/request'
* @returns * @returns
*/ */
export function getGenerateTableList(params: Record<string, any>) { export function getGenerateTableList(params: Record<string, any>) {
return request.get(`generator/generator`, { params }) return request.get(`generator/generator`, {params})
} }
/** /**
@ -26,17 +26,15 @@ export function getGenerateTableInfo(id: number) {
* @returns * @returns
*/ */
export function addGenerateTable(params: Record<string, any>) { export function addGenerateTable(params: Record<string, any>) {
return request.post('generator/generator', params, { showSuccessMessage: true }) return request.post('generator/generator', params, {showSuccessMessage: true})
} }
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editGenerateTable(params: Record<string, any>) { export function editGenerateTable(params: Record<string, any>) {
return request.put(`generator/generator/${params.id}`, params, { showSuccessMessage: true }) return request.put(`generator/generator/${params.id}`, params, {showSuccessMessage: true})
} }
/** /**
@ -45,7 +43,7 @@ export function editGenerateTable(params: Record<string, any>) {
* @returns * @returns
*/ */
export function deleteGenerateTable(id: number) { export function deleteGenerateTable(id: number) {
return request.delete(`generator/generator/${id}`, { showSuccessMessage: true }) return request.delete(`generator/generator/${id}`, {showSuccessMessage: true})
} }
/** /**
@ -59,8 +57,6 @@ export function generateCreate(params: Record<string, any>) {
/** /**
* *
* @param file
* @returns
*/ */
export function generateTable() { export function generateTable() {
return request.get(`generator/table`) return request.get(`generator/table`)
@ -68,8 +64,6 @@ export function generateTable() {
/** /**
* *
* @param file
* @returns
*/ */
export function getSystem() { export function getSystem() {
return request.get(`sys/system`) return request.get(`sys/system`)

View File

@ -33,9 +33,7 @@ export function addUser(params: Record<string, any>) {
/** /**
* *
* @param id
* @param params * @param params
* @returns
*/ */
export function editUser(params: Record<string, any>) { export function editUser(params: Record<string, any>) {
return request.put(`user/user/${params.uid}`, params, { showSuccessMessage: true }) return request.put(`user/user/${params.uid}`, params, { showSuccessMessage: true })

View File

@ -14,7 +14,7 @@ export function getWeappConfig() {
* @returns * @returns
*/ */
export function setWeappConfig(params: Record<string, any>) { export function setWeappConfig(params: Record<string, any>) {
return request.put('weapp/config', params, { showSuccessMessage: true }) return request.put('weapp/config', params, {showSuccessMessage: true})
} }
/** /**
@ -31,5 +31,70 @@ export function getTemplateList() {
* @returns * @returns
*/ */
export function getBatchAcquisition(params: Record<string, any>) { export function getBatchAcquisition(params: Record<string, any>) {
return request.put('weapp/template/sync', params, { showSuccessMessage: true }) return request.put('weapp/template/sync', params, {showSuccessMessage: true})
}
/***************************************************** 管理端 ****************************************************/
/**
*
* @param params
* @returns
*/
export function uploadVersion(params: Record<string, any>) {
return request.put('applet/upload', params, {showSuccessMessage: true})
}
/**
*
* @param params
* @returns
*/
export function addVersion(params: Record<string, any>) {
return request.post('applet/version', params, {showSuccessMessage: true})
}
/**
*
* @param params
* @returns
*/
export function getVersionList(params: Record<string, any>) {
return request.get('applet/version', {params})
}
/**
*
* @param params
* @returns
*/
export function getVersionInfo(id: string) {
return request.get(`applet/version/${id}`)
}
/**
*
* @param params
* @returns
*/
export function editVersion(params: Record<string, any>) {
return request.put(`applet/version/${params.id}`, params, {showSuccessMessage: true})
}
/**
*
* @param params
* @returns
*/
export function deleteVersion(id: string) {
return request.delete(`applet/version/${id}`)
}
/**
*
* @param params
* @returns
*/
export function versionDown(id: string) {
return request.get(`applet/version/download/${id}`, { "responseType": "blob" })
} }

View File

@ -10,8 +10,6 @@ export function getWechatConfig() {
/** /**
* *
* @param uid uid
* @returns
*/ */
export function getWechatStatic() { export function getWechatStatic() {
return request.get('wechat/static'); return request.get('wechat/static');
@ -23,7 +21,7 @@ export function getWechatStatic() {
* @returns * @returns
*/ */
export function editWechatConfig(params: Record<string, any>) { export function editWechatConfig(params: Record<string, any>) {
return request.put('wechat/config', params, { showSuccessMessage: true }) return request.put('wechat/config', params, {showSuccessMessage: true})
} }
/** /**
@ -40,7 +38,7 @@ export function getWechatMenu() {
* @returns * @returns
*/ */
export function editWechatMenu(params: Record<string, any>) { export function editWechatMenu(params: Record<string, any>) {
return request.put('wechat/menu', params, { showSuccessMessage: true }) return request.put('wechat/menu', params, {showSuccessMessage: true})
} }
/** /**
@ -58,7 +56,7 @@ export function getTemplateList() {
* @returns * @returns
*/ */
export function getBatchAcquisition(params: Record<string, any>) { export function getBatchAcquisition(params: Record<string, any>) {
return request.put('wechat/template/sync', params, { showSuccessMessage: true }) return request.put('wechat/template/sync', params, {showSuccessMessage: true})
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -73,7 +73,6 @@
import {cloneDeep} from 'lodash-es' import {cloneDeep} from 'lodash-es'
import {getLink} from '@/api/diy'; import {getLink} from '@/api/diy';
import {ElMessage} from 'element-plus' import {ElMessage} from 'element-plus'
import { CollectionTag } from '@element-plus/icons-vue';
const prop = defineProps({ const prop = defineProps({
modelValue: { modelValue: {

View File

@ -0,0 +1,684 @@
<template>
<div>
<div @click="show">
<slot>
<div v-if="value.heatMapData.length">{{ t('selected') }}<span class="text-primary p-[4px]">{{ value.heatMapData.length}}</span>{{ t('selectedAfterHotArea') }}</div>
<div v-else>{{ t('addHotArea') }}</div>
</slot>
</div>
<el-dialog v-model="showDialog" :title="t('hotAreaSet')" width="45%" :close-on-press-escape="false" :destroy-on-close="true" :close-on-click-modal="false">
<div class="flex">
<div class="content-box relative bg-cover bg-gray-100 border border-dashed border-gray-500" :style="{ backgroundImage : 'url(' + img(value.imageUrl) + ')',width : contentBoxWidth + 'px', height : contentBoxHeight + 'px' }">
<div v-for="(item,index) in dragBoxArr" :id="'box_' + index" class="area-box cursor-move border border-solid border-[#ccc] w-[100px] h-[100px] absolute top-0 left-0 select-none p-[5px]" :style="{ left : item.left + item.unit, top : item.top + item.unit }" @mousedown="mouseDown($event,index)">
<span>{{ index + 1 }}</span>
<template v-if="item.link.title">
<span class="p-[4px]">|</span>
<span>{{ item.link.title }}</span>
</template>
<span class="box1" @mousedown.stop="resizeMouseDown($event,index)"></span>
<span class="box2" @mousedown.stop="resizeMouseDown($event,index)"></span>
<span class="box3" @mousedown.stop="resizeMouseDown($event,index)"></span>
<span class="box4" @mousedown.stop="resizeMouseDown($event,index)"></span>
</div>
</div>
<el-form label-width="80px" class="pl-[20px]">
<h3 class="mb-[10px] text-lg text-black">{{ t('hotAreaManage') }}</h3>
<el-button type="primary" plain size="small" class="mb-[10px]" @click="addArea">{{ t('addHotArea') }}</el-button>
<div class="overflow-y-auto h-[300px]">
<template v-for="(item,index) in dragBoxArr">
<div class="mb-[16px]" v-if="item">
<el-form-item :label="t('hotArea') + (index + 1)">
<div class="flex items-center">
<diy-link v-model="item.link"/>
<icon class="del cursor-pointer mx-[10px]" name="element-CircleCloseFilled" color="#bbb" size="20px" @click="dragBoxArr.splice(index,1)"/>
</div>
</el-form-item>
</div>
</template>
</div>
</el-form>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="showDialog = false">{{ t('cancel')}}</el-button>
<el-button type="primary" @click="save">{{ t('confirm') }}</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
import {t} from '@/lang'
import {ref, reactive, computed} from 'vue'
import {ElMessage} from 'element-plus'
import {img} from '@/utils/common'
const prop = defineProps({
modelValue: {
type: String,
default: ''
}
});
const emit = defineEmits(['update:modelValue']);
const value: any = computed({
get() {
return prop.modelValue
},
set(value) {
emit('update:modelValue', value)
}
});
const showDialog = ref(false);
const contentBoxWidth = ref(400);
const contentBoxHeight = ref(400);
const num = ref(4);//
const dragBoxArr: any = reactive([]);
//
const addArea = () => {
let left = dragBoxArr.length % num.value * 100;
let top = Math.floor(dragBoxArr.length / num.value) * 100;
if (top >= contentBoxWidth.value) {
top = 0;
left = 0;
}
dragBoxArr.push({
left: left,
top: top,
width: 100,
height: 100,
unit: 'px',
link: {
name: ''
}
});
};
//
const mouseDown = (e: any, index: number) => {
let box: any = document.getElementById('box_' + index);
let disX = e.clientX - box.offsetLeft;
let disY = e.clientY - box.offsetTop;
//
document.onmousemove = function (e) {
box.style.left = e.clientX - disX + 'px';
box.style.top = e.clientY - disY + 'px';
//
if (e.clientX - disX < 0) {
box.style.left = 0;
}
if (e.clientX - disX > contentBoxWidth.value - box.offsetWidth) {
box.style.left = contentBoxWidth.value - box.offsetWidth + 'px';
}
if (e.clientY - disY < 0) {
box.style.top = 0;
}
if (e.clientY - disY > contentBoxHeight.value - box.offsetHeight) {
box.style.top = contentBoxHeight.value - box.offsetHeight + 'px';
}
};
//
document.onmouseup = function (e) {
document.onmousemove = null;
}
};
//
const resizeMouseDown = (e: any, index: number) => {
var oEv = e;
oEv.stopPropagation();
let box: any = document.getElementById('box_' + index);
let className = e.target.className;
//
var oldWidth = box.offsetWidth;
var oldHeight = box.offsetHeight;
// lefttop
var oldX = oEv.clientX;
var oldY = oEv.clientY;
//
var oldLeft = box.offsetLeft;
var oldTop = box.offsetTop;
//
var minWidth = 50;
var minHeight = 50;
document.onmousemove = function (e) {
var oEv = e;
// console.log('move', "width" + oldWidth,
// 'oldLeft: ' + oldLeft, 'oldTop: ' + oldTop,
// 'oldXclientX-- ' + oldX + '' + oEv.clientX,
// 'oldYclientY-- ' + oldY + '' + oEv.clientY,
// )
//
if (className == "box1") {
let width = oldWidth - (oEv.clientX - oldX);
let maxWidth = contentBoxWidth.value;
let height = oldHeight - (oEv.clientY - oldY);
let maxHeight = contentBoxHeight.value - oldTop;
let left = oldLeft + (oEv.clientX - oldX);
let top = oldTop + (oEv.clientY - oldY);
if (width < minWidth) {
width = minWidth
}
if (width > maxWidth) {
width = maxWidth
}
if (height < minHeight) {
height = minHeight
}
if (height > maxHeight) {
height = maxHeight
}
if (oldLeft == 0 && oldTop == 0) {
// left = 0top = 0
if (width == minWidth && height == minHeight) {
// = left = top =
left = minWidth;
top = minHeight
} else if (width == minWidth && height > minHeight) {
// = > left = top =
left = minWidth;
} else if (width > minWidth && height == minHeight) {
// > = left = top =
top = minHeight
} else if (width > minWidth && height > minHeight) {
// > > left = top =
}
} else if (oldLeft == 0 && oldTop > 0) {
// left = 0top > 0
if (width == minWidth && height == minHeight) {
// = left = top =
left = minWidth;
top = box.offsetTop
} else if (width == minWidth && height > minHeight) {
// = > left = top =
left = minWidth;
top = box.offsetTop;
} else if (width > minWidth && height == minHeight) {
// > = left = top =
top = box.offsetTop;
} else if (width > minWidth && height > minHeight) {
// > > left = top =
}
} else if (oldLeft > 0 && oldTop == 0) {
// left > 0top = 0
if (width == minWidth && height == minHeight) {
// = left = top =
left = box.offsetLeft;
top = box.offsetTop;
} else if (width == minWidth && height > minHeight) {
// = > left = top = 0
left = box.offsetLeft;
top = 0;
} else if (width > minWidth && height == minHeight) {
// > = left = top =
top = box.offsetTop;
} else if (width > minWidth && height > minHeight) {
// > > left = top =
}
} else if (oldLeft > 0 && oldTop > 0) {
// left > 0top > 0
if (width == minWidth && height == minHeight) {
// = left = top =
left = box.offsetLeft;
top = box.offsetTop
} else if (width == minWidth && height > minHeight) {
// = > left = top =
left = box.offsetLeft;
top = box.offsetTop;
} else if (width > minWidth && height == minHeight) {
// > = left = top =
top = box.offsetTop;
} else if (width > minWidth && height > minHeight) {
// > > left = top =
}
}
//
if (left < 0) {
left = 0;
width = oldWidth - (oEv.clientX - oldX) + (oldLeft + (oEv.clientX - oldX));
}
//
if (top < 0) {
top = 0;
height = oldTop + (oEv.clientY - oldY) + (oldHeight - (oEv.clientY - oldY));
}
box.style.width = width + 'px';
box.style.height = height + 'px';
box.style.left = left + 'px';
box.style.top = top + 'px';
} else if (className == "box2") {
//
let width = oldWidth + (oEv.clientX - oldX);
let maxWidth = contentBoxWidth.value - oldLeft;
let height = oldHeight - (oEv.clientY - oldY);
let maxHeight = contentBoxHeight.value - oldTop;
let top = oldTop + (oEv.clientY - oldY);
if (width < minWidth) {
width = minWidth
}
if (width > maxWidth) {
width = maxWidth
}
if (height < minHeight) {
height = minHeight
}
if (height > maxHeight) {
height = maxHeight
}
if (oldLeft == 0 && oldTop == 0) {
// left = 0top = 0
if (width == minWidth && height == minHeight) {
// = top =
top = minHeight
} else if (width == minWidth && height > minHeight) {
// = >
} else if (width > minWidth && height == minHeight) {
// > = top =
top = minHeight
} else if (width > minWidth && height > minHeight) {
// > >
}
} else if (oldLeft == 0 && oldTop > 0) {
// left = 0top > 0
if (width == minWidth && height == minHeight) {
// = top =
top = box.offsetTop
} else if (width == minWidth && height > minHeight) {
// = > top =
top = box.offsetTop
} else if (width > minWidth && height == minHeight) {
// > = top =
top = box.offsetTop
} else if (width > minWidth && height > minHeight) {
// > >
}
} else if (oldLeft > 0 && oldTop == 0) {
// left = 0top = 0
if (width == minWidth && height == minHeight) {
// = top =
top = box.offsetTop
} else if (width == minWidth && height > minHeight) {
// = > top = 0
top = 0
} else if (width > minWidth && height == minHeight) {
// > = top =
top = box.offsetTop
} else if (width > minWidth && height > minHeight) {
// > >
}
} else if (oldLeft > 0 && oldTop > 0) {
// left > 0top > 0
if (width == minWidth && height == minHeight) {
// = top =
top = box.offsetTop
} else if (width == minWidth && height > minHeight) {
// = > top =
top = box.offsetTop
} else if (width > minWidth && height == minHeight) {
// > = top =
top = box.offsetTop
} else if (width > minWidth && height > minHeight) {
// > >
}
}
//
if (top < 0) {
top = 0;
height = oldTop + (oEv.clientY - oldY) + (oldHeight - (oEv.clientY - oldY))
}
box.style.width = width + 'px';
box.style.height = height + 'px';
box.style.top = top + 'px';
} else if (className == "box3") {
//
let width = oldWidth - (oEv.clientX - oldX);
let maxWidth = contentBoxWidth.value;
let height = oldHeight + (oEv.clientY - oldY);
let maxHeight = contentBoxHeight.value - oldTop;
let left = oldLeft + (oEv.clientX - oldX);
if (width < minWidth) {
width = minWidth
}
if (width > maxWidth) {
width = maxWidth
}
if (height < minHeight) {
height = minHeight
}
if (height > maxHeight) {
height = maxHeight
}
if (oldLeft == 0 && oldTop == 0) {
// left = 0top = 0
if (width == minWidth && height == minHeight) {
// = left =
left = minWidth;
} else if (width == minWidth && height > minHeight) {
// = > left =
left = minWidth;
} else if (width > minWidth && height == minHeight) {
// > =
} else if (width > minWidth && height > minHeight) {
// > >
}
} else if (oldLeft == 0 && oldTop > 0) {
// left = 0top > 0
if (width == minWidth && height == minHeight) {
// = left =
left = minWidth;
} else if (width == minWidth && height > minHeight) {
// = > left =
left = minWidth;
} else if (width > minWidth && height == minHeight) {
// > =
} else if (width > minWidth && height > minHeight) {
// > >
}
} else if (oldLeft > 0 && oldTop == 0) {
// left > 0top = 0
if (width == minWidth && height == minHeight) {
// = left =
left = box.offsetLeft;
} else if (width == minWidth && height > minHeight) {
// = > left =
left = box.offsetLeft;
} else if (width > minWidth && height == minHeight) {
// > =
} else if (width > minWidth && height > minHeight) {
// > >
}
} else if (oldLeft > 0 && oldTop > 0) {
// left > 0top > 0
if (width == minWidth && height == minHeight) {
// = left =
left = box.offsetLeft;
} else if (width == minWidth && height > minHeight) {
// = > left =
left = box.offsetLeft;
} else if (width > minWidth && height == minHeight) {
// > =
} else if (width > minWidth && height > minHeight) {
// > >
}
}
if (left < 0) {
left = 0;
width = oldWidth - (oEv.clientX - oldX) + (oldLeft + (oEv.clientX - oldX));
}
box.style.width = width + 'px';
box.style.height = height + 'px';
box.style.left = left + 'px';
} else if (className == "box4") {
//
let width = oldWidth + (oEv.clientX - oldX);
let maxWidth = contentBoxWidth.value - oldLeft;
let height = oldHeight + (oEv.clientY - oldY);
let maxHeight = contentBoxHeight.value - oldTop;
if (width < minWidth) {
width = minWidth
}
if (width > maxWidth) {
width = maxWidth
}
if (height < minHeight) {
height = minHeight
}
if (height > maxHeight) {
height = maxHeight
}
box.style.width = width + 'px';
box.style.height = height + 'px';
}
dragBoxArr[index].unit = 'px'
};
//
document.onmouseup = function () {
document.onmousemove = null;
document.onmouseup = null;
}
};
const show = () => {
//
if (!value.value.imageUrl) {
ElMessage({
type: 'warning',
message: `${t('imageUrlTip')}`,
});
return;
}
if (Object.keys(value.value.heatMapData).length) {
dragBoxArr.splice(0, dragBoxArr.length, ...value.value.heatMapData);
} else {
dragBoxArr.splice(0, dragBoxArr.length);
addArea();
}
showDialog.value = true
};
const save = () => {
var isOk = true;
for (let i = 0; i < dragBoxArr.length; i++) {
if (!dragBoxArr[i].link.title) {
ElMessage({
type: 'warning',
message: t('selectedHotArea') + (i + 1) + t('hotAreaLink'),
});
isOk = false;
break;
}
}
if (!isOk) return;
dragBoxArr.forEach((item: any, index: number) => {
var box: any = document.getElementById('box_' + index);
item.width = parseFloat(box.offsetWidth / contentBoxWidth.value * 100).toFixed(2);
item.height = parseFloat(box.offsetHeight / contentBoxHeight.value * 100).toFixed(2);
item.left = parseFloat(box.offsetLeft / contentBoxWidth.value * 100).toFixed(2);
item.top = parseFloat(box.offsetTop / contentBoxHeight.value * 100).toFixed(2);
item.unit = '%';
});
value.value.heatMapData = dragBoxArr;
showDialog.value = false
};
defineExpose({
showDialog
})
</script>
<style lang="scss" scoped>
.area-box {
background-color: rgba(255, 255, 255, 0.7);
}
.box1, .box2, .box3, .box4 {
width: 10px;
height: 10px;
background-color: #fff;
position: absolute;
border-radius: 50%;
border: 1px solid #333;
}
.box1 {
top: -5px;
left: -5px;
cursor: nw-resize;
}
.box2 {
top: -5px;
right: -5px;
cursor: ne-resize;
}
.box3 {
left: -5px;
bottom: -5px;
cursor: sw-resize;
}
.box4 {
bottom: -5px;
right: -5px;
cursor: se-resize;
}
</style>

View File

@ -1,9 +1,13 @@
<script lang="ts"> <template>
import { createVNode, resolveComponent, defineComponent } from 'vue' <el-icon v-if="type=='element'" :style="style" :class="['icon el-icon',props.class]">
<component :is="name"/>
</el-icon>
<i v-else :class="[type,name,props.class]" :style="style"></i>
</template>
<script lang="ts" setup>
import {watch, ref, reactive} from 'vue'
export default defineComponent({ const props = defineProps({
name: 'Icon',
props: {
name: { name: {
type: String, type: String,
required: true required: true
@ -20,23 +24,25 @@ export default defineComponent({
type: String, type: String,
default: '16px' default: '16px'
}, },
}, })
setup(props) {
let [type, name] = props.name.split(/-(.*)/)
let style = { const type = ref('');
const name = ref('');
const style = reactive({
color: props.color, color: props.color,
fontSize: props.size fontSize: props.size
} });
switch (type) { const load = () => {
case 'element': let arr = props.name.split(/-(.*)/);
return () => createVNode('el-icon', { class: ['icon el-icon', props.class], style: style }, [createVNode(resolveComponent(name))]) type.value = arr[0];
break; name.value = arr[1];
case 'iconfont': };
return () => createVNode('i', { class: [name, 'iconfont', props.class], style: style })
break; load();
}
} watch(() => props.name, () => {
}) load();
})
</script> </script>

View File

@ -1,71 +1,145 @@
<template> <template>
<el-popover trigger="click" v-model:visible="visible"> <div class="flex flex-wrap">
<template #reference> <template v-if="limit == 1">
<slot name="reference"></slot> <div class="rounded cursor-pointer overflow-hidden relative border border-dashed border-color icon-wrap mr-[10px]" :style="style">
<div class="w-full h-full relative" v-if="icons.data.length">
<div class="w-full h-full flex items-center justify-center">
<icon :name="icons.data[0]" size="40px"></icon>
</div>
<div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60 operation">
<icon name="element-Delete" color="#fff" size="18px" @click="removeIcon"/>
</div>
</div>
<upload-attachment :limit="limit" type="icon" @confirm="confirmSelect" v-else>
<div class="w-full h-full flex items-center justify-center flex-col">
<icon name="element-Plus" size="20px" color="var(--el-text-color-secondary)"/>
<div class="leading-none text-xs mt-[10px] text-secondary">{{ iconText || t('upload.selecticon') }}</div>
</div>
</upload-attachment>
</div>
</template> </template>
<div class="flex w-full flex-col"> <template v-else>
<div class="head flex w-full mb-[10px]"> <div class="rounded cursor-pointer overflow-hidden relative border border-dashed border-color icon-wrap mr-[10px]" :style="style" v-for="(item, index) in icons.data" :key="index">
<span>请选择图标</span> <div class="w-full h-full relative">
<div class="flex justify-end flex-auto"> <div class="w-full h-full flex items-center justify-center">
<span class="ml-[10px] cursor-pointer" :class="{ active: type == 'element' }" @click="type = 'element'">element</span> <icon :name="item" size="40px"></icon>
<span class="ml-[10px] cursor-pointer" :class="{ active: type == 'iconfont' }" @click="type = 'iconfont'">iconfont</span> </div>
<div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60 operation">
<icon name="element-Delete" color="#fff" size="18px" @click="removeIcon(index)"/>
</div> </div>
</div> </div>
<div class="icon-wrap h-[240px]">
<el-scrollbar>
<div class="flex flex-wrap" v-show="type == 'element'">
<el-button v-for="icon in element" class="w-[35px] h-[35px] icon-item" @click="selectIcon('element-' + icon)">
<icon :name="'element-' + icon" />
</el-button>
</div> </div>
<div class="flex flex-wrap" v-show="type == 'iconfont'"> <div class="rounded cursor-pointer overflow-hidden relative border border-dashed border-color" :style="style" v-if="icons.data.length < limit">
<el-button v-for="icon in iconfont" class="w-[35px] h-[35px] icon-item" @click="selectIcon('iconfont-' + icon)"> <upload-attachment :limit="limit" @confirm="confirmSelect">
<icon :name="'iconfont-' + icon" /> <div class="w-full h-full flex items-center justify-center flex-col">
</el-button> <icon name="element-Plus" size="20px" color="var(--el-text-color-secondary)"/>
<div class="leading-none text-xs mt-[10px] text-secondary">{{ iconText || t('upload.selecticon') }}</div>
</div> </div>
</el-scrollbar> </upload-attachment>
</div> </div>
</template>
</div> </div>
</el-popover>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, ref } from 'vue' import {computed, reactive, watch, toRaw} from 'vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue' import {t} from '@/lang'
const type = ref('element') const prop = defineProps({
const visible = ref('false') modelValue: {
type: String,
// element default: ''
const element = computed(() => { },
return Object.keys(ElementPlusIconsVue) width: {
}) type: String,
default: '100px'
// iconfont },
const iconfont = computed(() => { height: {
const iconfile = import.meta.globEager('@/styles/iconfont.css')['/src/styles/iconfont.css'].default type: String,
const icons = Array.from(iconfile.matchAll(/(icon.*)\:before/g)) default: '100px'
},
return icons.map(item => { iconText: {
return item[1] type: String
},
limit: {
type: Number,
default: 1
}
}) })
})
const emit = defineEmits(['select']) const emit = defineEmits(['update:modelValue', 'change'])
const value = computed({
get() {
return prop.modelValue
},
set(value) {
emit('update:modelValue', value)
}
})
const icons: Record<string, any> = reactive({
data: []
})
const setValue = () => {
value.value = toRaw(icons.data).toString()
}
watch(() => value.value, () => {
icons.data = [
...value.value.split(',').filter((item: string) => {
return item
})
]
setValue()
}, {immediate: true})
const style = computed(() => {
return {
width: prop.width,
height: prop.height
}
})
/**
* 选择图标
*/
const confirmSelect = (data: Record<string, any>) => {
if (prop.limit == 1) {
icons.data.splice(0, 1)
data && icons.data.push(data.url)
} else {
data.forEach((item: any) => {
if (icons.data.length < prop.limit) icons.data.push(item.url)
})
}
setValue()
emit('change', value.value)
}
/**
* 删除图标
* @param index
*/
const removeIcon = (index: number = 0) => {
icons.data.splice(index, 1)
setValue()
}
//
const selectIcon = (name) => {
emit('select', name)
visible.value = false
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.icon-item { .icon-wrap {
margin: 6px 6px 6px 0; .operation {
} display: none;
}
.active { &:hover {
color: var(--el-color-primary); .operation {
} display: flex;
}
}
}
</style> </style>

View File

@ -3,8 +3,7 @@
<!-- 分组 --> <!-- 分组 -->
<div class="group-wrap w-[180px] p-[15px] h-full border-r border-color flex flex-col"> <div class="group-wrap w-[180px] p-[15px] h-full border-r border-color flex flex-col">
<el-input v-model="categoryParam.name" class="m-0" :placeholder="t('upload.attachmentCategoryPlaceholder')" clearable <el-input v-model="categoryParam.name" class="m-0" :placeholder="t('upload.attachmentCategoryPlaceholder')" clearable prefix-icon="Search" @input="getAttachmentCategoryList()"/>
prefix-icon="Search" @input="getAttachmentCategoryList()" />
<div class="group-list flex-1 my-[10px]"> <div class="group-list flex-1 my-[10px]">
<el-scrollbar> <el-scrollbar>
<div class="group-item p-[10px] leading-none text-xs rounded cursor-pointer" :class="{ active: attachmentParam.cate_id == 0 }" @click="attachmentParam.cate_id = 0"> <div class="group-item p-[10px] leading-none text-xs rounded cursor-pointer" :class="{ active: attachmentParam.cate_id == 0 }" @click="attachmentParam.cate_id = 0">
@ -12,10 +11,11 @@
</div> </div>
<div class="group-item px-[10px] text-xs rounded cursor-pointer flex" v-for="(item, index) in attachmentCategory.data" :key="index" :class="{ active: attachmentParam.cate_id == item.id }"> <div class="group-item px-[10px] text-xs rounded cursor-pointer flex" v-for="(item, index) in attachmentCategory.data" :key="index" :class="{ active: attachmentParam.cate_id == item.id }">
<div class="flex-1 leading-none truncate py-[10px]" @click="attachmentParam.cate_id = item.id">{{item.name }}</div> <div class="flex-1 leading-none truncate py-[10px]" @click="attachmentParam.cate_id = item.id">{{item.name }}</div>
<div class="leading-none operate py-[10px]" v-if="scene == 'attachment'"> <div class="leading-none operate py-[10px]" v-if="scene == 'attachment' && prop.type !='icon' ">
<!-- 图片操作 --> <!-- 图片操作 -->
<el-dropdown :hide-on-click="false" v-if="scene == 'attachment'"> <el-dropdown :hide-on-click="false" v-if="scene == 'attachment'">
<icon name="element-MoreFilled" class="cursor-pointer ml-[10px]" size="14px" />{{item.name}} <icon name="element-MoreFilled" class="cursor-pointer ml-[10px]" size="14px"/>
{{item.name}}
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item class="text-center"> <el-dropdown-item class="text-center">
@ -34,47 +34,50 @@
</el-scrollbar> </el-scrollbar>
</div> </div>
<!-- 添加分组 --> <!-- 添加分组 -->
<popover-input :placeholder="t('upload.attachmentCategoryPlaceholder')" @confirm="addAttachmentCategory"> <popover-input :placeholder="t('upload.attachmentCategoryPlaceholder')" @confirm="addAttachmentCategory" v-if="prop.type !='icon'">
<el-button>{{ t('upload.addAttachmentCategory') }}</el-button> <el-button>{{ t('upload.addAttachmentCategory') }}</el-button>
</popover-input> </popover-input>
</div> </div>
<!-- 素材 --> <!-- 素材 -->
<div class="attachment-list-wrap flex flex-col p-[15px] flex-1"> <div class="attachment-list-wrap flex flex-col p-[15px] flex-1 overflow-hidden">
<el-row :gutter="15" class="h-[32px]"> <el-row :gutter="15" class="h-[32px]">
<el-col :span="12"> <el-col :span="10">
<div class="flex"> <div class="flex">
<el-upload v-bind="upload" ref="uploadRef"> <el-upload v-bind="upload" ref="uploadRef" v-if="prop.type !='icon'">
<el-button type="primary">{{ t('upload.upload' + type) }} {{ isOpen }}</el-button> <el-button type="primary">{{ t('upload.upload' + type) }} {{ isOpen }}</el-button>
</el-upload> </el-upload>
<div v-if="scene == 'attachment'"> <div v-if="scene == 'attachment' && prop.type !='icon'">
<el-button v-if="operate === false" class="ml-[10px]" type="primary" @click="operate = true">{{t('edit') }}</el-button> <el-button v-if="operate === false" class="ml-[10px]" type="primary" @click="operate = true">{{t('edit') }}
</el-button>
<el-button v-else class="ml-[10px]" type="primary" @click="operate = false">{{ t('complete') }}</el-button> <el-button v-else class="ml-[10px]" type="primary" @click="operate = false">{{ t('complete') }}</el-button>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="12" class="text-right"> <el-col :span="14" class="text-right">
<el-input v-model="attachmentParam.real_name" class="m-0 w-[200px]" clearable :placeholder="t('upload.placeholder' + type + 'Name')" prefix-icon="Search" @input="getAttachmentList()" /> <el-input v-model="attachmentParam.real_name" class="m-0 w-[200px]" clearable :placeholder="t('upload.placeholder' + type + 'Name')" prefix-icon="Search" @input="getAttachmentList()"/>
</el-col> </el-col>
</el-row> </el-row>
<div class="flex-1 my-[15px] h-0" v-loading="attachment.loading"> <div class="flex-1 my-[15px] h-0" v-loading="attachment.loading">
<el-scrollbar> <el-scrollbar>
<!-- 选择弹出框 -->
<div class="flex flex-wrap" v-if="attachment.data.length && (operate === true || scene != 'attachment')"> <div class="flex flex-wrap" v-if="attachment.data.length && (operate === true || scene != 'attachment')">
<div class="attachment-item mr-[10px]" :class="scene == 'select' ? 'w-[100px]' : 'w-[120px]'" v-for="(item, index) in attachment.data" :key="index"> <div class="attachment-item mr-[10px]" :class="scene == 'select' ? 'w-[100px]' : 'w-[120px]'" v-for="(item, index) in attachment.data" :key="index">
<div class="attachment-wrap w-full rounded cursor-pointer overflow-hidden relative flex items-center justify-center" :class="scene == 'select' ? 'h-[100px]' : 'h-[120px]'" @click="selectFile(item)"> <div class="attachment-wrap w-full rounded cursor-pointer overflow-hidden relative flex items-center justify-center" :class="scene == 'select' ? 'h-[100px]' : 'h-[120px]'" @click="selectFile(item)">
<el-image :src="img(item.url)" fit="contain" v-if="type == 'image'"></el-image> <el-image :src="img(item.url)" fit="contain" v-if="type == 'image'"></el-image>
<video :src="img(item.url)" v-else></video> <video :src="img(item.url)" v-else-if="type == 'video'"></video>
<icon :name="item.url" size="40px" v-else-if="type == 'icon'"></icon>
<div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60" v-show="selectedFile[item.att_id]"> <div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60" v-show="selectedFile[item.att_id]">
<icon name="element-Select" color="#fff" size="25px" /> <icon name="element-Select" color="#fff" size="40px"/>
</div> </div>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<el-tooltip placement="top"> <el-tooltip placement="top">
<template #content>{{ item.real_name }}</template> <template #content>{{ item.real_name }}</template>
<div class="truncate my-[10px] cursor-pointer text-base flex-1 ">{{ item.real_name }}</div> <div class="truncate my-[10px] cursor-pointer text-base flex-1 text-center">{{ item.real_name }}</div>
</el-tooltip> </el-tooltip>
<!-- 图片操作 --> <!-- 图片操作 -->
<el-dropdown :hide-on-click="false" v-if="scene == 'attachment'" class="attachment-action hidden "> <el-dropdown :hide-on-click="false" v-if="scene == 'attachment'" class="attachment-action hidden ">
<icon name="element-MoreFilled" class="cursor-pointer ml-[8px]" size="14px" /> <icon name="element-MoreFilled" class="cursor-pointer ml-[8px]" size="14px"/>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item class="text-center" @click="previewImage(index)" v-if="item.att_type == 'image'"> <el-dropdown-item class="text-center" @click="previewImage(index)" v-if="item.att_type == 'image'">
@ -95,36 +98,42 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 素材管理 -->
<div class="flex flex-wrap" v-else-if="attachment.data.length && operate === false"> <div class="flex flex-wrap" v-else-if="attachment.data.length && operate === false">
<div class="attachment-item mr-[10px] w-[120px]" v-for="(item, index) in attachment.data" :key="index"> <div class="attachment-item mr-[10px] w-[120px]" v-for="(item, index) in attachment.data" :key="index">
<div class="attachment-wrap w-full rounded cursor-pointer overflow-hidden relative flex items-center justify-center h-[120px]"> <div class="attachment-wrap w-full rounded cursor-pointer overflow-hidden relative flex items-center justify-center h-[120px]">
<el-image :src="img(item.url)" fit="contain" v-if="type == 'image'" :preview-src-list="item.image_list"></el-image> <el-image :src="img(item.url)" fit="contain" v-if="type == 'image'" :preview-src-list="item.image_list"></el-image>
<video :src="img(item.url)" v-else></video> <video :src="img(item.url)" v-else-if="type == 'video'"></video>
<icon :name="item.url" size="40px" v-else-if="type == 'icon'"></icon>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<el-tooltip placement="top"> <el-tooltip placement="top">
<template #content>{{ item.real_name }}</template> <template #content>{{ item.real_name }}</template>
<div class="truncate my-[10px] cursor-pointer text-base flex-1 ">{{ item.real_name }}</div> <div class="truncate my-[10px] cursor-pointer text-base flex-1 text-center">{{ item.real_name }}</div>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
</div> </div>
<div class="flex items-center justify-center" v-else> <div class="flex items-center justify-center" v-else>
<el-empty v-if="!attachment.loading" :description="t('upload.attachmentEmpty')" :image-size="100" /> <el-empty v-if="!attachment.loading" :description="type == 'icon' ? t('upload.iconEmpty') : t('upload.attachmentEmpty')" :image-size="100"/>
</div> </div>
</el-scrollbar> </el-scrollbar>
</div> </div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8" v-if="scene == 'attachment' && operate === true"> <el-col :span="8" v-if="scene == 'attachment' && operate === true">
<div class="flex items-center"> <div class="flex items-center">
<el-checkbox v-model="selectAll" :label="t('selectAll')" size="large" /> <el-checkbox v-model="selectAll" :label="t('selectAll')" size="large"/>
<el-button class="ml-[15px]" :disabled="batchOperateDisabled" @click="deleteAttachmentEvent()">{{t('delete') }}</el-button> <el-button class="ml-[15px]" :disabled="batchOperateDisabled" @click="deleteAttachmentEvent()">{{t('delete') }}</el-button>
<el-button :disabled="batchOperateDisabled" @click="moveAttachmentEvent()">{{ t('upload.move') }}</el-button> <el-button :disabled="batchOperateDisabled" @click="moveAttachmentEvent()">{{ t('upload.move') }}</el-button>
</div> </div>
</el-col> </el-col>
<el-col :span="scene == 'attachment' ? 16 : 24"> <el-col :span="scene == 'attachment' ? 16 : 24">
<div class="flex h-full justify-end items-center"> <div class="flex h-full justify-end items-center">
<el-pagination v-model:current-page="attachment.page" :small="true" v-model:page-size="attachment.limit" :page-sizes="[10, 20, 40, 60]" layout="total, sizes, prev, pager, next, jumper" :total="attachment.total" @size-change="getAttachmentList()" @current-change="getAttachmentList" /> <el-pagination v-model:current-page="attachment.page" :small="true"
v-model:page-size="attachment.limit" :page-sizes="[10, 20, 30, 40, 60]"
layout="total, sizes, prev, pager, next, jumper" :total="attachment.total"
@size-change="getAttachmentList()" @current-change="getAttachmentList"/>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -136,7 +145,7 @@
<el-form label-width="60px"> <el-form label-width="60px">
<el-form-item :label="t('upload.moveTo')" style="margin-bottom: 0;"> <el-form-item :label="t('upload.moveTo')" style="margin-bottom: 0;">
<el-select v-model="moveAttachmentData.cateId" class="input-width"> <el-select v-model="moveAttachmentData.cateId" class="input-width">
<el-option :label="item.name" :value="item.id" v-for="(item, index) in attachmentCategory.data" :key="index" /> <el-option :label="item.name" :value="item.id" v-for="(item, index) in attachmentCategory.data" :key="index"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -150,11 +159,11 @@
</el-dialog> </el-dialog>
<!-- 图片预览 --> <!-- 图片预览 -->
<el-image-viewer :url-list="previewImageList" v-if="imageViewer.show" @close="imageViewer.show = false" :initial-index="imageViewer.index" :zoom-rate="1" /> <el-image-viewer :url-list="previewImageList" v-if="imageViewer.show" @close="imageViewer.show = false" :initial-index="imageViewer.index" :zoom-rate="1"/>
<!-- 视频预览 --> <!-- 视频预览 -->
<el-dialog v-model="videoViewer.visible" width="50%" align-center :destroy-on-close="true" custom-class="video-preview"> <el-dialog v-model="videoViewer.visible" width="50%" align-center :destroy-on-close="true" custom-class="video-preview">
<video-player :src="videoViewer.src" width="100%" /> <video-player :src="videoViewer.src" width="100%"/>
</el-dialog> </el-dialog>
</template> </template>
@ -162,23 +171,25 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, watch, computed, toRaw } from 'vue' import {ref, reactive, watch, computed, toRaw} from 'vue'
import { t } from '@/lang' import {t} from '@/lang'
import { import {
getAttachmentCategoryList as attachmentCategoryList, getAttachmentCategoryList as attachmentCategoryList,
getAttachmentList as attachmentList, getAttachmentList as attachmentList,
addAttachmentCategory as addCategory, addAttachmentCategory as addCategory,
editAttachmentCategory as updateCategory, editAttachmentCategory as updateCategory,
deleteAttachmentCategory as deleteCategory, deleteAttachmentCategory as deleteCategory,
deleteAttachment, deleteAttachment,
moveAttachment moveAttachment,
} from '@/api/sys' getIconCategoryList,
import { debounce, img, getToken } from '@/utils/common' getIconList
import { ElMessage, UploadFile, UploadFiles, ElMessageBox } from 'element-plus' } from '@/api/sys'
import storage from '@/utils/storage' import {debounce, img, getToken} from '@/utils/common'
import {ElMessage, UploadFile, UploadFiles, ElMessageBox} from 'element-plus'
import storage from '@/utils/storage'
const operate = ref(false) const operate = ref(false)
const prop = defineProps({ const prop = defineProps({
// //
limit: { limit: {
type: Number, type: Number,
@ -193,34 +204,50 @@ const prop = defineProps({
type: String, type: String,
default: 'select' // select attachment default: 'select' // select attachment
} }
}) })
// //
const selectedFile: Record<string, any> = reactive({}) const selectedFile: Record<string, any> = reactive({})
const attachmentCategory: Record<string, any> = reactive({ const attachmentCategory: Record<string, any> = reactive({
data: [] data: []
}) })
const attachment: Record<string, any> = reactive({
const attachment: Record<string, any> = reactive({
loading: true, loading: true,
page: 1, page: 1,
total: 0, total: 0,
limit: prop.scene == 'select' ? 10 : 20, limit: prop.scene == 'select' ? 10 : 20,
data: [] data: []
}) })
const categoryParam = reactive({
if( prop.scene == 'select'){
attachment.limit = 10;
if(prop.type == 'icon'){
attachment.limit = 20;
}
}else{
attachment.limit = 20;
if(prop.type == 'icon'){
attachment.limit = 30;
}
}
const categoryParam = reactive({
name: '' name: ''
}) })
const attachmentParam = reactive({
const attachmentParam = reactive({
real_name: '', real_name: '',
cate_id: 0 cate_id: 0
}) })
/** /**
* 查询分组 * 查询分组
*/ */
const getAttachmentCategoryList = debounce(() => { const getAttachmentCategoryList = debounce(() => {
attachmentCategoryList({ let getFn = prop.type == 'icon' ? getIconCategoryList : attachmentCategoryList;
getFn({
type: prop.type, type: prop.type,
...categoryParam ...categoryParam
}).then(res => { }).then(res => {
@ -228,16 +255,19 @@ const getAttachmentCategoryList = debounce(() => {
}).catch(() => { }).catch(() => {
}) })
}) })
getAttachmentCategoryList()
/** getAttachmentCategoryList()
/**
* 查询图片 * 查询图片
*/ */
const getAttachmentList = debounce((page: number = 1) => { const getAttachmentList = debounce((page: number = 1) => {
let getFn = prop.type == 'icon' ? getIconList : attachmentList;
attachment.loading = true attachment.loading = true
attachment.page = page attachment.page = page
attachmentList({ getFn({
page: attachment.page, page: attachment.page,
limit: attachment.limit, limit: attachment.limit,
att_type: prop.type, att_type: prop.type,
@ -248,26 +278,28 @@ const getAttachmentList = debounce((page: number = 1) => {
attachment.loading = false attachment.loading = false
prop.scene == 'attachment' && clearSelected() prop.scene == 'attachment' && clearSelected()
if (prop.type != 'icon') {
for (let i = 0; i < attachment.data.length; i++) { for (let i = 0; i < attachment.data.length; i++) {
attachment.data[i]['image_list'] = [] attachment.data[i]['image_list'] = []
attachment.data[i]['image_list'].push(img(res.data.data[i]['url'])) attachment.data[i]['image_list'].push(img(res.data.data[i]['url']))
} }
}
}).catch(() => { }).catch(() => {
attachment.loading = false attachment.loading = false
}) })
})
getAttachmentList()
watch(() => attachmentParam.cate_id, () => { })
getAttachmentList() getAttachmentList()
})
/** watch(() => attachmentParam.cate_id, () => {
getAttachmentList()
})
/**
* 添加分组 * 添加分组
*/ */
const addAttachmentCategory = (name: string) => { const addAttachmentCategory = (name: string) => {
addCategory({ addCategory({
type: prop.type, type: prop.type,
name name
@ -276,14 +308,14 @@ const addAttachmentCategory = (name: string) => {
}).catch(() => { }).catch(() => {
}) })
} }
/** /**
* 编辑分组 * 编辑分组
* @param name * @param name
* @param index * @param index
*/ */
const updateAttachmentCategory = (name: string, index: number) => { const updateAttachmentCategory = (name: string, index: number) => {
updateCategory({ updateCategory({
id: attachmentCategory.data[index].id, id: attachmentCategory.data[index].id,
name name
@ -292,12 +324,12 @@ const updateAttachmentCategory = (name: string, index: number) => {
}).catch(() => { }).catch(() => {
}) })
} }
/** /**
* 删除分组 * 删除分组
*/ */
const deleteAttachmentCategory = (index: number) => { const deleteAttachmentCategory = (index: number) => {
ElMessageBox.confirm(t('upload.deleteCategoryTips'), t('warning'), ElMessageBox.confirm(t('upload.deleteCategoryTips'), t('warning'),
{ {
confirmButtonText: t('confirm'), confirmButtonText: t('confirm'),
@ -310,12 +342,12 @@ const deleteAttachmentCategory = (index: number) => {
}).catch(() => { }).catch(() => {
}) })
}) })
} }
const uploadRef = ref<Record<string, any> | null>(null) const uploadRef = ref<Record<string, any> | null>(null)
// //
const upload = computed(() => { const upload = computed(() => {
const headers: Record<string, any> = {} const headers: Record<string, any> = {}
headers[import.meta.env.VITE_REQUEST_HEADER_TOKEN_KEY] = getToken() headers[import.meta.env.VITE_REQUEST_HEADER_TOKEN_KEY] = getToken()
headers[import.meta.env.VITE_REQUEST_HEADER_SITEID_KEY] = storage.get('siteId') || 0 headers[import.meta.env.VITE_REQUEST_HEADER_SITEID_KEY] = storage.get('siteId') || 0
@ -333,15 +365,15 @@ const upload = computed(() => {
uploadRef.value?.handleRemove(uploadFile) uploadRef.value?.handleRemove(uploadFile)
} else { } else {
uploadFile.status = 'fail' uploadFile.status = 'fail'
ElMessage({ message: response.msg, type: 'error' }) ElMessage({message: response.msg, type: 'error'})
} }
} }
} }
}) })
// //
const selectAll = ref(false) const selectAll = ref(false)
watch(selectAll, () => { watch(selectAll, () => {
if (selectAll.value) { if (selectAll.value) {
const keys = Object.keys(toRaw(selectedFile)) const keys = Object.keys(toRaw(selectedFile))
attachment.data.forEach((item: Record<string, any>) => { attachment.data.forEach((item: Record<string, any>) => {
@ -350,23 +382,25 @@ watch(selectAll, () => {
} else { } else {
clearSelected() clearSelected()
} }
}) })
/** /**
* 清空选中 * 清空选中
*/ */
const clearSelected = () => { const clearSelected = () => {
const keys = Object.keys(toRaw(selectedFile)) const keys = Object.keys(toRaw(selectedFile))
if (keys.length) { if (keys.length) {
keys.forEach((key) => { delete selectedFile[key] }) keys.forEach((key) => {
delete selectedFile[key]
})
selectAll.value = false selectAll.value = false
} }
} }
/** /**
* 选择文件 * 选择文件
*/ */
const selectFile = (data: any) => { const selectFile = (data: any) => {
if (selectedFile[data.att_id]) delete selectedFile[data.att_id] if (selectedFile[data.att_id]) delete selectedFile[data.att_id]
else if (prop.scene == 'select') { else if (prop.scene == 'select') {
const keys = Object.keys(toRaw(selectedFile)) const keys = Object.keys(toRaw(selectedFile))
@ -381,13 +415,13 @@ const selectFile = (data: any) => {
} else { } else {
selectedFile[data.att_id] = toRaw(data) selectedFile[data.att_id] = toRaw(data)
} }
} }
/** /**
* 删除附件 * 删除附件
* @param index * @param index
*/ */
const deleteAttachmentEvent = (index: number | null = null) => { const deleteAttachmentEvent = (index: number | null = null) => {
const ids = index === null ? Object.keys(toRaw(selectedFile)) : [attachment.data[index].att_id] const ids = index === null ? Object.keys(toRaw(selectedFile)) : [attachment.data[index].att_id]
ElMessageBox.confirm(t('upload.deleteAttachmentTips'), t('warning'), ElMessageBox.confirm(t('upload.deleteAttachmentTips'), t('warning'),
@ -397,29 +431,29 @@ const deleteAttachmentEvent = (index: number | null = null) => {
type: 'warning' type: 'warning'
} }
).then(() => { ).then(() => {
deleteAttachment({ att_ids: ids }).then(() => { deleteAttachment({att_ids: ids}).then(() => {
getAttachmentList() getAttachmentList()
}).catch(() => { }).catch(() => {
}) })
}) })
} }
/** /**
* 移动附件 * 移动附件
*/ */
const moveAttachmentData: Record<string, any> = reactive({ const moveAttachmentData: Record<string, any> = reactive({
cateId: '', cateId: '',
loading: false, loading: false,
visible: false visible: false
}) })
const moveAttachmentEvent = (index: number | null = null) => { const moveAttachmentEvent = (index: number | null = null) => {
const ids = index === null ? Object.keys(toRaw(selectedFile)) : [attachment.data[index].att_id] const ids = index === null ? Object.keys(toRaw(selectedFile)) : [attachment.data[index].att_id]
moveAttachmentData.visible = true moveAttachmentData.visible = true
moveAttachmentData.cateId = attachmentCategory.data[0].id moveAttachmentData.cateId = attachmentCategory.data[0].id
moveAttachmentData.confirm = () => { moveAttachmentData.confirm = () => {
moveAttachmentData.loading = true moveAttachmentData.loading = true
moveAttachment({ cate_id: moveAttachmentData.cateId, att_ids: ids }).then(() => { moveAttachment({cate_id: moveAttachmentData.cateId, att_ids: ids}).then(() => {
moveAttachmentData.visible = false moveAttachmentData.visible = false
moveAttachmentData.loading = false moveAttachmentData.loading = false
getAttachmentList() getAttachmentList()
@ -427,48 +461,51 @@ const moveAttachmentEvent = (index: number | null = null) => {
moveAttachmentData.loading = false moveAttachmentData.loading = false
}) })
} }
} }
// //
const batchOperateDisabled = ref(true) const batchOperateDisabled = ref(true)
watch(selectedFile, () => { watch(selectedFile, () => {
batchOperateDisabled.value = Object.keys(toRaw(selectedFile)).length == 0 batchOperateDisabled.value = Object.keys(toRaw(selectedFile)).length == 0
}) })
/** /**
* 查看图片 * 查看图片
*/ */
const imageViewer = reactive({ const imageViewer = reactive({
show: false, show: false,
index: 0 index: 0
}) })
const previewImage = (index: number) => {
const previewImage = (index: number) => {
imageViewer.show = true imageViewer.show = true
imageViewer.index = index imageViewer.index = index
} }
const previewImageList = computed(() => { const previewImageList = computed(() => {
return toRaw(attachment.data).map((item: Record<string, any>) => { return img(item.url) }) return toRaw(attachment.data).map((item: Record<string, any>) => {
}) return img(item.url)
})
})
/** /**
* 视频预览 * 视频预览
*/ */
const videoViewer = reactive({ const videoViewer = reactive({
visible: false, visible: false,
src: '' src: ''
}) })
const previewVideo = (index: number) => { const previewVideo = (index: number) => {
videoViewer.visible = true videoViewer.visible = true
videoViewer.src = img(attachment.data[index].url) videoViewer.src = img(attachment.data[index].url)
} }
defineExpose({ defineExpose({
selectedFile selectedFile
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.group-list { .group-list {
.group-item { .group-item {
margin-top: 3px; margin-top: 3px;
@ -489,21 +526,22 @@ defineExpose({
} }
} }
} }
} }
.attachment-item:hover{
.attachment-action{ .attachment-item:hover {
.attachment-action {
display: block; display: block;
} }
} }
.attachment-list-wrap { .attachment-list-wrap {
.attachment-wrap { .attachment-wrap {
background: var(--el-border-color-extra-light); background: var(--el-border-color-extra-light);
} }
} }
</style> </style>
<style lang="scss"> <style lang="scss">
.video-preview { .video-preview {
background: none !important; background: none !important;
box-shadow: none !important; box-shadow: none !important;
@ -516,9 +554,9 @@ defineExpose({
background-color: var(--el-text-color-regular); background-color: var(--el-text-color-regular);
border-color: #fff; border-color: #fff;
} }
} }
.el-upload-list { .el-upload-list {
position: absolute !important; position: absolute !important;
z-index: 10; z-index: 10;
@ -526,4 +564,4 @@ defineExpose({
background: #fff !important; background: #fff !important;
box-shadow: var(--el-box-shadow-light); box-shadow: var(--el-box-shadow-light);
} }
}</style> }</style>

View File

@ -4,35 +4,34 @@
<div class="rounded cursor-pointer relative bg-page video-wrap mr-[10px]" :style="style"> <div class="rounded cursor-pointer relative bg-page video-wrap mr-[10px]" :style="style">
<template v-if="videos.data.length"> <template v-if="videos.data.length">
<div class="w-full h-full relative flex items-center overflow-hidden rounded"> <div class="w-full h-full relative flex items-center overflow-hidden rounded">
<video :src="img(videos.data[0])" class="w-full" /> <video :src="img(videos.data[0])" class="w-full"/>
<div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60 operation"> <div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60 operation">
<icon name="iconfont-icon24gf-playCircle" color="#fff" size="25px" @click="previewVideo()" /> <icon name="iconfont-icon24gf-playCircle" color="#fff" size="25px" @click="previewVideo()"/>
</div> </div>
</div> </div>
<icon name="element-CircleCloseFilled" color="#bbb" size="18px" @click="removeVideo" class="absolute z-[2] top-[-9px] right-[-9px]" /> <icon name="element-CircleCloseFilled" color="#bbb" size="18px" @click="removeVideo" class="absolute z-[2] top-[-9px] right-[-9px]"/>
</template> </template>
<upload-attachment :limit="limit" type="video" @confirm="confirmSelect" v-else> <upload-attachment :limit="limit" type="video" @confirm="confirmSelect" v-else>
<div class="w-full h-full flex items-center justify-center flex-col"> <div class="w-full h-full flex items-center justify-center flex-col">
<icon name="iconfont-icon24gf-playCircle" size="25px" color="var(--el-text-color-secondary)" /> <icon name="iconfont-icon24gf-playCircle" size="25px" color="var(--el-text-color-secondary)"/>
</div> </div>
</upload-attachment> </upload-attachment>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="rounded cursor-pointer relative bg-page video-wrap mr-[10px]" :style="style" <div class="rounded cursor-pointer relative bg-page video-wrap mr-[10px]" :style="style" v-for="(item, index) in videos.data" :key="index">
v-for="(item, index) in videos.data" :key="index">
<div class="w-full h-full relative flex items-center overflow-hidden rounded"> <div class="w-full h-full relative flex items-center overflow-hidden rounded">
<video :src="img(item)" class="w-full" /> <video :src="img(item)" class="w-full"/>
<div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60 operation"> <div class="absolute z-[1] flex items-center justify-center w-full h-full inset-0 bg-black bg-opacity-60 operation">
<icon name="iconfont-icon24gf-playCircle" color="#fff" size="25px" @click="previewVideo(index)" /> <icon name="iconfont-icon24gf-playCircle" color="#fff" size="25px" @click="previewVideo(index)"/>
</div> </div>
</div> </div>
<icon name="element-CircleCloseFilled" color="#bbb" size="18px" @click="removeVideo(index)" class="absolute z-[2] top-[-9px] right-[-9px]" /> <icon name="element-CircleCloseFilled" color="#bbb" size="18px" @click="removeVideo(index)" class="absolute z-[2] top-[-9px] right-[-9px]"/>
</div> </div>
<div class="rounded cursor-pointer relative bg-page video-wrap mr-[10px]" :style="style" v-if="videos.data.length < limit"> <div class="rounded cursor-pointer relative bg-page video-wrap mr-[10px]" :style="style" v-if="videos.data.length < limit">
<upload-attachment :limit="limit" type="video" @confirm="confirmSelect"> <upload-attachment :limit="limit" type="video" @confirm="confirmSelect">
<div class="w-full h-full flex items-center justify-center flex-col"> <div class="w-full h-full flex items-center justify-center flex-col">
<icon name="iconfont-icon24gf-playCircle" size="25px" color="var(--el-text-color-secondary)" /> <icon name="iconfont-icon24gf-playCircle" size="25px" color="var(--el-text-color-secondary)"/>
</div> </div>
</upload-attachment> </upload-attachment>
</div> </div>
@ -40,17 +39,17 @@
<!-- 视频预览 --> <!-- 视频预览 -->
<el-dialog v-model="videoViewer.visible" width="50%" align-center :destroy-on-close="true" custom-class="video-preview"> <el-dialog v-model="videoViewer.visible" width="50%" align-center :destroy-on-close="true" custom-class="video-preview">
<video-player :src="videoViewer.src" width="100%" /> <video-player :src="videoViewer.src" width="100%"/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, reactive, watch, toRaw } from 'vue' import {computed, reactive, watch, toRaw} from 'vue'
import { img } from '@/utils/common' import {img} from '@/utils/common'
const prop = defineProps({ const prop = defineProps({
modelValue: { modelValue: {
type: String, type: String,
default: '' default: ''
@ -67,41 +66,43 @@ const prop = defineProps({
type: Number, type: Number,
default: 1 default: 1
} }
}) })
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
const value = computed({ const value = computed({
get() { get() {
return prop.modelValue return prop.modelValue
}, },
set(value) { set(value) {
emit('update:modelValue', value) emit('update:modelValue', value)
} }
}) })
const videos: Record<string, any> = reactive({ const videos: Record<string, any> = reactive({
data: [] data: []
}) })
watch(() => value.value, () => { watch(() => value.value, () => {
videos.data = [ videos.data = [
...value.value.split(',').filter((item: string) => { return item }) ...value.value.split(',').filter((item: string) => {
return item
})
] ]
setValue() setValue()
}) })
const style = computed(() => { const style = computed(() => {
return { return {
width: prop.width, width: prop.width,
height: prop.height height: prop.height
} }
}) })
/** /**
* 选择视频 * 选择视频
*/ */
const confirmSelect = (data: Record<string, any>) => { const confirmSelect = (data: Record<string, any>) => {
if (prop.limit == 1) { if (prop.limit == 1) {
videos.data.splice(0, 1) videos.data.splice(0, 1)
data && videos.data.push(data.url) data && videos.data.push(data.url)
@ -111,36 +112,36 @@ const confirmSelect = (data: Record<string, any>) => {
}) })
} }
setValue() setValue()
} }
/** /**
* 删除视频 * 删除视频
* @param index * @param index
*/ */
const removeVideo = (index: number = 0) => { const removeVideo = (index: number = 0) => {
videos.data.splice(index, 1) videos.data.splice(index, 1)
setValue() setValue()
} }
const setValue = () => { const setValue = () => {
value.value = toRaw(videos.data).toString() value.value = toRaw(videos.data).toString()
} }
/** /**
* 查看视频 * 查看视频
*/ */
const videoViewer = reactive({ const videoViewer = reactive({
visible: false, visible: false,
src: '' src: ''
}) })
const previewVideo = (index: number = 0) => { const previewVideo = (index: number = 0) => {
videoViewer.visible = true videoViewer.visible = true
videoViewer.src = img(videos.data[index]) videoViewer.src = img(videos.data[index])
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.video-preview { .video-preview {
background: none !important; background: none !important;
box-shadow: none !important; box-shadow: none !important;
@ -153,5 +154,5 @@ const previewVideo = (index: number = 0) => {
background-color: var(--el-text-color-regular); background-color: var(--el-text-color-regular);
border-color: #fff; border-color: #fff;
} }
} }
</style> </style>

View File

@ -44,7 +44,6 @@ class Language {
this.setI18nLanguage(locale) this.setI18nLanguage(locale)
return nextTick() return nextTick()
} catch (e) { } catch (e) {
console.log(e)
this.setI18nLanguage(locale) this.setI18nLanguage(locale)
return nextTick() return nextTick()
} }

View File

@ -0,0 +1,14 @@
{
"companyName": "授权主体",
"siteAddress": "授权域名",
"contactName": "授权联系人",
"authCode": "授权码",
"authSecret": "授权秘钥",
"createTime": "授权时间",
"expireTime": "到期时间",
"authApp": "授权应用",
"authAppKey": "应用标识",
"siteAddressTips": "授权域名不匹配",
"authCodePlaceholder": "请输入核销码",
"authSecretPlaceholder": "请输入授权秘钥"
}

View File

@ -28,5 +28,10 @@
"jobError": "任务队列未启动 请在服务端源码部署目录打开终端执行 php think queue:listen", "jobError": "任务队列未启动 请在服务端源码部署目录打开终端执行 php think queue:listen",
"conflictFiles": "冲突文件", "conflictFiles": "冲突文件",
"process": "启动进程", "process": "启动进程",
"open": "开启" "open": "开启",
"down": "下载",
"addonVersion": "插件版本",
"versionCode": "版本号",
"createTime": "发布时间",
"buyLabel": "已购买"
} }

View File

@ -1,25 +0,0 @@
{
"menuName": "菜单名称",
"menuType": "类型",
"authId": "权限标识",
"menuTypeDir": "目录",
"menuTypeMenu": "菜单",
"menuTypeButton": "按钮",
"menuDeleteTips": "确定要删除该菜单吗?",
"addMenu": "添加菜单",
"updateMenu": "编辑菜单",
"routePath": "路由路径",
"viewPath": "组件路径",
"parentMenu": "父级菜单",
"menuIcon": "菜单图标",
"sort":"权重",
"menuKey":"菜单标识",
"menuNamePlaceholder": "请输入菜单名称",
"menuKeyPlaceholder": "请输入菜单标识",
"menuKeyValidata":"菜单标识只能使用字母数字下划线并且开头不能为数字",
"routePathPlaceholder": "请输入路由路径",
"viewPathPlaceholder": "请输入组件路径",
"authIdPlaceholder": "请输入权限标识",
"selectIconPlaceholder": "请选择菜单图标",
"topLevel": "顶级"
}

View File

@ -0,0 +1,22 @@
{
"operatePrompt": "操作提示",
"operatePromptTipsOne": "下载之后需使用微信开发者工具上传代码,微信开发者工具下载地址",
"operatePromptTipsTwo": "上传之后登录微信公众平台,在版本管理中选择刚上传的版本提交审核,审核通过之后即可发布小程序。",
"weappName": "小程序名称",
"weappId": "小程序ID",
"weappOriginalId": "小程序原始ID",
"weappInfo": "小程序信息",
"versionCode": "小程序代码",
"version": "版本",
"down": "下载",
"codeDown": "代码下载",
"downWeappCode": "下载代码",
"weappTips": "请先完善小程序配置",
"codeDownOneTips": "下载小程序代码包",
"codeDownTwoDesc": "上传代码",
"codeDownTwoTips": "下载完成之后,使用微信开发工具进行上传",
"codeDownThreeDesc": "发布小程序",
"codeDownThreeTips": "上传之后提交审核,审核通过发布小程序",
"weappVersion": "小程序版本",
"close": "关闭"
}

View File

@ -46,11 +46,13 @@
"root": "上传", "root": "上传",
"selectimage": "选择图片", "selectimage": "选择图片",
"selectvideo": "选择视频", "selectvideo": "选择视频",
"selecticon": "选择图标",
"uploadimage": "上传图片", "uploadimage": "上传图片",
"uploadvideo": "上传视频", "uploadvideo": "上传视频",
"addAttachmentCategory": "添加分组", "addAttachmentCategory": "添加分组",
"attachmentCategoryPlaceholder": "请输入分组名称", "attachmentCategoryPlaceholder": "请输入分组名称",
"attachmentEmpty": "暂无附件,请点击上传按钮上传", "attachmentEmpty": "暂无附件,请点击上传按钮上传",
"iconEmpty": "暂无图标",
"deleteCategoryTips": "确定要删除该分组吗?", "deleteCategoryTips": "确定要删除该分组吗?",
"deleteAttachmentTips": "确定要删除所选附件吗?如所选附件已被使用删除将会受到影响,请谨慎操作!", "deleteAttachmentTips": "确定要删除所选附件吗?如所选附件已被使用删除将会受到影响,请谨慎操作!",
"move": "移动", "move": "移动",
@ -58,6 +60,7 @@
"moveTo": "移动至", "moveTo": "移动至",
"placeholderimageName": "请输入图片名称", "placeholderimageName": "请输入图片名称",
"placeholdervideoName": "请输入视频名称", "placeholdervideoName": "请输入视频名称",
"placeholdericonName": "请输入图标名称",
"success": "上传成功", "success": "上传成功",
"triggerUpperLimit": "可选数量已达上限" "triggerUpperLimit": "可选数量已达上限"
}, },
@ -73,7 +76,8 @@
"themeColor": "主题颜色", "themeColor": "主题颜色",
"detectionLoginOperation": "确定", "detectionLoginOperation": "确定",
"detectionLoginContent": "已检测到有其他账号登录,需要刷新后才能继续操作。", "detectionLoginContent": "已检测到有其他账号登录,需要刷新后才能继续操作。",
"detectionLoginTip": "提示" "detectionLoginTip": "提示",
"layoutStyle": "布局风格"
}, },
"axios": { "axios": {
"unknownError": "未知错误", "unknownError": "未知错误",
@ -90,7 +94,9 @@
"503": "服务不可用", "503": "服务不可用",
"504": "网络超时", "504": "网络超时",
"505": "http版本不支持该请求", "505": "http版本不支持该请求",
"timeout": "网络请求超时!" "timeout": "网络请求超时!",
"requestError": "请求错误",
"errNetwork": "网络请求错误"
}, },
"linkPlaceholder": "请选择跳转链接", "linkPlaceholder": "请选择跳转链接",
"selectLinkTips": "链接选择", "selectLinkTips": "链接选择",
@ -105,5 +111,8 @@
"emptyApp": "暂未安装任何应用", "emptyApp": "暂未安装任何应用",
"newInfo": "最新消息", "newInfo": "最新消息",
"mapSetting": "地图设置", "mapSetting": "地图设置",
"mapKey": "腾讯地图KEY" "mapKey": "腾讯地图KEY",
"indexTemplate": "首页模版",
"indexSwitch": "切换首页",
"indexWarning": "你确定要切换首页吗?"
} }

View File

@ -109,5 +109,15 @@
"more": "文字", "more": "文字",
"morePlaceholder": "请输入文字", "morePlaceholder": "请输入文字",
"moreIsShow": "是否显示", "moreIsShow": "是否显示",
"memberStyle": "会员样式" "memberStyle": "会员样式",
"template": "模板",
"imageGap": "图片间隙",
"rubikCubeStyle": "魔方样式",
"hotArea": "热区",
"hotAreaSet": "热区设置",
"addHotArea": "添加热区",
"selectedAfterHotArea": "个热区",
"hotAreaManage": "热区管理",
"selectedHotArea": "请选择热区",
"hotAreaLink": "的链接地址"
} }

View File

@ -0,0 +1,12 @@
{
"preview": "预览",
"weapp": "微信小程序",
"wechat": "微信公众号",
"link": "链接",
"copy": "复制",
"copySuccess": "复制成功",
"weappNotSet": "小程序未配置",
"developTitle": "开发环境配置",
"wapDomain": "wap域名WAP_DOMAIN",
"wapDomainPlaceholder": "请输入wap域名"
}

View File

@ -1,9 +1,26 @@
{ {
"developTitle": "开发环境配置",
"wapDomain": "wap域名WAP_DOMAIN",
"wapDomainPlaceholder": "请输入wap域名",
"pageSet": "页面设置", "pageSet": "页面设置",
"tabEditContent": "内容",
"tabEditStyle": "样式",
"pageStyle": "页面样式",
"pageContent": "页面内容", "pageContent": "页面内容",
"pageName": "页面名称", "pageName": "页面名称",
"pageNamePlaceholder": "请输入页面名称", "pageNamePlaceholder": "请输入页面名称",
"pageBgColor": "页面颜色", "pageBgColor": "页面颜色",
"bgUrl": "背景图片",
"marginSet": "边距设置",
"componentStyleTitle": "组件样式",
"bottomBgColor": "底部背景",
"bottomBgTips": "底部背景包含边距和圆角",
"componentBgColor": "组件背景",
"marginTop": "上边距",
"marginBottom": "下边距",
"marginBoth": "左右边距",
"topRounded": "上圆角",
"bottomRounded": "下圆角",
"warmPrompt": "温馨提示", "warmPrompt": "温馨提示",
"leavePageTitleTips": "确定离开此页面?", "leavePageTitleTips": "确定离开此页面?",
"leavePageContentTips": "系统可能不会保存您所做的更改。", "leavePageContentTips": "系统可能不会保存您所做的更改。",
@ -27,7 +44,12 @@
"imageAdsTips": "建议上传尺寸相同的图片推荐尺寸750*350", "imageAdsTips": "建议上传尺寸相同的图片推荐尺寸750*350",
"addImageAd": "添加图片", "addImageAd": "添加图片",
"imageUrlTip": "请上传图片", "imageUrlTip": "请上传图片",
"imageHeight": "图片高度",
"imageHeightPlaceholder": "请输入图片高度",
"imageHeightRegNum": "图片高度格式错误,请输入数字",
"articleData": "文章数据", "articleData": "文章数据",
"articleStyle": "文章样式",
"articleBgColor": "文章背景",
"dataSources": "数据来源", "dataSources": "数据来源",
"defaultSources": "默认", "defaultSources": "默认",
"manualSelectionSources": "手动选择", "manualSelectionSources": "手动选择",
@ -65,6 +87,7 @@
"addGraphicNav": "添加导航", "addGraphicNav": "添加导航",
"blankHeightSet": "高度设置", "blankHeightSet": "高度设置",
"blankHeight": "空白高度", "blankHeight": "空白高度",
"styleSet": "风格设置",
"titleStyle": "标题样式", "titleStyle": "标题样式",
"selectStyle": "风格选择", "selectStyle": "风格选择",
"titleContent": "标题内容", "titleContent": "标题内容",
@ -73,6 +96,7 @@
"textAlign": "对齐方式", "textAlign": "对齐方式",
"textAlignLeft": "居左", "textAlignLeft": "居左",
"textAlignCenter": "居中", "textAlignCenter": "居中",
"textSet": "文字设置",
"textFontSize": "文字大小", "textFontSize": "文字大小",
"textFontWeight": "文字粗细", "textFontWeight": "文字粗细",
"fontWeightBold": "加粗", "fontWeightBold": "加粗",
@ -84,5 +108,16 @@
"moreContent": "“更多”按钮内容", "moreContent": "“更多”按钮内容",
"more": "文字", "more": "文字",
"morePlaceholder": "请输入文字", "morePlaceholder": "请输入文字",
"moreIsShow": "是否显示" "moreIsShow": "是否显示",
"memberStyle": "会员样式",
"template": "模板",
"imageGap": "图片间隙",
"rubikCubeStyle": "魔方样式",
"hotArea": "热区",
"hotAreaSet": "热区设置",
"addHotArea": "添加热区",
"selectedAfterHotArea": "个热区",
"hotAreaManage": "热区管理",
"selectedHotArea": "请选择热区",
"hotAreaLink": "的链接地址"
} }

View File

@ -1,12 +1,19 @@
{ {
"decorate": "装修", "decorate": "装修",
"pageDecorate": "页面装修",
"changeTemplate": "切换模板",
"templateName": "模板名称",
"preview": "预览", "preview": "预览",
"weapp": "微信小程序", "hopeBeforeTip": "我希望把",
"wechat": "微信公众号", "hopeAfterTip": "切换成其他样式",
"link": "链接", "changeTemplateTip": "选择",
"copy": "复制", "template": "模板",
"copySuccess": "复制成功", "changeMyPageTip": "选择微页面作为",
"weappNotSet": "小程序未配置", "createPage": "创建微页面",
"myPage": "我的微页面",
"refreshPage": "刷新",
"placeholderTemplate": "请选择一个模板",
"placeholderMyPage": "请选择一个微页面",
"developTitle": "开发环境配置", "developTitle": "开发环境配置",
"wapDomain": "wap域名WAP_DOMAIN", "wapDomain": "wap域名WAP_DOMAIN",
"wapDomainPlaceholder": "请输入wap域名" "wapDomainPlaceholder": "请输入wap域名"

View File

@ -1,11 +1,12 @@
{ {
"title": "页面名称", "title": "页面名称",
"typeName": "页面模板", "typeName": "页面模板",
"addType": "页面类型",
"addPageTips": "创建新页面", "addPageTips": "创建新页面",
"pageTemplatePlaceholder": "请选择页面模板", "pageTypePlaceholder": "请选择页面模板",
"nameMax": "名称不能超过12个字符", "nameMax": "名称不能超过12个字符",
"templateName": "模板名称", "templateName": "已有模板",
"empty": "空白", "emptyTemplate": "空模板",
"status": "状态", "status": "状态",
"updateTime": "更新时间", "updateTime": "更新时间",
"use": "使用", "use": "使用",

View File

@ -0,0 +1,13 @@
{
"preview": "预览",
"h5": "H5",
"weapp": "微信小程序",
"wechat": "微信公众号",
"link": "链接",
"copy": "复制",
"copySuccess": "复制成功",
"weappNotSet": "小程序未配置",
"developTitle": "开发环境配置",
"wapDomain": "wap域名WAP_DOMAIN",
"wapDomainPlaceholder": "请输入wap域名"
}

View File

@ -0,0 +1,36 @@
{
"title": "页面名称",
"typeName": "页面模板",
"addPageTips": "创建新页面",
"pageTemplatePlaceholder": "请选择页面模板",
"nameMax": "名称不能超过12个字符",
"templateName": "模板名称",
"empty": "空白",
"status": "状态",
"updateTime": "更新时间",
"use": "使用",
"isUse": "使用中",
"unused": "未使用",
"all": "全部",
"basicRoute": "基础页面",
"diyPage": "自定义页面",
"wapUrl": "wap链接",
"weappUrl": "小程序链接",
"shareLink": "分享链接",
"copy": "复制",
"copySuccess": "复制成功",
"titlePlaceholder": "请输入页面名称",
"addDiyPage": "添加页面",
"diyPageDeleteTips": "确定要删除该自定义页面吗?",
"promote": "推广",
"share": "分享",
"shareSet": "分享设置",
"sharePage": "分享页面",
"wechat": "微信公众号",
"weapp": "微信小程序",
"shareTitle": "分享标题",
"shareTitlePlaceholder": "请输入分享标题",
"shareDesc": "分享描述",
"shareDescPlaceholder": "请输入分享描述",
"shareImageUrl": "分享图片"
}

View File

@ -0,0 +1,26 @@
{
"id":"主键",
"accountDetail":"账单详情",
"detail":"详情",
"type":"账单类型",
"money":"账单金额",
"moneyPlaceholder":"请输入账单金额",
"tradeNo":"账单编号",
"tradeNoPlaceholder":"请输入账单编号",
"createTime":"账单日期",
"totalPay":"累计收款(元)",
"totalRefund":"累计退款(元)",
"totalTransfer":"累计转账(元)",
"accountType": "请选择退款类型",
"startDate": "开始时间",
"endDate": "结束时间",
"transferNo" : "转账单号",
"transferTime": "转账时间",
"transferType": "转账类型",
"transferMoney": "转账金额",
"transferRemark": "转账说明",
"outTradeNo": "单号",
"refundMoney": "退款金额",
"failReason": "退款说明",
"body": "说明"
}

View File

@ -0,0 +1,18 @@
{
"money":"支付金额",
"outTradeNo": "交易流水号",
"voucher": "支付凭证",
"body": "支付内容",
"pass": "通过",
"refuse": "拒绝",
"refuseReason": "拒绝原因",
"passTips": "确认要通过该支付单据吗?",
"startDate": "开始时间",
"endDate": "结束时间",
"outTradeNoPlaceholder":"请输入交易流水号",
"detail": "详情",
"waitAudit": "待审核",
"passed": "已通过",
"notPass": "未通过",
"all": "全部"
}

View File

@ -0,0 +1,18 @@
{
"pass": "通过",
"refuse": "拒绝",
"refuseReason": "拒绝原因",
"passTips": "确认要通过该支付单据吗?",
"outTradeNo": "交易单号",
"createTime": "交易时间",
"money": "交易金额",
"body": "交易内容",
"channel": "支付场景",
"payStatus": "支付状态",
"payType": "支付方式",
"payTime": "支付时间",
"failTime": "失败时间",
"failReason": "失败原因",
"voucher": "支付凭证",
"auditVoucher": "审核支付凭证"
}

View File

@ -40,5 +40,28 @@
"accumulative":"累计", "accumulative":"累计",
"officialAccount": "Niucloud官方公众号", "officialAccount": "Niucloud官方公众号",
"officialAccountDesc": "微信扫码关注", "officialAccountDesc": "微信扫码关注",
"WeCom": "添加企业微信群" "WeCom": "添加企业微信群",
"path": "地址",
"menuName": "名称",
"menuNamePlaceholder": "模版名称",
"menuBgColor": "背景颜色",
"menuImg": "选择图标",
"menuDesc": "描述",
"addShortcutMenu": "添加快捷模版",
"appTemplate": "应用模块",
"siteType": "站点类型",
"periodTime": "有效期",
"renew": "续费",
"selectModel": "选择模块",
"addMenu": "添加模块",
"shortcutLink": "模版",
"emptyMenu": "暂无快捷模块",
"select": "选择",
"custom": "自定义",
"accessSite": "访问站点",
"pathSelect": "选择模块",
"bgColorPlaceholder": "请选择背景色",
"iconPlaceholder": "请选择图标",
"pathPlaceholder": "请选择链接",
"descPlaceholder": "输入描述语…"
} }

View File

@ -18,5 +18,4 @@
"smsId":"短信模版ID", "smsId":"短信模版ID",
"smsIdPlaceholder":"短信模版ID", "smsIdPlaceholder":"短信模版ID",
"noticeType":"消息类型" "noticeType":"消息类型"
} }

View File

@ -9,6 +9,7 @@
"config": "设置", "config": "设置",
"updateWechat": "微信支付", "updateWechat": "微信支付",
"updateAlipay": "支付宝支付", "updateAlipay": "支付宝支付",
"updateOfflinepay": "线下支付",
"mchId": "商户号", "mchId": "商户号",
"mchIdPlaceholder": "请输入商户号", "mchIdPlaceholder": "请输入商户号",
"mchIdTips": "微信支付商户号MCHID", "mchIdTips": "微信支付商户号MCHID",
@ -48,6 +49,13 @@
"setConfig": "设置支付配置", "setConfig": "设置支付配置",
"open": "已开启", "open": "已开启",
"notOpen": "未开启", "notOpen": "未开启",
"cancel": "取消" "cancel": "取消",
"collectionName": "收款账户名称",
"collectionBank": "收款银行",
"collectionAccount": "收款账号",
"collectionDesc": "转账说明",
"collectionNamePlaceholder": "请输入收款账户名称",
"collectionBankPlaceholder": "请输入收款银行",
"collectionAccountPlaceholder": "请输入收款账号",
"collectionDescPlaceholder": "请输入转账说明"
} }

View File

@ -3,7 +3,7 @@
"contactAddress":"联系地址", "contactAddress":"联系地址",
"siteName": "站点名称", "siteName": "站点名称",
"keywords": "网站关键字", "keywords": "网站关键字",
"logo": "网站Logo", "logo": "长方形Logo",
"desc": "网站简介", "desc": "网站简介",
"province": "省", "province": "省",
"city": "市", "city": "市",
@ -15,7 +15,6 @@
"contactAddressPlaceholder":"联系地址", "contactAddressPlaceholder":"联系地址",
"siteNamePlaceholder": "站点名称", "siteNamePlaceholder": "站点名称",
"keywordsPlaceholder": "网站关键字", "keywordsPlaceholder": "网站关键字",
"logoPlaceholder": "网站Logo",
"descPlaceholder": "网站简介", "descPlaceholder": "网站简介",
"addressPlaceholder": "详细地址", "addressPlaceholder": "详细地址",
"phonePlaceholder": "客服电话", "phonePlaceholder": "客服电话",
@ -25,10 +24,12 @@
"frontEndName": "前台名称", "frontEndName": "前台名称",
"frontEndNamePlaceholder": "请输入前台名称", "frontEndNamePlaceholder": "请输入前台名称",
"frontEndLogo": "前台Logo", "frontEndLogo": "前台Logo",
"icon": "网站图标", "icon": "正方形Logo",
"serviceInformation": "服务信息", "serviceInformation": "服务信息",
"wechatCode": "公众号二维码", "wechatCode": "公众号二维码",
"customerServiceCode": "客服二维码", "customerServiceCode": "客服二维码",
"contactsTel": "联系电话", "contactsTel": "联系电话",
"contactsTelPlaceholder": "请输入联系电话" "contactsTelPlaceholder": "请输入联系电话",
"logoPlaceholder": "建议图片尺寸210*30像素图片格式jpg、png、jpeg。",
"iconPlaceholder": "建议图片尺寸100*100像素图片格式jpg、png、jpeg。"
} }

View File

@ -0,0 +1,12 @@
{
"addVersion": "上传版本",
"version": "版本号",
"versionPlaceholder": "请添加版本号",
"createTime": "创建时间",
"status": "状态",
"editVersion": "添加/编辑版本",
"file": "文件",
"filePlaceholder":"请上传版本文件",
"desc": "版本说明",
"weappVersionDeleteTips": "确定要删除小程序版本吗"
}

View File

@ -34,6 +34,8 @@
"columnComment": "字段描述", "columnComment": "字段描述",
"columnType": "类型", "columnType": "类型",
"fieldAttribute": "字段属性", "fieldAttribute": "字段属性",
"addAndEdit":"添加编辑",
"listSearch":"列表查询",
"isPk":"是否主键", "isPk":"是否主键",
"isRequired":"是否必填", "isRequired":"是否必填",
"isInsert":"是否添加", "isInsert":"是否添加",
@ -41,7 +43,7 @@
"isLists":"列表展示", "isLists":"列表展示",
"isSearch":"是否搜索", "isSearch":"是否搜索",
"isQuery":"是否查询", "isQuery":"是否查询",
"queryType":"查询方式", "queryType":"搜索方式",
"viewType":"显示方式", "viewType":"显示方式",
"pkRepeatTip": "只能添加一个主键", "pkRepeatTip": "只能添加一个主键",
"formInput":"文本框", "formInput":"文本框",

View File

@ -1,17 +0,0 @@
{
"title": "名称",
"cronInfo": "任务详情",
"type": "任务类型",
"lastTime": "最后执行时间",
"startDate":"开始时间",
"cron":"定时执行",
"endDate":"结束时间",
"titlePlaceholder": "请输入任务名称",
"typeName":"任务类型",
"crondType":"任务周期",
"count":"已执行次数",
"nextTime":"下次执行时间",
"task":"任务命令",
"data":"附加参数",
"statusDesc":"最后执行结果"
}

View File

@ -0,0 +1,33 @@
{
"title": "名称",
"cronInfo": "任务详情",
"type": "任务类型",
"lastTime": "最后执行时间",
"startDate":"开始时间",
"cron":"定时执行",
"endDate":"结束时间",
"titlePlaceholder": "请选择任务模版",
"typeName":"任务类型",
"crondType":"任务周期",
"count":"已执行次数",
"nextTime":"下次执行时间",
"task":"任务命令",
"data":"附加参数",
"statusDesc":"最后执行结果",
"key": "key",
"timeClass": "时间类型",
"executeTime": "执行时间",
"editCron": "编辑任务",
"cronTemplate": "任务模版",
"cronTime": "任务周期",
"openStatus": "任务状态",
"isopen": "是否启用",
"day": "日",
"hour": "时",
"min": "分",
"cronDeleteTips": "你确定要删除任务吗",
"addCron": "添加任务",
"cronTimeTips": "任务周期时间不能为空",
"cronTipsOne": "启动计划任务方式:",
"cronTipsTwo": "1、使用命令启动php think cron:schedule 如果更改了任务周期、状态、删除任务等操作后,需要重新启动下 php think cron:schedule 确保生效"
}

View File

@ -3,8 +3,7 @@
<side class="hidden-xs-only" /> <side class="hidden-xs-only" />
</el-aside> </el-aside>
<el-drawer v-model="systemStore.menuDrawer" direction="ltr" :with-header="false" custom-class="aside-drawer" <el-drawer v-model="systemStore.menuDrawer" direction="ltr" :with-header="false" custom-class="aside-drawer" size="210px">
size="210px">
<template #default> <template #default>
<side /> <side />
</template> </template>

View File

@ -14,7 +14,12 @@
<icon :name="meta.icon" class="absolute top-[50%] -translate-y-[50%]" /> <icon :name="meta.icon" class="absolute top-[50%] -translate-y-[50%]" />
</div> </div>
<template #title> <template #title>
<div class="relative">
<span :class="['ml-[10px]', {'text-[15px]': routes.meta.class == 1}, {'text-[14px]': routes.meta.class != 1}]">{{ meta.title }}</span> <span :class="['ml-[10px]', {'text-[15px]': routes.meta.class == 1}, {'text-[14px]': routes.meta.class != 1}]">{{ meta.title }}</span>
<div v-if="routes.path == '/site/siteindex'" class="absolute top-[50%] -translate-y-[50%] right-[-180%]" @click="checkIndexList">
<img class="w-[12px] h-[12px]" src="@/assets/images/index/model_tag.png"/>
</div>
</div>
</template> </template>
</el-menu-item> </el-menu-item>
<el-menu-item v-else :index="String(routes.name)" :route="routePath"> <el-menu-item v-else :index="String(routes.name)" :route="routePath">
@ -23,13 +28,34 @@
</template> </template>
</el-menu-item> </el-menu-item>
</template> </template>
<el-dialog v-model="showDialog" :title="t('indexTemplate')" width="550px" :destroy-on-close="true" >
<div class="flex flex-wrap">
<div v-for="(items, index) in indexList" :key="index" v-if="index_path == ''">
<div @click="index_path = items.view_path" class="index-item py-[5px] px-[10px] mr-[10px] rounded-[3px] cursor-pointer" :class="items.is_use == 1 ? 'bg-primary text-[#fff]' : '' ">
<span >{{ items.name }}</span>
</div>
</div>
<div v-for="(itemTo, indexTo) in indexList" :key="indexTo" v-else>
<div @click="index_path = itemTo.view_path" class="index-item py-[5px] px-[10px] mr-[10px] rounded-[3px] cursor-pointer" :class="index_path == itemTo.view_path ? 'bg-primary text-[#fff]' : '' ">
<span >{{ itemTo.name }}</span>
</div>
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submitIndex">{{ t('confirm') }}</el-button>
</span>
</template>
</el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { CollectionTag } from '@element-plus/icons-vue' import { t } from '@/lang'
import { computed } from 'vue' import { getIndexList, setIndexList } from '@/api/sys'
import { useRoute, useRouter } from 'vue-router'
import { ref, computed } from 'vue'
import menuItem from './menu-item.vue' import menuItem from './menu-item.vue'
const router = useRouter()
const props = defineProps({ const props = defineProps({
routes: { routes: {
type: Object, type: Object,
@ -45,6 +71,31 @@ const meta = computed(() => props.routes.meta)
const resolvePath = (path: string) => { const resolvePath = (path: string) => {
return `${props.routePath}/${path}` return `${props.routePath}/${path}`
} }
const indexList = ref();
const showDialog = ref(false)
const checkIndexList = () => {
getIndexList().then(res => {
showDialog.value = true
indexList.value = res.data
for(let i = 0 ; i < indexList.value.length; i ++){
if(indexList.value[i].is_use == 1){
index_path.value = indexList.value[i].view_path
}
}
})
}
const index_path = ref('');
const submitIndex = () => {
setIndexList({
view_path: index_path.value
}).then(() => {
showDialog.value = false
router.go(0)
})
}
</script> </script>
<style lang="scss"> <style lang="scss">
@ -59,4 +110,13 @@ const resolvePath = (path: string) => {
.el-alert .el-alert__description{ .el-alert .el-alert__description{
margin-top: 0; margin-top: 0;
} }
.index-item {
border: 1px solid;
border-color: var(--el-color-primary);
&:hover {
color: #fff;
background-color: var(--el-color-primary);
}
}
</style> </style>

View File

@ -1,6 +1,5 @@
<template> <template>
<el-container class="w-100 h-screen" <el-container class="w-100 h-screen" :class="[{ 'sidebar-dark-mode': systemStore.sidebar == 'twoType' }, { 'sidebar-brightness-mode': systemStore.sidebar == 'oneType' }]">
:class="[{ 'sidebar-dark-mode': systemStore.sidebar == 'twoType' }, { 'sidebar-brightness-mode': systemStore.sidebar == 'oneType' }]">
<el-header class="logo-wrap w-100"> <el-header class="logo-wrap w-100">
<div class="logo flex items-center m-auto max-w-[210px] h-[30px]" v-if="!systemStore.menuIsCollapse"> <div class="logo flex items-center m-auto max-w-[210px] h-[30px]" v-if="!systemStore.menuIsCollapse">
<img class="max-h-full max-w-full" v-if="storage.get('siteInfo').logo" :src="img(siteInfo.logo)" alt=""> <img class="max-h-full max-w-full" v-if="storage.get('siteInfo').logo" :src="img(siteInfo.logo)" alt="">
@ -13,10 +12,8 @@
<el-main class="menu-wrap"> <el-main class="menu-wrap">
<el-scrollbar> <el-scrollbar>
<el-menu :default-active="menuActive" :router="true" class="aside-menu h-full" unique-opened="true" <el-menu :default-active="menuActive" :router="true" class="aside-menu h-full" unique-opened="true" :collapse="systemStore.menuIsCollapse">
:collapse="systemStore.menuIsCollapse"> <menu-item v-for="(route, index) in userStore.routers" :routes="route" :route-path="route.path" :key="index" />
<menu-item v-for="(route, index) in userStore.routers" :routes="route" :route-path="route.path"
:key="index" />
</el-menu> </el-menu>
<div class="h-[48px]"></div> <div class="h-[48px]"></div>
</el-scrollbar> </el-scrollbar>

View File

@ -23,7 +23,12 @@
<el-col :span="12"> <el-col :span="12">
<div class="right-panel h-full flex items-center justify-end"> <div class="right-panel h-full flex items-center justify-end">
<!-- 预览 只有站点时展示--> <!-- 预览 只有站点时展示-->
<i class="iconfont iconlingdang-xianxing cursor-pointer px-[8px]" :title="t('newInfo')" v-if="appType == 'site'"></i> <i class="iconfont iconlingdang-xianxing cursor-pointer px-[8px]" :title="t('newInfo')" v-if="appType == 'site'"></i>
<!-- 切换首页 -->
<div class="navbar-item flex items-center h-full cursor-pointer" v-if="appType == 'site'" @click="checkIndexList">
<icon name="iconfont-iconqiehuan" :title="t('indexSwitch')"/>
</div>
<!-- 切换语言 --> <!-- 切换语言 -->
<div class="navbar-item flex items-center h-full cursor-pointer"> <div class="navbar-item flex items-center h-full cursor-pointer">
<switch-lang /> <switch-lang />
@ -55,6 +60,26 @@
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<el-dialog v-model="showDialog" :title="t('indexTemplate')" width="550px" :destroy-on-close="true" >
<div class="flex flex-wrap">
<div v-for="(items, index) in indexList" :key="index" v-if="index_path == ''">
<div @click="index_path = items.view_path" class="index-item py-[5px] px-[10px] mr-[10px] rounded-[3px] cursor-pointer" :class="items.is_use == 1 ? 'bg-primary text-[#fff]' : '' ">
<span >{{ items.name }}</span>
</div>
</div>
<div v-for="(itemTo, indexTo) in indexList" :key="indexTo" v-else>
<div @click="index_path = itemTo.view_path" class="index-item py-[5px] px-[10px] mr-[10px] rounded-[3px] cursor-pointer" :class="index_path == itemTo.view_path ? 'bg-primary text-[#fff]' : '' ">
<span >{{ itemTo.name }}</span>
</div>
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submitIndex">{{ t('confirm') }}</el-button>
</span>
</template>
</el-dialog>
</el-container> </el-container>
</template> </template>
@ -69,7 +94,8 @@ import useAppStore from '@/stores/modules/app'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { t } from '@/lang' import { t } from '@/lang'
import storage from '@/utils/storage' import storage from '@/utils/storage'
import useUserStore from '@/stores/modules/user' import { getIndexList, setIndexList } from '@/api/sys'
const router = useRouter() const router = useRouter()
const appType = storage.get('app_type') const appType = storage.get('app_type')
const { toggle: toggleFullscreen, isFullscreen } = useFullscreen() const { toggle: toggleFullscreen, isFullscreen } = useFullscreen()
@ -138,7 +164,7 @@ const toggleMenuCollapse = () => {
// //
const refreshRouter = () => { const refreshRouter = () => {
if (!appStore.routeRefrehTag) return if (!appStore.routeRefreshTag) return
appStore.refreshRouterView() appStore.refreshRouterView()
} }
@ -153,6 +179,30 @@ const breadcrumb = computed(() => {
const backFn = () => { const backFn = () => {
router.go(-1) router.go(-1)
} }
const indexList = ref();
const showDialog = ref(false)
const checkIndexList = () => {
getIndexList().then(res => {
showDialog.value = true
indexList.value = res.data
for(let i = 0 ; i < indexList.value.length; i ++){
if(indexList.value[i].is_use == 1){
index_path.value = indexList.value[i].view_path
}
}
})
}
const index_path = ref('');
const submitIndex = () => {
setIndexList({
view_path: index_path.value
}).then(() => {
showDialog.value = false
router.go(0)
})
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -163,8 +213,17 @@ const backFn = () => {
} }
.navbar-item { .navbar-item {
padding: 0 8px; padding: 0 8px;
&:hover { &:hover {
background-color: var(--el-bg-color-page); background-color: var(--el-bg-color-page);
} }
}</style> }
.index-item {
border: 1px solid;
border-color: var(--el-color-primary);
&:hover {
color: #fff;
background-color: var(--el-color-primary);
}
}
</style>

View File

@ -32,6 +32,21 @@
<el-color-picker v-model="theme" /> <el-color-picker v-model="theme" />
</div> </div>
</div> </div>
<!-- 布局风格 -->
<div class="setting-item mb-[10px]">
<div class="title text-base text-tx-secondary">{{ t('layout.layoutStyle') }}</div>
<div class="flex mt-[10px] layout-style flex-wrap">
<div class="relative w-[125px] h-[100px] border mr-[10px] mb-[10px] hover:border-primary"
:class="{ 'border-primary': currLayout == item.key }" v-for="(item, index) in layouts"
@click="handleSetLayout(item.key)">
<div
class="absolute z-1 w-[50px] h-[50px] border border-primary-light-5 rounded-[50%] top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] flex items-center justify-center text-base text-primary-light-5">
{{ item.name }}
</div>
<img :src="img(item.image)" alt="" class="w-full h-full">
</div>
</div>
</div>
</el-scrollbar> </el-scrollbar>
</el-drawer> </el-drawer>
</div> </div>
@ -41,10 +56,19 @@
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import useSystemStore from '@/stores/modules/system' import useSystemStore from '@/stores/modules/system'
import { useDark, useToggle } from '@vueuse/core' import { useDark, useToggle } from '@vueuse/core'
import { setThemeColor } from '@/utils/common' import { setThemeColor, img } from '@/utils/common'
import { t } from '@/lang' import { t } from '@/lang'
import { getLayouts, setLayout } from '@/api/sys'
import Storage from '@/utils/storage'
const drawer = ref(false) const drawer = ref(false)
const systemStore = useSystemStore() const systemStore = useSystemStore()
const layouts = ref([])
const currLayout = ref(Storage.get('layout') || 'default')
getLayouts().then(res => {
layouts.value = res.data
}).catch(() => { })
const isDark = useDark() const isDark = useDark()
const toggleDark = useToggle(isDark) const toggleDark = useToggle(isDark)
@ -70,7 +94,6 @@ const sidebar = computed({
} }
}) })
const theme = computed({ const theme = computed({
get() { get() {
return systemStore.theme return systemStore.theme
@ -80,10 +103,23 @@ const theme = computed({
setThemeColor(systemStore.theme, systemStore.dark ? 'dark' : 'light') setThemeColor(systemStore.theme, systemStore.dark ? 'dark' : 'light')
} }
}) })
const handleSetLayout = (key: string) => {
setLayout(key).then(() => {
Storage.set({ key: 'layout', data: key })
location.reload()
}).catch(() => { })
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.el-drawer__header) { :deep(.el-drawer__header) {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.layout-style {
&>div:nth-child(2n+2) {
margin-right: 0;
}
}
</style> </style>

View File

@ -11,7 +11,7 @@
<el-main :class="['main-wrap h-full p-0',{'bg-page': dark}]"> <el-main :class="['main-wrap h-full p-0',{'bg-page': dark}]">
<el-scrollbar> <el-scrollbar>
<div class="p-[10px]"> <div class="p-[10px]">
<router-view v-slot="{ Component, route }" v-if="appStore.routeRefrehTag"> <router-view v-slot="{ Component, route }" v-if="appStore.routeRefreshTag">
<keep-alive :include="tabbarStore.tabNames"> <keep-alive :include="tabbarStore.tabNames">
<component :is="Component" :key="route.fullPath" /> <component :is="Component" :key="route.fullPath" />
</keep-alive> </keep-alive>

View File

@ -0,0 +1,21 @@
<template>
<el-container class="w-screen h-screen">
<el-header>
<layout-header />
</el-header>
<el-main>
<router-view></router-view>
</el-main>
<el-footer>
<div class="w-full h-full bg-[#f7f7f7] flex items-center justify-center">
Footer
</div>
</el-footer>
</el-container>
</template>
<script lang="ts" setup>
import layoutHeader from '@/layout/default/components/header/index.vue'
</script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,18 @@
<template>
<component :is="layout" />
</template>
<script lang="ts" setup>
import { ref, markRaw, defineAsyncComponent } from 'vue'
import Storage from '@/utils/storage'
const modules = import.meta.glob('./*/index.vue')
const siteLayout = Storage.get('layout') || 'default'
const layout = ref<any>(null)
Object.keys(modules).forEach(key => {
key.indexOf(siteLayout) !== -1 && (layout.value = markRaw(defineAsyncComponent(modules[key])))
})
</script>
<style lang="scss" scoped></style>

View File

@ -1,4 +1,4 @@
import { createRouter, createWebHistory, RouteLocationRaw } from 'vue-router' import { createRouter, createWebHistory, RouteLocationRaw, RouteLocationNormalizedLoaded } from 'vue-router'
import NProgress from 'nprogress' import NProgress from 'nprogress'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
import { STATIC_ROUTES, NO_LOGIN_ROUTES, ROOT_ROUTER, ADMIN_ROUTE, SITE_ROUTE, DECORATE_ROUTER, findFirstValidRoute } from './routers' import { STATIC_ROUTES, NO_LOGIN_ROUTES, ROOT_ROUTER, ADMIN_ROUTE, SITE_ROUTE, DECORATE_ROUTER, findFirstValidRoute } from './routers'
@ -24,6 +24,17 @@ router.push = (to: RouteLocationRaw) => {
return originPush(route) return originPush(route)
} }
/**
* resolve方法
*/
const originResolve = router.resolve
router.resolve = (to: RouteLocationRaw, currentLocation?: RouteLocationNormalizedLoaded) => {
const route = typeof to == 'string' ? urlToRouteRaw(to) : to
const paths = route.path.split('/').filter((item: string) => { return item })
route.path = ['admin', 'site', 'decorate'].indexOf(paths[0]) == -1 ? `/${getAppType()}${route.path}` : route.path
return originResolve(route, currentLocation)
}
// 全局前置守卫 // 全局前置守卫
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
@ -39,7 +50,7 @@ router.beforeEach(async (to, from, next) => {
setWindowTitle(title) setWindowTitle(title)
// 加载语言包 // 加载语言包
await language.loadLocaleMessages(to.path, useSystemStore().lang); await language.loadLocaleMessages((to.meta.view || to.path), useSystemStore().lang);
let matched: any = to.matched; let matched: any = to.matched;

View File

@ -1,5 +1,5 @@
import { RouteRecordRaw, RouterView } from 'vue-router' import { RouteRecordRaw, RouterView } from 'vue-router'
import Default from '@/layout/default/index.vue' import Default from '@/layout/index.vue'
import Decorate from '@/layout/decorate/index.vue' import Decorate from '@/layout/decorate/index.vue'
// 静态路由 // 静态路由
@ -122,7 +122,8 @@ const createRoute = function (route: Route, parentRoute: RouteRecordRaw | null =
icon: route.icon, icon: route.icon,
type: route.menu_type, type: route.menu_type,
show: route.is_show, show: route.is_show,
app: route.app_type app: route.app_type,
view: route.view_path
} }
} }
if (route.menu_type == 0) { if (route.menu_type == 0) {

View File

@ -4,7 +4,7 @@ import NProgress from 'nprogress'
interface App { interface App {
route: string, route: string,
routeRefrehTag: boolean, routeRefreshTag: boolean,
pageReturn: boolean pageReturn: boolean
} }
@ -12,17 +12,17 @@ const useAppStore = defineStore('app', {
state: (): App => { state: (): App => {
return { return {
route: '', route: '',
routeRefrehTag: true, routeRefreshTag: true,
pageReturn: false pageReturn: false
} }
}, },
actions: { actions: {
refreshRouterView() { refreshRouterView() {
this.routeRefrehTag = false this.routeRefreshTag = false
NProgress.start() NProgress.start()
nextTick(() => { nextTick(() => {
this.routeRefrehTag = true this.routeRefreshTag = true
NProgress.done() NProgress.done()
}) })
} }

View File

@ -1,8 +1,8 @@
import {defineStore} from 'pinia' import {defineStore} from 'pinia'
import {t} from '@/lang' import {t} from '@/lang'
import {toRaw, watch} from 'vue' import {toRaw} from 'vue'
import {ElMessage, ElMessageBox} from 'element-plus' import {ElMessage, ElMessageBox} from 'element-plus'
import {cloneDeep, range, isEmpty} from 'lodash-es' import {cloneDeep} from 'lodash-es'
const useDiyStore = defineStore('diy', { const useDiyStore = defineStore('diy', {
state: () => { state: () => {
@ -11,10 +11,12 @@ const useDiyStore = defineStore('diy', {
load: false, // 加载状态 load: false, // 加载状态
currentIndex: -99, // 当前正在编辑的组件下标 currentIndex: -99, // 当前正在编辑的组件下标
currentComponent: 'edit-page', // 当前正在编辑的组件名称 currentComponent: 'edit-page', // 当前正在编辑的组件名称
pageMode: 'diy',
editTab: 'content',// 编辑页面 editTab: 'content',// 编辑页面
name: '', // 页面标识 name: '', // 页面标识
type: '', // 页面模板 type: '', // 页面模板
typeName: '', // 页面模板名称 typeName: '', // 页面模板名称
templateName: '', // 页面模板标识
isDefault: 0, // 是否默认页面 isDefault: 0, // 是否默认页面
predefineColors: [ predefineColors: [
'#F4391c', '#F4391c',
@ -203,6 +205,7 @@ const useDiyStore = defineStore('diy', {
// 将数据发送到uniapp // 将数据发送到uniapp
postMessage() { postMessage() {
var diyData = JSON.stringify({ var diyData = JSON.stringify({
pageMode: this.pageMode,
currentIndex: this.currentIndex, currentIndex: this.currentIndex,
global: toRaw(this.global), global: toRaw(this.global),
value: toRaw(this.value) value: toRaw(this.value)

View File

@ -33,10 +33,11 @@ const useSystemStore = defineStore('user', {
this.userInfo = res.data.userinfo this.userInfo = res.data.userinfo
setToken(res.data.token) setToken(res.data.token)
storage.set({ key: 'userinfo', data: res.data.userinfo }) storage.set({ key: 'userinfo', data: res.data.userinfo })
storage.set({ key: 'siteId', data: res.data.site_id }) storage.set({ key: 'siteId', data: res.data.site_info.site_id })
storage.set({ key: 'siteInfo', data: res.data.site_info }) storage.set({ key: 'siteInfo', data: res.data.site_info })
storage.set({ key: 'comparisonSiteIdStorage', data: res.data.site_id }) storage.set({ key: 'comparisonSiteIdStorage', data: res.data.site_info.site_id })
storage.set({ key: 'comparisonTokenStorage', data: res.data.token }) storage.set({ key: 'comparisonTokenStorage', data: res.data.token })
storage.set({ key: 'layout', data: (res.data.layout || 'default') })
resolve(res) resolve(res)
}) })
.catch((error) => { .catch((error) => {

View File

@ -0,0 +1 @@
@import "addon/tourism/iconfont.css";

View File

@ -0,0 +1,58 @@
@font-face {
font-family: "tourism"; /* Project id 4137250 */
src: url('//at.alicdn.com/t/c/font_4137250_st1ha9l0k1e.woff2?t=1687685028672') format('woff2'),
url('//at.alicdn.com/t/c/font_4137250_st1ha9l0k1e.woff?t=1687685028672') format('woff'),
url('//at.alicdn.com/t/c/font_4137250_st1ha9l0k1e.ttf?t=1687685028672') format('truetype');
}
.tourism {
font-family: "tourism" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.tourism-icon-feiji:before {
content: "\e600";
}
.tourism-icon-lvyou:before {
content: "\e6a9";
}
.tourism-icon-lvyouchanpin:before {
content: "\e63b";
}
.tourism-icon-lvyou1:before {
content: "\e623";
}
.tourism-icon-lvyou2:before {
content: "\e601";
}
.tourism-icon-lvyou3:before {
content: "\e60c";
}
.tourism-icon-lvyoubaochedingdan:before {
content: "\e612";
}
.tourism-icon-lvyou4:before {
content: "\e653";
}
.tourism-icon-lvyou5:before {
content: "\e610";
}
.tourism-icon-lvyouguanguang:before {
content: "\e87e";
}
.tourism-icon-lvyou6:before {
content: "\e642";
}

View File

@ -0,0 +1,86 @@
{
"id": "4137250",
"name": "旅游业",
"font_family": "tourism",
"css_prefix_text": "tourism-icon-",
"description": "",
"glyphs": [
{
"icon_id": "1443",
"name": "飞机",
"font_class": "feiji",
"unicode": "e600",
"unicode_decimal": 58880
},
{
"icon_id": "446824",
"name": "旅游",
"font_class": "lvyou",
"unicode": "e6a9",
"unicode_decimal": 59049
},
{
"icon_id": "1167173",
"name": "旅游产品",
"font_class": "lvyouchanpin",
"unicode": "e63b",
"unicode_decimal": 58939
},
{
"icon_id": "1354920",
"name": "旅游",
"font_class": "lvyou1",
"unicode": "e623",
"unicode_decimal": 58915
},
{
"icon_id": "1505555",
"name": "旅游",
"font_class": "lvyou2",
"unicode": "e601",
"unicode_decimal": 58881
},
{
"icon_id": "2121726",
"name": "旅游",
"font_class": "lvyou3",
"unicode": "e60c",
"unicode_decimal": 58892
},
{
"icon_id": "2357494",
"name": "旅游包车订单",
"font_class": "lvyoubaochedingdan",
"unicode": "e612",
"unicode_decimal": 58898
},
{
"icon_id": "3944019",
"name": "旅游",
"font_class": "lvyou4",
"unicode": "e653",
"unicode_decimal": 58963
},
{
"icon_id": "4838220",
"name": "旅游",
"font_class": "lvyou5",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "7444178",
"name": "旅游观光",
"font_class": "lvyouguanguang",
"unicode": "e87e",
"unicode_decimal": 59518
},
{
"icon_id": "9748082",
"name": "旅游",
"font_class": "lvyou6",
"unicode": "e642",
"unicode_decimal": 58946
}
]
}

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 3883393 */ font-family: "iconfont"; /* Project id 3883393 */
src: url('//at.alicdn.com/t/c/font_3883393_pwtqr51nps.woff2?t=1686032889350') format('woff2'), src: url('//at.alicdn.com/t/c/font_3883393_zqz8ttmm6uk.woff2?t=1689649791403') format('woff2'),
url('//at.alicdn.com/t/c/font_3883393_pwtqr51nps.woff?t=1686032889350') format('woff'), url('//at.alicdn.com/t/c/font_3883393_zqz8ttmm6uk.woff?t=1689649791403') format('woff'),
url('//at.alicdn.com/t/c/font_3883393_pwtqr51nps.ttf?t=1686032889350') format('truetype'); url('//at.alicdn.com/t/c/font_3883393_zqz8ttmm6uk.ttf?t=1689649791403') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,78 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.iconmofang-liangzuoliangyou:before {
content: "\e6c5";
}
.iconmofang-yishangliangxia:before {
content: "\e6c6";
}
.iconmofang-yizuoliangyou:before {
content: "\e6c7";
}
.iconxuanzemoban-yizuosanyou:before {
content: "\e6e9";
}
.iconrequ:before {
content: "\e68d";
}
.iconmofang1:before {
content: "\e64d";
}
.iconxinyongqia:before {
content: "\e785";
}
.iconmendian:before {
content: "\e60a";
}
.iconico_yuyueguanli_yuyuebiangeng:before {
content: "\e94a";
}
.iconsousuo:before {
content: "\e8b9";
}
.icongengduo:before {
content: "\e63b";
}
.icona-02_luxian:before {
content: "\e687";
}
.iconhuiyuanxinxi:before {
content: "\e688";
}
.iconjingdian:before {
content: "\e689";
}
.iconhuiyuandingdan:before {
content: "\e68a";
}
.iconjiudian:before {
content: "\e68b";
}
.iconhellowenbenanli:before {
content: "\e68c";
}
.iconqiehuan:before {
content: "\e61e";
}
.iconxiangyoujiantou:before { .iconxiangyoujiantou:before {
content: "\e660"; content: "\e660";
} }

View File

@ -0,0 +1,786 @@
{
"id": "3883393",
"name": "系统",
"font_family": "iconfont",
"css_prefix_text": "icon",
"description": "系统图标",
"glyphs": [
{
"icon_id": "9924690",
"name": "魔方-两左两右",
"font_class": "mofang-liangzuoliangyou",
"unicode": "e6c5",
"unicode_decimal": 59077
},
{
"icon_id": "9924691",
"name": "魔方-一上两下",
"font_class": "mofang-yishangliangxia",
"unicode": "e6c6",
"unicode_decimal": 59078
},
{
"icon_id": "9924700",
"name": "魔方-一左两右",
"font_class": "mofang-yizuoliangyou",
"unicode": "e6c7",
"unicode_decimal": 59079
},
{
"icon_id": "18287302",
"name": "选择模板-一左三右",
"font_class": "xuanzemoban-yizuosanyou",
"unicode": "e6e9",
"unicode_decimal": 59113
},
{
"icon_id": "33490811",
"name": "热区",
"font_class": "requ",
"unicode": "e68d",
"unicode_decimal": 59021
},
{
"icon_id": "30454135",
"name": "魔方",
"font_class": "mofang1",
"unicode": "e64d",
"unicode_decimal": 58957
},
{
"icon_id": "579624",
"name": "信用卡",
"font_class": "xinyongqia",
"unicode": "e785",
"unicode_decimal": 59269
},
{
"icon_id": "2681698",
"name": "门店",
"font_class": "mendian",
"unicode": "e60a",
"unicode_decimal": 58890
},
{
"icon_id": "6607852",
"name": "ico_预约管理_预约变更",
"font_class": "ico_yuyueguanli_yuyuebiangeng",
"unicode": "e94a",
"unicode_decimal": 59722
},
{
"icon_id": "11372706",
"name": "搜索",
"font_class": "sousuo",
"unicode": "e8b9",
"unicode_decimal": 59577
},
{
"icon_id": "1703513",
"name": "更多",
"font_class": "gengduo",
"unicode": "e63b",
"unicode_decimal": 58939
},
{
"icon_id": "36212724",
"name": "02_路线",
"font_class": "a-02_luxian",
"unicode": "e687",
"unicode_decimal": 59015
},
{
"icon_id": "36212725",
"name": "会员信息",
"font_class": "huiyuanxinxi",
"unicode": "e688",
"unicode_decimal": 59016
},
{
"icon_id": "36212726",
"name": "景点",
"font_class": "jingdian",
"unicode": "e689",
"unicode_decimal": 59017
},
{
"icon_id": "36212727",
"name": "会员订单",
"font_class": "huiyuandingdan",
"unicode": "e68a",
"unicode_decimal": 59018
},
{
"icon_id": "36212728",
"name": "酒店",
"font_class": "jiudian",
"unicode": "e68b",
"unicode_decimal": 59019
},
{
"icon_id": "36212729",
"name": "hello文本案例",
"font_class": "hellowenbenanli",
"unicode": "e68c",
"unicode_decimal": 59020
},
{
"icon_id": "18993709",
"name": "切换",
"font_class": "qiehuan",
"unicode": "e61e",
"unicode_decimal": 58910
},
{
"icon_id": "630094",
"name": "向右箭头",
"font_class": "xiangyoujiantou",
"unicode": "e660",
"unicode_decimal": 58976
},
{
"icon_id": "630095",
"name": "向左箭头",
"font_class": "xiangzuojiantou",
"unicode": "e663",
"unicode_decimal": 58979
},
{
"icon_id": "2127167",
"name": "订单",
"font_class": "dingdan",
"unicode": "e61d",
"unicode_decimal": 58909
},
{
"icon_id": "10066818",
"name": "应用市场",
"font_class": "yingyongshichang1",
"unicode": "e61c",
"unicode_decimal": 58908
},
{
"icon_id": "28871251",
"name": "应用市场",
"font_class": "yingyongshichang2",
"unicode": "e60b",
"unicode_decimal": 58891
},
{
"icon_id": "1727436",
"name": "211铃铛-线性",
"font_class": "lingdang-xianxing",
"unicode": "e8c0",
"unicode_decimal": 59584
},
{
"icon_id": "11372759",
"name": "电话",
"font_class": "dianhua",
"unicode": "e8c3",
"unicode_decimal": 59587
},
{
"icon_id": "4734150",
"name": "管理房屋",
"font_class": "ic_manage_assignprop",
"unicode": "e60c",
"unicode_decimal": 58892
},
{
"icon_id": "5975445",
"name": "城市",
"font_class": "chengshi",
"unicode": "ec70",
"unicode_decimal": 60528
},
{
"icon_id": "25069700",
"name": "套餐列表",
"font_class": "taocanliebiao",
"unicode": "e6b2",
"unicode_decimal": 59058
},
{
"icon_id": "11239058",
"name": "微信",
"font_class": "weixin",
"unicode": "e647",
"unicode_decimal": 58951
},
{
"icon_id": "417391",
"name": "会员管理",
"font_class": "huiyuanguanli",
"unicode": "e64c",
"unicode_decimal": 58956
},
{
"icon_id": "651208",
"name": "我的会员",
"font_class": "huangjinhuiyuan0101-copy",
"unicode": "e621",
"unicode_decimal": 58913
},
{
"icon_id": "897811",
"name": "会员(1)",
"font_class": "huiyuan1",
"unicode": "e644",
"unicode_decimal": 58948
},
{
"icon_id": "8361821",
"name": "钱包1",
"font_class": "qianbao",
"unicode": "e6ca",
"unicode_decimal": 59082
},
{
"icon_id": "15053947",
"name": "文章",
"font_class": "ic_description_file24px",
"unicode": "e61a",
"unicode_decimal": 58906
},
{
"icon_id": "26677253",
"name": "FormatPainterOutlined",
"font_class": "zhuangxiu1",
"unicode": "e66b",
"unicode_decimal": 58987
},
{
"icon_id": "5856622",
"name": "退款记录",
"font_class": "tuikuanjilu",
"unicode": "e8cf",
"unicode_decimal": 59599
},
{
"icon_id": "11296483",
"name": "更新缓存",
"font_class": "gengxinhuancun",
"unicode": "e686",
"unicode_decimal": 59014
},
{
"icon_id": "11661874",
"name": "四性检测",
"font_class": "sixingjiance",
"unicode": "e645",
"unicode_decimal": 58949
},
{
"icon_id": "30527484",
"name": "注册设置",
"font_class": "zhuceshezhi",
"unicode": "e6ad",
"unicode_decimal": 59053
},
{
"icon_id": "9117790",
"name": "应用管理",
"font_class": "manage-apply",
"unicode": "e619",
"unicode_decimal": 58905
},
{
"icon_id": "508272",
"name": "应用管理",
"font_class": "yingyongguanli",
"unicode": "e61f",
"unicode_decimal": 58911
},
{
"icon_id": "3090731",
"name": "开发者管理",
"font_class": "kaifazheguanli",
"unicode": "e624",
"unicode_decimal": 58916
},
{
"icon_id": "6263297",
"name": "联盟管理",
"font_class": "lianmengguanli",
"unicode": "e65f",
"unicode_decimal": 58975
},
{
"icon_id": "6337455",
"name": "点赞",
"font_class": "dianzan",
"unicode": "ec7f",
"unicode_decimal": 60543
},
{
"icon_id": "1160150",
"name": "h5e",
"font_class": "h5e",
"unicode": "e654",
"unicode_decimal": 58964
},
{
"icon_id": "10067274",
"name": "应用市场",
"font_class": "yingyongshichang",
"unicode": "e618",
"unicode_decimal": 58904
},
{
"icon_id": "1735584",
"name": "电脑端",
"font_class": "desktop",
"unicode": "e6e8",
"unicode_decimal": 59112
},
{
"icon_id": "2465639",
"name": "支付宝",
"font_class": "zhifubao",
"unicode": "e8e4",
"unicode_decimal": 59620
},
{
"icon_id": "16372351",
"name": "云空间",
"font_class": "yunkongjian",
"unicode": "e666",
"unicode_decimal": 58982
},
{
"icon_id": "1110699",
"name": "板块",
"font_class": "bankuai",
"unicode": "e668",
"unicode_decimal": 58984
},
{
"icon_id": "2076244",
"name": " 内容2",
"font_class": "neirong2",
"unicode": "e889",
"unicode_decimal": 59529
},
{
"icon_id": "7596821",
"name": "24gl-userGroup",
"font_class": "24gl-userGroup",
"unicode": "eb26",
"unicode_decimal": 60198
},
{
"icon_id": "11124966",
"name": "论坛",
"font_class": "14",
"unicode": "e615",
"unicode_decimal": 58901
},
{
"icon_id": "13763389",
"name": "举报",
"font_class": "jubao",
"unicode": "e611",
"unicode_decimal": 58897
},
{
"icon_id": "30454127",
"name": "标题",
"font_class": "biaoti",
"unicode": "e643",
"unicode_decimal": 58947
},
{
"icon_id": "33622251",
"name": "会员中心",
"font_class": "huiyuanzhongxin",
"unicode": "e692",
"unicode_decimal": 59026
},
{
"icon_id": "30454128",
"name": "icon-kfckfc",
"font_class": "fuzhukongbai1",
"unicode": "e642",
"unicode_decimal": 58946
},
{
"icon_id": "34679438",
"name": "system-jiantoushang",
"font_class": "jiantoushang",
"unicode": "e600",
"unicode_decimal": 58880
},
{
"icon_id": "34679439",
"name": "system-loader-4-line",
"font_class": "loader-line",
"unicode": "e601",
"unicode_decimal": 58881
},
{
"icon_id": "34679440",
"name": "system-delete-bin-6-line",
"font_class": "delete-line",
"unicode": "e602",
"unicode_decimal": 58882
},
{
"icon_id": "34679441",
"name": "system-jiantouxia",
"font_class": "jiantouxia",
"unicode": "e603",
"unicode_decimal": 58883
},
{
"icon_id": "34679442",
"name": "system-file-copy-line",
"font_class": "copy-line",
"unicode": "e605",
"unicode_decimal": 58885
},
{
"icon_id": "1604633",
"name": "拖动",
"font_class": "tuodong",
"unicode": "e884",
"unicode_decimal": 59524
},
{
"icon_id": "4315844",
"name": "line",
"font_class": "fuzhushuxian",
"unicode": "e6f7",
"unicode_decimal": 59127
},
{
"icon_id": "9213697",
"name": "魔方",
"font_class": "mofang",
"unicode": "e6c4",
"unicode_decimal": 59076
},
{
"icon_id": "13126664",
"name": "手动选择",
"font_class": "shoudongxuanze",
"unicode": "e6e1",
"unicode_decimal": 59105
},
{
"icon_id": "15035365",
"name": "一行三个",
"font_class": "yihangsange",
"unicode": "e6d5",
"unicode_decimal": 59093
},
{
"icon_id": "15035367",
"name": "一行四个",
"font_class": "yihangsige",
"unicode": "e6d6",
"unicode_decimal": 59094
},
{
"icon_id": "16552058",
"name": "一行两个",
"font_class": "yihangliangge",
"unicode": "e6e2",
"unicode_decimal": 59106
},
{
"icon_id": "19363687",
"name": "一行5个",
"font_class": "yihang5ge",
"unicode": "e6f3",
"unicode_decimal": 59123
},
{
"icon_id": "30454132",
"name": "图片广告",
"font_class": "tupianguanggao1",
"unicode": "e649",
"unicode_decimal": 58953
},
{
"icon_id": "30454144",
"name": "图文导航",
"font_class": "tuwendaohang2",
"unicode": "e65d",
"unicode_decimal": 58973
},
{
"icon_id": "30461206",
"name": "文章",
"font_class": "wenzhang",
"unicode": "e662",
"unicode_decimal": 58978
},
{
"icon_id": "30621137",
"name": "固定展示",
"font_class": "gudingzhanshi",
"unicode": "e66e",
"unicode_decimal": 58990
},
{
"icon_id": "30621139",
"name": "单行滑动",
"font_class": "danhanghuadong",
"unicode": "e66f",
"unicode_decimal": 58991
},
{
"icon_id": "30621140",
"name": "图文导航",
"font_class": "tuwendaohang3",
"unicode": "e670",
"unicode_decimal": 58992
},
{
"icon_id": "30621141",
"name": "图导航",
"font_class": "tudaohang",
"unicode": "e671",
"unicode_decimal": 58993
},
{
"icon_id": "30621143",
"name": "分页滑动",
"font_class": "fenyehuadong",
"unicode": "e673",
"unicode_decimal": 58995
},
{
"icon_id": "30621144",
"name": "文导航",
"font_class": "wendaohang",
"unicode": "e674",
"unicode_decimal": 58996
},
{
"icon_id": "386395",
"name": "装修",
"font_class": "zhuangxiu",
"unicode": "e627",
"unicode_decimal": 58919
},
{
"icon_id": "1376045",
"name": "店铺装修",
"font_class": "dianpuzhuangxiu",
"unicode": "e616",
"unicode_decimal": 58902
},
{
"icon_id": "4315691",
"name": "底部导航",
"font_class": "dibudaohang",
"unicode": "e617",
"unicode_decimal": 58903
},
{
"icon_id": "34453370",
"name": "旺铺装修",
"font_class": "wangpuzhuangxiu",
"unicode": "e881",
"unicode_decimal": 59521
},
{
"icon_id": "8710560",
"name": "微信公众号",
"font_class": "weixingongzhonghao1",
"unicode": "e705",
"unicode_decimal": 59141
},
{
"icon_id": "4846336",
"name": "微信公众号管理",
"font_class": "weixingongzhonghaoguanli",
"unicode": "e609",
"unicode_decimal": 58889
},
{
"icon_id": "9810504",
"name": "小程序",
"font_class": "xiaochengxu",
"unicode": "e635",
"unicode_decimal": 58933
},
{
"icon_id": "10392614",
"name": "登录",
"font_class": "denglu",
"unicode": "e604",
"unicode_decimal": 58884
},
{
"icon_id": "15643755",
"name": "小程序设置",
"font_class": "xiaochengxushezhi",
"unicode": "e6b4",
"unicode_decimal": 59060
},
{
"icon_id": "321993",
"name": "integral",
"font_class": "jifen",
"unicode": "e70c",
"unicode_decimal": 59148
},
{
"icon_id": "731270",
"name": "登录注册密码",
"font_class": "guanbi",
"unicode": "e612",
"unicode_decimal": 58898
},
{
"icon_id": "845851",
"name": "登录注册密码",
"font_class": "dengluzhucemima",
"unicode": "e67f",
"unicode_decimal": 59007
},
{
"icon_id": "1440387",
"name": "切换角色",
"font_class": "qiehuanjiaose",
"unicode": "e60f",
"unicode_decimal": 58895
},
{
"icon_id": "1440877",
"name": "版权",
"font_class": "banquan",
"unicode": "e632",
"unicode_decimal": 58930
},
{
"icon_id": "1727353",
"name": "20积分-线性",
"font_class": "jifen-xianxing",
"unicode": "e897",
"unicode_decimal": 59543
},
{
"icon_id": "3590938",
"name": "会员列表",
"font_class": "huiyuanliebiao",
"unicode": "e62c",
"unicode_decimal": 58924
},
{
"icon_id": "5082143",
"name": "角色用户",
"font_class": "jiaoseyonghu",
"unicode": "e648",
"unicode_decimal": 58952
},
{
"icon_id": "5582337",
"name": "用户",
"font_class": "yonghu",
"unicode": "e65e",
"unicode_decimal": 58974
},
{
"icon_id": "6415223",
"name": "版权",
"font_class": "banquan1",
"unicode": "e66d",
"unicode_decimal": 58989
},
{
"icon_id": "7006681",
"name": "微信公众号",
"font_class": "weixingongzhonghao",
"unicode": "e613",
"unicode_decimal": 58899
},
{
"icon_id": "7006683",
"name": "微信小程序",
"font_class": "weixinxiaochengxu",
"unicode": "e614",
"unicode_decimal": 58900
},
{
"icon_id": "7577294",
"name": "24gl-code",
"font_class": "24gl-code",
"unicode": "e9ba",
"unicode_decimal": 59834
},
{
"icon_id": "7596833",
"name": "24gl-portraitMalePlus2",
"font_class": "24gl-portraitMalePlus2",
"unicode": "eb25",
"unicode_decimal": 60197
},
{
"icon_id": "7874533",
"name": "源代码",
"font_class": "yuandaima",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "11121397",
"name": "角色管理",
"font_class": "jiaoseguanli",
"unicode": "e62d",
"unicode_decimal": 58925
},
{
"icon_id": "12797047",
"name": "积分",
"font_class": "jifen1",
"unicode": "e641",
"unicode_decimal": 58945
},
{
"icon_id": "26257279",
"name": "版权",
"font_class": "banquan2",
"unicode": "e61b",
"unicode_decimal": 58907
},
{
"icon_id": "26847628",
"name": "键盘",
"font_class": "jianpan",
"unicode": "e661",
"unicode_decimal": 58977
},
{
"icon_id": "7594157",
"name": "24gf-playCircle",
"font_class": "24gf-playCircle",
"unicode": "ea82",
"unicode_decimal": 60034
},
{
"icon_id": "1025135",
"name": "退出全屏",
"font_class": "tuichuquanping",
"unicode": "e755",
"unicode_decimal": 59221
},
{
"icon_id": "23359065",
"name": "翻译",
"font_class": "fanyi",
"unicode": "e6fb",
"unicode_decimal": 59131
},
{
"icon_id": "5387606",
"name": "全屏",
"font_class": "quanping",
"unicode": "eb11",
"unicode_decimal": 60177
}
]
}

View File

@ -3,5 +3,6 @@
@import 'element-plus/theme-chalk/display.css'; @import 'element-plus/theme-chalk/display.css';
@import 'tailwind.css'; @import 'tailwind.css';
@import 'element-plus.scss'; @import 'element-plus.scss';
@import 'iconfont.css'; @import 'icon/iconfont.css';
@import 'icon/addon-iconfont.css'; // 安装卸载插件时动态引用插件的图标库文件
@import 'common.scss'; @import 'common.scss';

View File

@ -3,7 +3,6 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { useCssVar, useTitle } from '@vueuse/core' import { useCssVar, useTitle } from '@vueuse/core'
import colorFunction from 'css-color-function' import colorFunction from 'css-color-function'
import storage from './storage' import storage from './storage'
import { useRoute } from 'vue-router'
/** /**
* element-icon * element-icon

Some files were not shown because too many files have changed in this diff Show More