初始化my语音管理后台
4
.browserslistrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not dead
|
||||||
|
not ie 11
|
||||||
21
.dockerignore
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
node_modules
|
||||||
|
.DS_Store
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
.eslintcache
|
||||||
|
report.html
|
||||||
|
|
||||||
|
yarn.lock
|
||||||
|
npm-debug.log*
|
||||||
|
.pnpm-error.log*
|
||||||
|
.pnpm-debug.log
|
||||||
|
tests/**/coverage/
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
5
.env
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# 平台本地运行端口号
|
||||||
|
VITE_PORT = 8848
|
||||||
|
|
||||||
|
# 是否隐藏首页 隐藏 true 不隐藏 false (勿删除,VITE_HIDE_HOME只需在.env文件配置)
|
||||||
|
VITE_HIDE_HOME = false
|
||||||
8
.env.development
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 平台本地运行端口号
|
||||||
|
VITE_PORT = 8848
|
||||||
|
|
||||||
|
# 开发环境读取配置文件路径
|
||||||
|
VITE_PUBLIC_PATH = /
|
||||||
|
|
||||||
|
# 开发环境路由历史模式(Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数")
|
||||||
|
VITE_ROUTER_HISTORY = "hash"
|
||||||
13
.env.production
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# 线上环境平台打包路径
|
||||||
|
VITE_PUBLIC_PATH = /
|
||||||
|
|
||||||
|
# 线上环境路由历史模式(Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数")
|
||||||
|
VITE_ROUTER_HISTORY = "hash"
|
||||||
|
|
||||||
|
# 是否在打包时使用cdn替换本地库 替换 true 不替换 false
|
||||||
|
VITE_CDN = false
|
||||||
|
|
||||||
|
# 是否启用gzip压缩或brotli压缩(分两种情况,删除原始文件和不删除原始文件)
|
||||||
|
# 压缩时不删除原始文件的配置:gzip、brotli、both(同时开启 gzip 与 brotli 压缩)、none(不开启压缩,默认)
|
||||||
|
# 压缩时删除原始文件的配置:gzip-clear、brotli-clear、both-clear(同时开启 gzip 与 brotli 压缩)、none(不开启压缩,默认)
|
||||||
|
VITE_COMPRESSION = "none"
|
||||||
16
.env.staging
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# 预发布也需要生产环境的行为
|
||||||
|
# https://cn.vitejs.dev/guide/env-and-mode.html#modes
|
||||||
|
# NODE_ENV = development
|
||||||
|
|
||||||
|
VITE_PUBLIC_PATH = /
|
||||||
|
|
||||||
|
# 预发布环境路由历史模式(Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数")
|
||||||
|
VITE_ROUTER_HISTORY = "hash"
|
||||||
|
|
||||||
|
# 是否在打包时使用cdn替换本地库 替换 true 不替换 false
|
||||||
|
VITE_CDN = true
|
||||||
|
|
||||||
|
# 是否启用gzip压缩或brotli压缩(分两种情况,删除原始文件和不删除原始文件)
|
||||||
|
# 压缩时不删除原始文件的配置:gzip、brotli、both(同时开启 gzip 与 brotli 压缩)、none(不开启压缩,默认)
|
||||||
|
# 压缩时删除原始文件的配置:gzip-clear、brotli-clear、both-clear(同时开启 gzip 与 brotli 压缩)、none(不开启压缩,默认)
|
||||||
|
VITE_COMPRESSION = "none"
|
||||||
1
.eslintcache
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
20
.lintstagedrc
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"*.{js,jsx,ts,tsx}": [
|
||||||
|
"prettier --cache --ignore-unknown --write",
|
||||||
|
"eslint --cache --fix"
|
||||||
|
],
|
||||||
|
"{!(package)*.json,*.code-snippets,.!({browserslist,npm,nvm})*rc}": [
|
||||||
|
"prettier --cache --write--parser json"
|
||||||
|
],
|
||||||
|
"package.json": ["prettier --cache --write"],
|
||||||
|
"*.vue": [
|
||||||
|
"prettier --write",
|
||||||
|
"eslint --cache --fix",
|
||||||
|
"stylelint --fix --allow-empty-input"
|
||||||
|
],
|
||||||
|
"*.{css,scss,html}": [
|
||||||
|
"prettier --cache --ignore-unknown --write",
|
||||||
|
"stylelint --fix --allow-empty-input"
|
||||||
|
],
|
||||||
|
"*.md": ["prettier --cache --ignore-unknown --write"]
|
||||||
|
}
|
||||||
11
.markdownlint.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD003": false,
|
||||||
|
"MD033": false,
|
||||||
|
"MD013": false,
|
||||||
|
"MD001": false,
|
||||||
|
"MD025": false,
|
||||||
|
"MD024": false,
|
||||||
|
"MD007": { "indent": 4 },
|
||||||
|
"no-hard-tabs": false
|
||||||
|
}
|
||||||
4
.npmrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
shell-emulator=true
|
||||||
|
shamefully-hoist=true
|
||||||
|
enable-pre-post-scripts=false
|
||||||
|
strict-peer-dependencies=false
|
||||||
9
.prettierrc.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import("prettier").Config} */
|
||||||
|
export default {
|
||||||
|
bracketSpacing: true,
|
||||||
|
singleQuote: false,
|
||||||
|
arrowParens: "avoid",
|
||||||
|
trailingComma: "none"
|
||||||
|
};
|
||||||
4
.stylelintignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/dist/*
|
||||||
|
/public/*
|
||||||
|
public/*
|
||||||
|
src/style/reset.scss
|
||||||
19
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"christian-kohler.path-intellisense",
|
||||||
|
"warmthsea.vscode-custom-code-color",
|
||||||
|
"vscode-icons-team.vscode-icons",
|
||||||
|
"davidanson.vscode-markdownlint",
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"stylelint.vscode-stylelint",
|
||||||
|
"bradlc.vscode-tailwindcss",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"redhat.vscode-yaml",
|
||||||
|
"csstools.postcss",
|
||||||
|
"mikestead.dotenv",
|
||||||
|
"eamodio.gitlens",
|
||||||
|
"antfu.iconify",
|
||||||
|
"Vue.volar"
|
||||||
|
]
|
||||||
|
}
|
||||||
43
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"editor.formatOnType": true,
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"[vue]": {
|
||||||
|
"editor.defaultFormatter": "Vue.volar"
|
||||||
|
},
|
||||||
|
"editor.tabSize": 2,
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
|
"editor.guides.bracketPairs": "active",
|
||||||
|
"files.autoSave": "afterDelay",
|
||||||
|
"git.confirmSync": false,
|
||||||
|
"workbench.startupEditor": "newUntitledFile",
|
||||||
|
"editor.suggestSelection": "first",
|
||||||
|
"editor.acceptSuggestionOnCommitCharacter": false,
|
||||||
|
"css.lint.propertyIgnoredDueToDisplay": "ignore",
|
||||||
|
"editor.quickSuggestions": {
|
||||||
|
"other": true,
|
||||||
|
"comments": true,
|
||||||
|
"strings": true
|
||||||
|
},
|
||||||
|
"files.associations": {
|
||||||
|
"editor.snippetSuggestions": "top"
|
||||||
|
},
|
||||||
|
"[css]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll.eslint": "explicit"
|
||||||
|
},
|
||||||
|
"iconify.excludes": [
|
||||||
|
"el"
|
||||||
|
],
|
||||||
|
"vscodeCustomCodeColor.highlightValue": [
|
||||||
|
"v-loading",
|
||||||
|
"v-auth",
|
||||||
|
"v-copy",
|
||||||
|
"v-longpress",
|
||||||
|
"v-optimize",
|
||||||
|
"v-perms",
|
||||||
|
"v-ripple"
|
||||||
|
],
|
||||||
|
"vscodeCustomCodeColor.highlightValueColor": "#b392f0",
|
||||||
|
}
|
||||||
22
.vscode/vue3.0.code-snippets
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"Vue3.0快速生成模板": {
|
||||||
|
"scope": "vue",
|
||||||
|
"prefix": "Vue3.0",
|
||||||
|
"body": [
|
||||||
|
"<template>",
|
||||||
|
"\t<div>test</div>",
|
||||||
|
"</template>\n",
|
||||||
|
"<script lang='ts'>",
|
||||||
|
"export default {",
|
||||||
|
"\tsetup() {",
|
||||||
|
"\t\treturn {}",
|
||||||
|
"\t}",
|
||||||
|
"}",
|
||||||
|
"</script>\n",
|
||||||
|
"<style lang='scss' scoped>\n",
|
||||||
|
"</style>",
|
||||||
|
"$2"
|
||||||
|
],
|
||||||
|
"description": "Vue3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
17
.vscode/vue3.2.code-snippets
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"Vue3.2+快速生成模板": {
|
||||||
|
"scope": "vue",
|
||||||
|
"prefix": "Vue3.2+",
|
||||||
|
"body": [
|
||||||
|
"<script setup lang='ts'>",
|
||||||
|
"</script>\n",
|
||||||
|
"<template>",
|
||||||
|
"\t<div>test</div>",
|
||||||
|
"</template>\n",
|
||||||
|
"<style lang='scss' scoped>\n",
|
||||||
|
"</style>",
|
||||||
|
"$2"
|
||||||
|
],
|
||||||
|
"description": "Vue3.2+"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
.vscode/vue3.3.code-snippets
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"Vue3.3+defineOptions快速生成模板": {
|
||||||
|
"scope": "vue",
|
||||||
|
"prefix": "Vue3.3+",
|
||||||
|
"body": [
|
||||||
|
"<script setup lang='ts'>",
|
||||||
|
"defineOptions({",
|
||||||
|
"\tname: ''",
|
||||||
|
"})",
|
||||||
|
"</script>\n",
|
||||||
|
"<template>",
|
||||||
|
"\t<div>test</div>",
|
||||||
|
"</template>\n",
|
||||||
|
"<style lang='scss' scoped>\n",
|
||||||
|
"</style>",
|
||||||
|
"$2"
|
||||||
|
],
|
||||||
|
"description": "Vue3.3+defineOptions快速生成模板"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM node:20-alpine as build-stage
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
RUN corepack enable
|
||||||
|
RUN corepack prepare pnpm@latest --activate
|
||||||
|
|
||||||
|
RUN npm config set registry https://registry.npmmirror.com
|
||||||
|
|
||||||
|
COPY .npmrc package.json pnpm-lock.yaml ./
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN pnpm build
|
||||||
|
|
||||||
|
FROM nginx:stable-alpine as production-stage
|
||||||
|
|
||||||
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020-present, pure-admin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
47
README.en-US.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<h1>vue-pure-admin Lite Edition(no i18n version)</h1>
|
||||||
|
|
||||||
|
[](LICENSE)
|
||||||
|
|
||||||
|
**English** | [中文](./README.md)
|
||||||
|
|
||||||
|
## Introduce
|
||||||
|
|
||||||
|
The simplified version is based on the shelf extracted from [vue-pure-admin](https://github.com/pure-admin/vue-pure-admin), which contains main functions and is more suitable for actual project development. The packaged size is introduced globally [element-plus](https://element-plus.org) is still below `2.3MB`, and the full version of the code will be permanently synchronized. After enabling `brotli` compression and `cdn` to replace the local library mode, the package size is less than `350kb`
|
||||||
|
|
||||||
|
## `js` version
|
||||||
|
|
||||||
|
[Click me to view js version](https://pure-admin.cn/pages/js/)
|
||||||
|
|
||||||
|
## `max` version
|
||||||
|
|
||||||
|
[Click me to view the max version](https://pure-admin.cn/pages/max/)
|
||||||
|
|
||||||
|
## Supporting video
|
||||||
|
|
||||||
|
[Click me to view UI design](https://www.bilibili.com/video/BV17g411T7rq)
|
||||||
|
[Click me to view the rapid development tutorial](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||||
|
|
||||||
|
## Nanny-level documents
|
||||||
|
|
||||||
|
[Click me to view vue-pure-admin documentation](https://pure-admin.cn/)
|
||||||
|
[Click me to view @pureadmin/utils documentation](https://pure-admin-utils.netlify.app)
|
||||||
|
|
||||||
|
## Quality service, software outsourcing, sponsorship support
|
||||||
|
|
||||||
|
[Click me to view details](https://pure-admin.cn/pages/service/)
|
||||||
|
|
||||||
|
## Preview
|
||||||
|
|
||||||
|
[Click me to view the preview station](https://pure-admin-thin.netlify.app/#/login)
|
||||||
|
|
||||||
|
## Maintainer
|
||||||
|
|
||||||
|
[xiaoxian521](https://github.com/xiaoxian521)
|
||||||
|
|
||||||
|
## ⚠️ Attention
|
||||||
|
|
||||||
|
The Lite version does not accept any issues and prs. If you have any questions, please go to the full version [issues](https://github.com/pure-admin/vue-pure-admin/issues/new/choose) to mention, thank you!
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT © 2020-present, pure-admin](./LICENSE)
|
||||||
51
README.md
@@ -0,0 +1,51 @@
|
|||||||
|
<h1>vue-pure-admin精简版(非国际化版本)</h1>
|
||||||
|
|
||||||
|
[](LICENSE)
|
||||||
|
|
||||||
|
**中文** | [English](./README.en-US.md)
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
|
||||||
|
精简版是基于 [vue-pure-admin](https://github.com/pure-admin/vue-pure-admin) 提炼出的架子,包含主体功能,更适合实际项目开发,打包后的大小在全局引入 [element-plus](https://element-plus.org) 的情况下仍然低于 `2.3MB`,并且会永久同步完整版的代码。开启 `brotli` 压缩和 `cdn` 替换本地库模式后,打包大小低于 `350kb`
|
||||||
|
|
||||||
|
## 版本选择
|
||||||
|
|
||||||
|
当前是非国际化版本,如果您需要国际化版本 [请点击](https://github.com/pure-admin/pure-admin-thin/tree/i18n)
|
||||||
|
|
||||||
|
## `js` 版本
|
||||||
|
|
||||||
|
[点我查看 js 版本](https://pure-admin.cn/pages/js/)
|
||||||
|
|
||||||
|
## `max` 版本
|
||||||
|
|
||||||
|
[点我查看 max 版本](https://pure-admin.cn/pages/max/)
|
||||||
|
|
||||||
|
## 配套视频
|
||||||
|
|
||||||
|
[点我查看 UI 设计](https://www.bilibili.com/video/BV17g411T7rq)
|
||||||
|
[点我查看快速开发教程](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||||
|
|
||||||
|
## 配套保姆级文档
|
||||||
|
|
||||||
|
[点我查看 vue-pure-admin 文档](https://pure-admin.cn/)
|
||||||
|
[点我查看 @pureadmin/utils 文档](https://pure-admin-utils.netlify.app)
|
||||||
|
|
||||||
|
## 优质服务、软件外包、赞助支持
|
||||||
|
|
||||||
|
[点我查看详情](https://pure-admin.cn/pages/service/)
|
||||||
|
|
||||||
|
## 预览
|
||||||
|
|
||||||
|
[查看预览](https://pure-admin-thin.netlify.app/#/login)
|
||||||
|
|
||||||
|
## 维护者
|
||||||
|
|
||||||
|
[xiaoxian521](https://github.com/xiaoxian521)
|
||||||
|
|
||||||
|
## ⚠️ 注意
|
||||||
|
|
||||||
|
精简版不接受任何 `issues` 和 `pr`,如果有问题请到完整版 [issues](https://github.com/pure-admin/vue-pure-admin/issues/new/choose) 去提,谢谢!
|
||||||
|
|
||||||
|
## 许可证
|
||||||
|
|
||||||
|
[MIT © 2020-present, pure-admin](./LICENSE)
|
||||||
|
|||||||
55
build/cdn.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import { Plugin as importToCDN } from "vite-plugin-cdn-import";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 打包时采用`cdn`模式,仅限外网使用(默认不采用,如果需要采用cdn模式,请在 .env.production 文件,将 VITE_CDN 设置成true)
|
||||||
|
* 平台采用国内cdn:https://www.bootcdn.cn,当然你也可以选择 https://unpkg.com 或者 https://www.jsdelivr.com
|
||||||
|
* 注意:上面提到的仅限外网使用也不是完全肯定的,如果你们公司内网部署的有相关js、css文件,也可以将下面配置对应改一下,整一套内网版cdn
|
||||||
|
*/
|
||||||
|
export const cdn = importToCDN({
|
||||||
|
//(prodUrl解释: name: 对应下面modules的name,version: 自动读取本地package.json中dependencies依赖中对应包的版本号,path: 对应下面modules的path,当然也可写完整路径,会替换prodUrl)
|
||||||
|
prodUrl: "https://cdn.bootcdn.net/ajax/libs/{name}/{version}/{path}",
|
||||||
|
modules: [
|
||||||
|
{
|
||||||
|
name: "vue",
|
||||||
|
var: "Vue",
|
||||||
|
path: "vue.global.prod.min.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "vue-router",
|
||||||
|
var: "VueRouter",
|
||||||
|
path: "vue-router.global.min.js"
|
||||||
|
},
|
||||||
|
// 项目中没有直接安装vue-demi,但是pinia用到了,所以需要在引入pinia前引入vue-demi(https://github.com/vuejs/pinia/blob/v2/packages/pinia/package.json#L77)
|
||||||
|
{
|
||||||
|
name: "vue-demi",
|
||||||
|
var: "VueDemi",
|
||||||
|
path: "index.iife.min.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "pinia",
|
||||||
|
var: "Pinia",
|
||||||
|
path: "pinia.iife.min.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "element-plus",
|
||||||
|
var: "ElementPlus",
|
||||||
|
path: "index.full.min.js",
|
||||||
|
css: "index.min.css"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "axios",
|
||||||
|
var: "axios",
|
||||||
|
path: "axios.min.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dayjs",
|
||||||
|
var: "dayjs",
|
||||||
|
path: "dayjs.min.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "echarts",
|
||||||
|
var: "echarts",
|
||||||
|
path: "echarts.min.js"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
63
build/compress.ts
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import type { Plugin } from "vite";
|
||||||
|
import { isArray } from "@pureadmin/utils";
|
||||||
|
import compressPlugin from "vite-plugin-compression";
|
||||||
|
|
||||||
|
export const configCompressPlugin = (
|
||||||
|
compress: ViteCompression
|
||||||
|
): Plugin | Plugin[] => {
|
||||||
|
if (compress === "none") return null;
|
||||||
|
|
||||||
|
const gz = {
|
||||||
|
// 生成的压缩包后缀
|
||||||
|
ext: ".gz",
|
||||||
|
// 体积大于threshold才会被压缩
|
||||||
|
threshold: 0,
|
||||||
|
// 默认压缩.js|mjs|json|css|html后缀文件,设置成true,压缩全部文件
|
||||||
|
filter: () => true,
|
||||||
|
// 压缩后是否删除原始文件
|
||||||
|
deleteOriginFile: false
|
||||||
|
};
|
||||||
|
const br = {
|
||||||
|
ext: ".br",
|
||||||
|
algorithm: "brotliCompress",
|
||||||
|
threshold: 0,
|
||||||
|
filter: () => true,
|
||||||
|
deleteOriginFile: false
|
||||||
|
};
|
||||||
|
|
||||||
|
const codeList = [
|
||||||
|
{ k: "gzip", v: gz },
|
||||||
|
{ k: "brotli", v: br },
|
||||||
|
{ k: "both", v: [gz, br] }
|
||||||
|
];
|
||||||
|
|
||||||
|
const plugins: Plugin[] = [];
|
||||||
|
|
||||||
|
codeList.forEach(item => {
|
||||||
|
if (compress.includes(item.k)) {
|
||||||
|
if (compress.includes("clear")) {
|
||||||
|
if (isArray(item.v)) {
|
||||||
|
item.v.forEach(vItem => {
|
||||||
|
plugins.push(
|
||||||
|
compressPlugin(Object.assign(vItem, { deleteOriginFile: true }))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
plugins.push(
|
||||||
|
compressPlugin(Object.assign(item.v, { deleteOriginFile: true }))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isArray(item.v)) {
|
||||||
|
item.v.forEach(vItem => {
|
||||||
|
plugins.push(compressPlugin(vItem));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
plugins.push(compressPlugin(item.v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return plugins;
|
||||||
|
};
|
||||||
57
build/info.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { Plugin } from "vite";
|
||||||
|
import gradient from "gradient-string";
|
||||||
|
import { getPackageSize } from "./utils";
|
||||||
|
import dayjs, { type Dayjs } from "dayjs";
|
||||||
|
import duration from "dayjs/plugin/duration";
|
||||||
|
import boxen, { type Options as BoxenOptions } from "boxen";
|
||||||
|
dayjs.extend(duration);
|
||||||
|
|
||||||
|
const welcomeMessage = gradient(["cyan", "magenta"]).multiline(
|
||||||
|
`您好! 欢迎使用 pure-admin 开源项目\n我们为您精心准备了下面两个贴心的保姆级文档\nhttps://pure-admin.cn\nhttps://pure-admin-utils.netlify.app`
|
||||||
|
);
|
||||||
|
|
||||||
|
const boxenOptions: BoxenOptions = {
|
||||||
|
padding: 0.5,
|
||||||
|
borderColor: "cyan",
|
||||||
|
borderStyle: "round"
|
||||||
|
};
|
||||||
|
|
||||||
|
export function viteBuildInfo(): Plugin {
|
||||||
|
let config: { command: string };
|
||||||
|
let startTime: Dayjs;
|
||||||
|
let endTime: Dayjs;
|
||||||
|
let outDir: string;
|
||||||
|
return {
|
||||||
|
name: "vite:buildInfo",
|
||||||
|
configResolved(resolvedConfig) {
|
||||||
|
config = resolvedConfig;
|
||||||
|
outDir = resolvedConfig.build?.outDir ?? "dist";
|
||||||
|
},
|
||||||
|
buildStart() {
|
||||||
|
console.log(boxen(welcomeMessage, boxenOptions));
|
||||||
|
if (config.command === "build") {
|
||||||
|
startTime = dayjs(new Date());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeBundle() {
|
||||||
|
if (config.command === "build") {
|
||||||
|
endTime = dayjs(new Date());
|
||||||
|
getPackageSize({
|
||||||
|
folder: outDir,
|
||||||
|
callback: (size: string) => {
|
||||||
|
console.log(
|
||||||
|
boxen(
|
||||||
|
gradient(["cyan", "magenta"]).multiline(
|
||||||
|
`🎉 恭喜打包完成(总用时${dayjs
|
||||||
|
.duration(endTime.diff(startTime))
|
||||||
|
.format("mm分ss秒")},打包后的大小为${size})`
|
||||||
|
),
|
||||||
|
boxenOptions
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
29
build/optimize.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/**
|
||||||
|
* 此文件作用于 `vite.config.ts` 的 `optimizeDeps.include` 依赖预构建配置项
|
||||||
|
* 依赖预构建,`vite` 启动时会将下面 include 里的模块,编译成 esm 格式并缓存到 node_modules/.vite 文件夹,页面加载到对应模块时如果浏览器有缓存就读取浏览器缓存,如果没有会读取本地缓存并按需加载
|
||||||
|
* 尤其当您禁用浏览器缓存时(这种情况只应该发生在调试阶段)必须将对应模块加入到 include里,否则会遇到开发环境切换页面卡顿的问题(vite 会认为它是一个新的依赖包会重新加载并强制刷新页面),因为它既无法使用浏览器缓存,又没有在本地 node_modules/.vite 里缓存
|
||||||
|
* 温馨提示:如果您使用的第三方库是全局引入,也就是引入到 src/main.ts 文件里,就不需要再添加到 include 里了,因为 vite 会自动将它们缓存到 node_modules/.vite
|
||||||
|
*/
|
||||||
|
const include = [
|
||||||
|
"qs",
|
||||||
|
"mitt",
|
||||||
|
"dayjs",
|
||||||
|
"axios",
|
||||||
|
"pinia",
|
||||||
|
"vue-types",
|
||||||
|
"js-cookie",
|
||||||
|
"vue-tippy",
|
||||||
|
"pinyin-pro",
|
||||||
|
"sortablejs",
|
||||||
|
"@vueuse/core",
|
||||||
|
"@pureadmin/utils",
|
||||||
|
"responsive-storage"
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在预构建中强制排除的依赖项
|
||||||
|
* 温馨提示:所有以 `@iconify-icons/` 开头引入的的本地图标模块,都应该加入到下面的 `exclude` 里,因为平台推荐的使用方式是哪里需要哪里引入而且都是单个的引入,不需要预构建,直接让浏览器加载就好
|
||||||
|
*/
|
||||||
|
const exclude = ["@iconify-icons/ep", "@iconify-icons/ri"];
|
||||||
|
|
||||||
|
export { include, exclude };
|
||||||
58
build/plugins.ts
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
import { cdn } from "./cdn";
|
||||||
|
import vue from "@vitejs/plugin-vue";
|
||||||
|
import { viteBuildInfo } from "./info";
|
||||||
|
import svgLoader from "vite-svg-loader";
|
||||||
|
import type { PluginOption } from "vite";
|
||||||
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||||
|
import { configCompressPlugin } from "./compress";
|
||||||
|
import removeNoMatch from "vite-plugin-router-warn";
|
||||||
|
import { visualizer } from "rollup-plugin-visualizer";
|
||||||
|
import removeConsole from "vite-plugin-remove-console";
|
||||||
|
import { codeInspectorPlugin } from "code-inspector-plugin";
|
||||||
|
import { vitePluginFakeServer } from "vite-plugin-fake-server";
|
||||||
|
|
||||||
|
export function getPluginsList(
|
||||||
|
VITE_CDN: boolean,
|
||||||
|
VITE_COMPRESSION: ViteCompression
|
||||||
|
): PluginOption[] {
|
||||||
|
const lifecycle = process.env.npm_lifecycle_event;
|
||||||
|
return [
|
||||||
|
vue(),
|
||||||
|
// jsx、tsx语法支持
|
||||||
|
vueJsx(),
|
||||||
|
/**
|
||||||
|
* 在页面上按住组合键时,鼠标在页面移动即会在 DOM 上出现遮罩层并显示相关信息,点击一下将自动打开 IDE 并将光标定位到元素对应的代码位置
|
||||||
|
* Mac 默认组合键 Option + Shift
|
||||||
|
* Windows 默认组合键 Alt + Shift
|
||||||
|
* 更多用法看 https://inspector.fe-dev.cn/guide/start.html
|
||||||
|
*/
|
||||||
|
codeInspectorPlugin({
|
||||||
|
bundler: "vite",
|
||||||
|
hideConsole: true
|
||||||
|
}),
|
||||||
|
viteBuildInfo(),
|
||||||
|
/**
|
||||||
|
* 开发环境下移除非必要的vue-router动态路由警告No match found for location with path
|
||||||
|
* 非必要具体看 https://github.com/vuejs/router/issues/521 和 https://github.com/vuejs/router/issues/359
|
||||||
|
* vite-plugin-router-warn只在开发环境下启用,只处理vue-router文件并且只在服务启动或重启时运行一次,性能消耗可忽略不计
|
||||||
|
*/
|
||||||
|
removeNoMatch(),
|
||||||
|
// mock支持
|
||||||
|
vitePluginFakeServer({
|
||||||
|
logger: false,
|
||||||
|
include: "mock",
|
||||||
|
infixName: false,
|
||||||
|
enableProd: true
|
||||||
|
}),
|
||||||
|
// svg组件化支持
|
||||||
|
svgLoader(),
|
||||||
|
VITE_CDN ? cdn : null,
|
||||||
|
configCompressPlugin(VITE_COMPRESSION),
|
||||||
|
// 线上环境删除console
|
||||||
|
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
|
||||||
|
// 打包分析
|
||||||
|
lifecycle === "report"
|
||||||
|
? visualizer({ open: true, brotliSize: true, filename: "report.html" })
|
||||||
|
: (null as any)
|
||||||
|
];
|
||||||
|
}
|
||||||
110
build/utils.ts
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
import dayjs from "dayjs";
|
||||||
|
import { readdir, stat } from "node:fs";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
import { dirname, resolve } from "node:path";
|
||||||
|
import { sum, formatBytes } from "@pureadmin/utils";
|
||||||
|
import {
|
||||||
|
name,
|
||||||
|
version,
|
||||||
|
engines,
|
||||||
|
dependencies,
|
||||||
|
devDependencies
|
||||||
|
} from "../package.json";
|
||||||
|
|
||||||
|
/** 启动`node`进程时所在工作目录的绝对路径 */
|
||||||
|
const root: string = process.cwd();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 根据可选的路径片段生成一个新的绝对路径
|
||||||
|
* @param dir 路径片段,默认`build`
|
||||||
|
* @param metaUrl 模块的完整`url`,如果在`build`目录外调用必传`import.meta.url`
|
||||||
|
*/
|
||||||
|
const pathResolve = (dir = ".", metaUrl = import.meta.url) => {
|
||||||
|
// 当前文件目录的绝对路径
|
||||||
|
const currentFileDir = dirname(fileURLToPath(metaUrl));
|
||||||
|
// build 目录的绝对路径
|
||||||
|
const buildDir = resolve(currentFileDir, "build");
|
||||||
|
// 解析的绝对路径
|
||||||
|
const resolvedPath = resolve(currentFileDir, dir);
|
||||||
|
// 检查解析的绝对路径是否在 build 目录内
|
||||||
|
if (resolvedPath.startsWith(buildDir)) {
|
||||||
|
// 在 build 目录内,返回当前文件路径
|
||||||
|
return fileURLToPath(metaUrl);
|
||||||
|
}
|
||||||
|
// 不在 build 目录内,返回解析后的绝对路径
|
||||||
|
return resolvedPath;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 设置别名 */
|
||||||
|
const alias: Record<string, string> = {
|
||||||
|
"@": pathResolve("../src"),
|
||||||
|
"@build": pathResolve()
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 平台的名称、版本、运行所需的`node`和`pnpm`版本、依赖、最后构建时间的类型提示 */
|
||||||
|
const __APP_INFO__ = {
|
||||||
|
pkg: { name, version, engines, dependencies, devDependencies },
|
||||||
|
lastBuildTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 处理环境变量 */
|
||||||
|
const wrapperEnv = (envConf: Recordable): ViteEnv => {
|
||||||
|
// 默认值
|
||||||
|
const ret: ViteEnv = {
|
||||||
|
VITE_PORT: 8848,
|
||||||
|
VITE_PUBLIC_PATH: "",
|
||||||
|
VITE_ROUTER_HISTORY: "",
|
||||||
|
VITE_CDN: false,
|
||||||
|
VITE_HIDE_HOME: "false",
|
||||||
|
VITE_COMPRESSION: "none"
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const envName of Object.keys(envConf)) {
|
||||||
|
let realName = envConf[envName].replace(/\\n/g, "\n");
|
||||||
|
realName =
|
||||||
|
realName === "true" ? true : realName === "false" ? false : realName;
|
||||||
|
|
||||||
|
if (envName === "VITE_PORT") {
|
||||||
|
realName = Number(realName);
|
||||||
|
}
|
||||||
|
ret[envName] = realName;
|
||||||
|
if (typeof realName === "string") {
|
||||||
|
process.env[envName] = realName;
|
||||||
|
} else if (typeof realName === "object") {
|
||||||
|
process.env[envName] = JSON.stringify(realName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fileListTotal: number[] = [];
|
||||||
|
|
||||||
|
/** 获取指定文件夹中所有文件的总大小 */
|
||||||
|
const getPackageSize = options => {
|
||||||
|
const { folder = "dist", callback, format = true } = options;
|
||||||
|
readdir(folder, (err, files: string[]) => {
|
||||||
|
if (err) throw err;
|
||||||
|
let count = 0;
|
||||||
|
const checkEnd = () => {
|
||||||
|
++count == files.length &&
|
||||||
|
callback(format ? formatBytes(sum(fileListTotal)) : sum(fileListTotal));
|
||||||
|
};
|
||||||
|
files.forEach((item: string) => {
|
||||||
|
stat(`${folder}/${item}`, async (err, stats) => {
|
||||||
|
if (err) throw err;
|
||||||
|
if (stats.isFile()) {
|
||||||
|
fileListTotal.push(stats.size);
|
||||||
|
checkEnd();
|
||||||
|
} else if (stats.isDirectory()) {
|
||||||
|
getPackageSize({
|
||||||
|
folder: `${folder}/${item}/`,
|
||||||
|
callback: checkEnd
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
files.length === 0 && callback(0);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export { root, pathResolve, alias, __APP_INFO__, wrapperEnv, getPackageSize };
|
||||||
35
commitlint.config.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import("@commitlint/types").UserConfig} */
|
||||||
|
export default {
|
||||||
|
ignores: [commit => commit.includes("init")],
|
||||||
|
extends: ["@commitlint/config-conventional"],
|
||||||
|
rules: {
|
||||||
|
"body-leading-blank": [2, "always"],
|
||||||
|
"footer-leading-blank": [1, "always"],
|
||||||
|
"header-max-length": [2, "always", 108],
|
||||||
|
"subject-empty": [2, "never"],
|
||||||
|
"type-empty": [2, "never"],
|
||||||
|
"type-enum": [
|
||||||
|
2,
|
||||||
|
"always",
|
||||||
|
[
|
||||||
|
"feat",
|
||||||
|
"fix",
|
||||||
|
"perf",
|
||||||
|
"style",
|
||||||
|
"docs",
|
||||||
|
"test",
|
||||||
|
"refactor",
|
||||||
|
"build",
|
||||||
|
"ci",
|
||||||
|
"chore",
|
||||||
|
"revert",
|
||||||
|
"wip",
|
||||||
|
"workflow",
|
||||||
|
"types",
|
||||||
|
"release"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
184
eslint.config.js
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import pluginVue from "eslint-plugin-vue";
|
||||||
|
import * as parserVue from "vue-eslint-parser";
|
||||||
|
import configPrettier from "eslint-config-prettier";
|
||||||
|
import pluginPrettier from "eslint-plugin-prettier";
|
||||||
|
import { defineFlatConfig } from "eslint-define-config";
|
||||||
|
import * as parserTypeScript from "@typescript-eslint/parser";
|
||||||
|
import pluginTypeScript from "@typescript-eslint/eslint-plugin";
|
||||||
|
|
||||||
|
export default defineFlatConfig([
|
||||||
|
{
|
||||||
|
...js.configs.recommended,
|
||||||
|
ignores: [
|
||||||
|
"**/.*",
|
||||||
|
"dist/*",
|
||||||
|
"*.d.ts",
|
||||||
|
"public/*",
|
||||||
|
"src/assets/**",
|
||||||
|
"src/**/iconfont/**"
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
// index.d.ts
|
||||||
|
RefType: "readonly",
|
||||||
|
EmitType: "readonly",
|
||||||
|
TargetContext: "readonly",
|
||||||
|
ComponentRef: "readonly",
|
||||||
|
ElRef: "readonly",
|
||||||
|
ForDataType: "readonly",
|
||||||
|
AnyFunction: "readonly",
|
||||||
|
PropType: "readonly",
|
||||||
|
Writable: "readonly",
|
||||||
|
Nullable: "readonly",
|
||||||
|
NonNullable: "readonly",
|
||||||
|
Recordable: "readonly",
|
||||||
|
ReadonlyRecordable: "readonly",
|
||||||
|
Indexable: "readonly",
|
||||||
|
DeepPartial: "readonly",
|
||||||
|
Without: "readonly",
|
||||||
|
Exclusive: "readonly",
|
||||||
|
TimeoutHandle: "readonly",
|
||||||
|
IntervalHandle: "readonly",
|
||||||
|
Effect: "readonly",
|
||||||
|
ChangeEvent: "readonly",
|
||||||
|
WheelEvent: "readonly",
|
||||||
|
ImportMetaEnv: "readonly",
|
||||||
|
Fn: "readonly",
|
||||||
|
PromiseFn: "readonly",
|
||||||
|
ComponentElRef: "readonly",
|
||||||
|
parseInt: "readonly",
|
||||||
|
parseFloat: "readonly"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
prettier: pluginPrettier
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
...configPrettier.rules,
|
||||||
|
...pluginPrettier.configs.recommended.rules,
|
||||||
|
"no-debugger": "off",
|
||||||
|
"no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
argsIgnorePattern: "^_",
|
||||||
|
varsIgnorePattern: "^_"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"prettier/prettier": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
endOfLine: "auto"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
|
||||||
|
languageOptions: {
|
||||||
|
parser: parserTypeScript,
|
||||||
|
parserOptions: {
|
||||||
|
sourceType: "module",
|
||||||
|
warnOnUnsupportedTypeScriptVersion: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
"@typescript-eslint": pluginTypeScript
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
...pluginTypeScript.configs.strict.rules,
|
||||||
|
"@typescript-eslint/ban-types": "off",
|
||||||
|
"@typescript-eslint/no-redeclare": "error",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/prefer-as-const": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
"@typescript-eslint/no-unused-expressions": "off",
|
||||||
|
"@typescript-eslint/no-unsafe-function-type": "off",
|
||||||
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
||||||
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||||
|
"@typescript-eslint/consistent-type-imports": [
|
||||||
|
"error",
|
||||||
|
{ disallowTypeAnnotations: false, fixStyle: "inline-type-imports" }
|
||||||
|
],
|
||||||
|
"@typescript-eslint/prefer-literal-enum-member": [
|
||||||
|
"error",
|
||||||
|
{ allowBitwiseExpressions: true }
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
argsIgnorePattern: "^_",
|
||||||
|
varsIgnorePattern: "^_"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.d.ts"],
|
||||||
|
rules: {
|
||||||
|
"eslint-comments/no-unlimited-disable": "off",
|
||||||
|
"import/no-duplicates": "off",
|
||||||
|
"unused-imports/no-unused-vars": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.?([cm])js"],
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-require-imports": "off",
|
||||||
|
"@typescript-eslint/no-var-requires": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.vue"],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
$: "readonly",
|
||||||
|
$$: "readonly",
|
||||||
|
$computed: "readonly",
|
||||||
|
$customRef: "readonly",
|
||||||
|
$ref: "readonly",
|
||||||
|
$shallowRef: "readonly",
|
||||||
|
$toRef: "readonly"
|
||||||
|
},
|
||||||
|
parser: parserVue,
|
||||||
|
parserOptions: {
|
||||||
|
ecmaFeatures: {
|
||||||
|
jsx: true
|
||||||
|
},
|
||||||
|
extraFileExtensions: [".vue"],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
sourceType: "module"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
vue: pluginVue
|
||||||
|
},
|
||||||
|
processor: pluginVue.processors[".vue"],
|
||||||
|
rules: {
|
||||||
|
...pluginVue.configs.base.rules,
|
||||||
|
...pluginVue.configs["vue3-essential"].rules,
|
||||||
|
...pluginVue.configs["vue3-recommended"].rules,
|
||||||
|
"no-undef": "off",
|
||||||
|
"no-unused-vars": "off",
|
||||||
|
"vue/no-v-html": "off",
|
||||||
|
"vue/require-default-prop": "off",
|
||||||
|
"vue/require-explicit-emits": "off",
|
||||||
|
"vue/multi-word-component-names": "off",
|
||||||
|
"vue/no-setup-props-reactivity-loss": "off",
|
||||||
|
"vue/html-self-closing": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
html: {
|
||||||
|
void: "always",
|
||||||
|
normal: "always",
|
||||||
|
component: "always"
|
||||||
|
},
|
||||||
|
svg: "always",
|
||||||
|
math: "always"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
88
index.html
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<meta name="renderer" content="webkit" />
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
|
||||||
|
<title>my语聊管理后台</title>
|
||||||
|
<!-- <link rel="icon" href="/favicon.ico" /> -->
|
||||||
|
<script>
|
||||||
|
window.process = {};
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app">
|
||||||
|
<style>
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader,
|
||||||
|
.loader::before,
|
||||||
|
.loader::after {
|
||||||
|
width: 2.5em;
|
||||||
|
height: 2.5em;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: load-animation 1.8s infinite ease-in-out;
|
||||||
|
animation-fill-mode: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
margin: 80px auto;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #406eeb;
|
||||||
|
text-indent: -9999em;
|
||||||
|
transform: translateZ(0);
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
animation-delay: -0.16s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader::before,
|
||||||
|
.loader::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader::before {
|
||||||
|
left: -3.5em;
|
||||||
|
animation-delay: -0.32s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader::after {
|
||||||
|
left: 3.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes load-animation {
|
||||||
|
|
||||||
|
0%,
|
||||||
|
80%,
|
||||||
|
100% {
|
||||||
|
box-shadow: 0 2.5em 0 -1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
40% {
|
||||||
|
box-shadow: 0 2.5em 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="loader"></div>
|
||||||
|
</div>
|
||||||
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
69
mock/asyncRoutes.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
// 模拟后端动态生成路由
|
||||||
|
import { defineFakeRoute } from "vite-plugin-fake-server/client";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* roles:页面级别权限,这里模拟二种 "admin"、"common"
|
||||||
|
* admin:管理员角色
|
||||||
|
* common:普通角色
|
||||||
|
*/
|
||||||
|
const permissionRouter = {
|
||||||
|
path: "/permission",
|
||||||
|
meta: {
|
||||||
|
title: "权限管理",
|
||||||
|
icon: "ep:lollipop",
|
||||||
|
rank: 10
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/permission/page/index",
|
||||||
|
name: "PermissionPage",
|
||||||
|
meta: {
|
||||||
|
title: "页面权限",
|
||||||
|
roles: ["admin", "common"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/permission/button",
|
||||||
|
meta: {
|
||||||
|
title: "按钮权限",
|
||||||
|
roles: ["admin", "common"]
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/permission/button/router",
|
||||||
|
component: "permission/button/index",
|
||||||
|
name: "PermissionButtonRouter",
|
||||||
|
meta: {
|
||||||
|
title: "路由返回按钮权限",
|
||||||
|
auths: [
|
||||||
|
"permission:btn:add",
|
||||||
|
"permission:btn:edit",
|
||||||
|
"permission:btn:delete"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/permission/button/login",
|
||||||
|
component: "permission/button/perms",
|
||||||
|
name: "PermissionButtonLogin",
|
||||||
|
meta: {
|
||||||
|
title: "登录接口返回按钮权限"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
export default defineFakeRoute([
|
||||||
|
{
|
||||||
|
url: "/get-async-routes",
|
||||||
|
method: "get",
|
||||||
|
response: () => {
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data: [permissionRouter]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
42
mock/login.ts
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
// 根据角色动态生成路由
|
||||||
|
import { defineFakeRoute } from "vite-plugin-fake-server/client";
|
||||||
|
|
||||||
|
export default defineFakeRoute([
|
||||||
|
{
|
||||||
|
url: "/login",
|
||||||
|
method: "post",
|
||||||
|
response: ({ body }) => {
|
||||||
|
if (body.username === "admin") {
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||||
|
username: "admin",
|
||||||
|
nickname: "小铭",
|
||||||
|
// 一个用户可能有多个角色
|
||||||
|
roles: ["admin"],
|
||||||
|
// 按钮级别权限
|
||||||
|
permissions: ["*:*:*"],
|
||||||
|
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
|
||||||
|
refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
|
||||||
|
expires: "2030/10/30 00:00:00"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
avatar: "https://avatars.githubusercontent.com/u/52823142",
|
||||||
|
username: "common",
|
||||||
|
nickname: "小林",
|
||||||
|
roles: ["common"],
|
||||||
|
permissions: ["permission:btn:add", "permission:btn:edit"],
|
||||||
|
accessToken: "eyJhbGciOiJIUzUxMiJ9.common",
|
||||||
|
refreshToken: "eyJhbGciOiJIUzUxMiJ9.commonRefresh",
|
||||||
|
expires: "2030/10/30 00:00:00"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
27
mock/refreshToken.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import { defineFakeRoute } from "vite-plugin-fake-server/client";
|
||||||
|
|
||||||
|
// 模拟刷新token接口
|
||||||
|
export default defineFakeRoute([
|
||||||
|
{
|
||||||
|
url: "/refresh-token",
|
||||||
|
method: "post",
|
||||||
|
response: ({ body }) => {
|
||||||
|
if (body.refreshToken) {
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
|
||||||
|
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
|
||||||
|
// `expires`选择这种日期格式是为了方便调试,后端直接设置时间戳或许更方便(每次都应该递增)。如果后端返回的是时间戳格式,前端开发请来到这个目录`src/utils/auth.ts`,把第`38`行的代码换成expires = data.expires即可。
|
||||||
|
expires: "2030/10/30 23:59:59"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
success: false,
|
||||||
|
data: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
164
package.json
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
{
|
||||||
|
"name": "pure-admin-thin",
|
||||||
|
"version": "5.9.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
||||||
|
"serve": "pnpm dev",
|
||||||
|
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build",
|
||||||
|
"build:staging": "rimraf dist && vite build --mode staging",
|
||||||
|
"report": "rimraf dist && vite build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"preview:build": "pnpm build && vite preview",
|
||||||
|
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
|
||||||
|
"svgo": "svgo -f . -r",
|
||||||
|
"clean:cache": "rimraf .eslintcache && rimraf pnpm-lock.yaml && rimraf node_modules && pnpm store prune && pnpm install",
|
||||||
|
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
|
||||||
|
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
|
||||||
|
"lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache-location node_modules/.cache/stylelint/",
|
||||||
|
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
|
||||||
|
"prepare": "husky",
|
||||||
|
"preinstall": "npx only-allow pnpm"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"pure-admin-thin",
|
||||||
|
"vue-pure-admin",
|
||||||
|
"element-plus",
|
||||||
|
"tailwindcss",
|
||||||
|
"pure-admin",
|
||||||
|
"typescript",
|
||||||
|
"pinia",
|
||||||
|
"vue3",
|
||||||
|
"vite",
|
||||||
|
"esm"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/pure-admin/pure-admin-thin",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/pure-admin/pure-admin-thin.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/pure-admin/vue-pure-admin/issues"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"author": {
|
||||||
|
"name": "xiaoxian521",
|
||||||
|
"email": "pureadmin@163.com",
|
||||||
|
"url": "https://github.com/xiaoxian521"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@pureadmin/descriptions": "^1.2.1",
|
||||||
|
"@pureadmin/table": "^3.2.1",
|
||||||
|
"@pureadmin/utils": "^2.5.0",
|
||||||
|
"@vueuse/core": "^12.0.0",
|
||||||
|
"@vueuse/motion": "^2.2.6",
|
||||||
|
"@wangeditor/editor": "^5.1.23",
|
||||||
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
|
"agora-rtc-sdk-ng": "^4.23.4",
|
||||||
|
"ali-oss": "^6.23.0",
|
||||||
|
"animate.css": "^4.1.1",
|
||||||
|
"axios": "^1.7.9",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
|
"echarts": "^5.6.0",
|
||||||
|
"element-plus": "^2.9.0",
|
||||||
|
"js-cookie": "^3.0.5",
|
||||||
|
"localforage": "^1.10.0",
|
||||||
|
"mitt": "^3.0.1",
|
||||||
|
"nprogress": "^0.2.0",
|
||||||
|
"path-browserify": "^1.0.1",
|
||||||
|
"pinia": "^2.3.0",
|
||||||
|
"pinyin-pro": "^3.26.0",
|
||||||
|
"qs": "^6.13.1",
|
||||||
|
"require.js": "^1.0.0",
|
||||||
|
"responsive-storage": "^2.2.0",
|
||||||
|
"sortablejs": "^1.15.6",
|
||||||
|
"vue": "^3.5.13",
|
||||||
|
"vue-router": "^4.5.0",
|
||||||
|
"vue-tippy": "^6.5.0",
|
||||||
|
"vue-types": "^5.1.3",
|
||||||
|
"xlsx": "^0.18.5"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^19.6.0",
|
||||||
|
"@commitlint/config-conventional": "^19.6.0",
|
||||||
|
"@commitlint/types": "^19.5.0",
|
||||||
|
"@eslint/js": "^9.16.0",
|
||||||
|
"@faker-js/faker": "^9.3.0",
|
||||||
|
"@iconify-icons/ep": "^1.2.12",
|
||||||
|
"@iconify-icons/ri": "^1.2.10",
|
||||||
|
"@iconify/vue": "^4.2.0",
|
||||||
|
"@types/js-cookie": "^3.0.6",
|
||||||
|
"@types/node": "^20.17.9",
|
||||||
|
"@types/nprogress": "^0.2.3",
|
||||||
|
"@types/path-browserify": "^1.0.3",
|
||||||
|
"@types/qs": "^6.9.17",
|
||||||
|
"@types/sortablejs": "^1.15.8",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
||||||
|
"@typescript-eslint/parser": "^8.18.0",
|
||||||
|
"@vitejs/plugin-vue": "^5.2.1",
|
||||||
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||||
|
"autoprefixer": "^10.4.20",
|
||||||
|
"boxen": "^8.0.1",
|
||||||
|
"code-inspector-plugin": "^0.18.2",
|
||||||
|
"cssnano": "^7.0.6",
|
||||||
|
"eslint": "^9.16.0",
|
||||||
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
"eslint-define-config": "^2.1.0",
|
||||||
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
|
"eslint-plugin-vue": "^9.32.0",
|
||||||
|
"gradient-string": "^3.0.0",
|
||||||
|
"husky": "^9.1.7",
|
||||||
|
"lint-staged": "^15.2.10",
|
||||||
|
"mdi": "link:@iconify-json\\mdi",
|
||||||
|
"postcss": "^8.4.49",
|
||||||
|
"postcss-html": "^1.7.0",
|
||||||
|
"postcss-import": "^16.1.0",
|
||||||
|
"postcss-scss": "^4.0.9",
|
||||||
|
"prettier": "^3.4.2",
|
||||||
|
"rimraf": "^6.0.1",
|
||||||
|
"rollup-plugin-visualizer": "^5.12.0",
|
||||||
|
"sass": "^1.82.0",
|
||||||
|
"stylelint": "^16.11.0",
|
||||||
|
"stylelint-config-recess-order": "^5.1.1",
|
||||||
|
"stylelint-config-recommended-vue": "^1.5.0",
|
||||||
|
"stylelint-config-standard-scss": "^13.1.0",
|
||||||
|
"stylelint-prettier": "^5.0.2",
|
||||||
|
"svgo": "^3.3.2",
|
||||||
|
"tailwindcss": "^3.4.16",
|
||||||
|
"typescript": "5.6.3",
|
||||||
|
"vite": "^6.0.3",
|
||||||
|
"vite-plugin-cdn-import": "^1.0.1",
|
||||||
|
"vite-plugin-compression": "^0.5.1",
|
||||||
|
"vite-plugin-fake-server": "^2.1.4",
|
||||||
|
"vite-plugin-remove-console": "^2.2.0",
|
||||||
|
"vite-plugin-router-warn": "^1.0.0",
|
||||||
|
"vite-svg-loader": "^5.1.0",
|
||||||
|
"vue-eslint-parser": "^9.4.3",
|
||||||
|
"vue-tsc": "^2.1.10"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.18.0 || ^20.9.0 || >=22.0.0",
|
||||||
|
"pnpm": ">=9"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"allowedDeprecatedVersions": {
|
||||||
|
"are-we-there-yet": "*",
|
||||||
|
"sourcemap-codec": "*",
|
||||||
|
"domexception": "*",
|
||||||
|
"w3c-hr-time": "*",
|
||||||
|
"inflight": "*",
|
||||||
|
"npmlog": "*",
|
||||||
|
"rimraf": "*",
|
||||||
|
"stable": "*",
|
||||||
|
"gauge": "*",
|
||||||
|
"abab": "*",
|
||||||
|
"glob": "*"
|
||||||
|
},
|
||||||
|
"peerDependencyRules": {
|
||||||
|
"allowedVersions": {
|
||||||
|
"eslint": "9"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8153
pnpm-lock.yaml
generated
Normal file
12
postcss.config.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import('postcss-load-config').Config} */
|
||||||
|
export default {
|
||||||
|
plugins: {
|
||||||
|
"postcss-import": {},
|
||||||
|
"tailwindcss/nesting": {},
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
...(process.env.NODE_ENV === "production" ? { cssnano: {} } : {})
|
||||||
|
}
|
||||||
|
};
|
||||||
BIN
public/favicon.ico
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
1
public/logo.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path fill="#386BF3" d="M410.558.109c0 210.974-300.876 361.752-300.876 633.548 0 174.943 134.704 316.787 300.876 316.787s300.877-141.817 300.877-316.787C711.408 361.752 410.558 210.974 410.558.109"/><path fill="#C3D2FB" d="M613.469 73.665c0 211.055-300.877 361.914-300.877 633.547C312.592 882.156 447.296 1024 613.47 1024s300.876-141.817 300.876-316.788C914.29 435.58 613.469 284.72 613.469 73.665"/><path fill="#303F5B" d="M312.592 707.212c0-183.713 137.636-312.171 226.723-441.39 81.702 106.112 172.12 218.74 172.12 367.726A309.755 309.755 0 0 1 420.36 950.064a323.1 323.1 0 0 1-107.769-242.852z"/></svg>
|
||||||
|
After Width: | Height: | Size: 706 B |
26
public/platform-config.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"Version": "5.9.0",
|
||||||
|
"Title": "my语聊管理后台",
|
||||||
|
"FixedHeader": true,
|
||||||
|
"HiddenSideBar": false,
|
||||||
|
"MultiTagsCache": false,
|
||||||
|
"KeepAlive": true,
|
||||||
|
"Layout": "vertical",
|
||||||
|
"Theme": "light",
|
||||||
|
"DarkMode": false,
|
||||||
|
"OverallStyle": "light",
|
||||||
|
"Grey": false,
|
||||||
|
"Weak": false,
|
||||||
|
"HideTabs": false,
|
||||||
|
"HideFooter": false,
|
||||||
|
"Stretch": false,
|
||||||
|
"SidebarStatus": true,
|
||||||
|
"EpThemeColor": "#409EFF",
|
||||||
|
"ShowLogo": true,
|
||||||
|
"ShowModel": "smart",
|
||||||
|
"MenuArrowIconNoTransition": false,
|
||||||
|
"CachingAsyncRoutes": true,
|
||||||
|
"TooltipEffect": "light",
|
||||||
|
"ResponsiveStorageNameSpace": "responsive-",
|
||||||
|
"MenuSearchHistory": 6
|
||||||
|
}
|
||||||
26
src/App.vue
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<el-config-provider :locale="currentLocale">
|
||||||
|
<router-view />
|
||||||
|
<ReDialog />
|
||||||
|
</el-config-provider>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent } from "vue";
|
||||||
|
import { ElConfigProvider } from "element-plus";
|
||||||
|
import { ReDialog } from "@/components/ReDialog";
|
||||||
|
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "app",
|
||||||
|
components: {
|
||||||
|
[ElConfigProvider.name]: ElConfigProvider,
|
||||||
|
ReDialog
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
currentLocale() {
|
||||||
|
return zhCn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
46
src/api/modules/Financial.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
msg: string;
|
||||||
|
};
|
||||||
|
// 兑换
|
||||||
|
export const queryExchangeList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Statistical/get_exchange_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 充值
|
||||||
|
export const queryRechargeList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Statistical/get_recharge_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 提现
|
||||||
|
export const queryWithdrawalList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Withdrawal/get_withdraw_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 后台充值列表
|
||||||
|
|
||||||
|
export const queryBackRechargelList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Statistical/admin_recharge_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const withdrawalApplyFor = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Withdrawal/withdraw_send",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
}
|
||||||
60
src/api/modules/Inform.ts
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
msg: string;
|
||||||
|
};
|
||||||
|
export const queryClassifyList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Inform/report_type_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Inform/report_type_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Inform/report_type_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const removeClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Inform/report_type_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const queryFeedBackList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Inform/suggest_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryFeedBackInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Inform/suggest_detail",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const handleFeedBack = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Inform/suggest_deal", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const queryReportList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Inform/report_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const handleReport = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Inform/report_deal", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
37
src/api/modules/Version.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
msg: string;
|
||||||
|
};
|
||||||
|
// 版本
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Version/version_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addVersionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Version/version_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 版本编辑
|
||||||
|
export const editVersionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Version/version_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteVersionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Version/version_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const updateStatus = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Version/version_status", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
128
src/api/modules/activities.ts
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/daily_tasks_box_gift_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryGiftList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/blind_box_gifts",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryAdornmentList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/decorate_list");
|
||||||
|
};
|
||||||
|
export const getActivitiesBoxInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/daily_tasks_box_config",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 规则配置
|
||||||
|
export const setConfig = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/daily_tasks_box_config_set", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 添加礼盒
|
||||||
|
export const addActivitiesBox = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/gift_bag_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editActivitiesBox = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/gift_bag_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deletectivitiesBox = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/gift_bag_list_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 首充列表
|
||||||
|
export const queryFirstCharge = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/first_charge_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryChargeRecord = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/first_charge_send_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addChargeTypeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/add_first_charge_type", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editChargeTypeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/update_first_charge", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deteleChargeTypeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/del_first_charge", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 天降好礼
|
||||||
|
export const queryGoodGift = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/day_drop_send_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getGoodGiftInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/day_drop_gift",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const setGoodGiftConfig = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/day_drop_gift_site", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 礼包列表 giftPack
|
||||||
|
export const queryGiftPack = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Activities/gift_bag_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addGiftPackData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/gift_bag_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editGiftPackData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/gift_bag_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deteleGiftPackData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Activities/gift_bag_list_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
49
src/api/modules/admin.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
msg: string;
|
||||||
|
};
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Admin/index",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryLogList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Adminlog/index",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/admin/add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Admin/edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Admin/del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const getDataInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Admin/detail",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getLogInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Adminlog/detail",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
66
src/api/modules/adolescent.ts
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
export const queryClassifyList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Underage/types_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Underage/types_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 分类编辑
|
||||||
|
export const editClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Underage/types_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 分类状态修改
|
||||||
|
export const updateClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Underage/types_change_status", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const deleteClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Underage/types_delete", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 青少年内容
|
||||||
|
export const queryContentList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Underage/content_List",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getContentInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Underage/content_detail",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addContentData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Underage/content_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteContentData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Underage/content_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editContentData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Underage/content_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
37
src/api/modules/advertisement.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 广告
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Banner/banner_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryPositionList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Banner/banner_position_lists"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addBannerData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Banner/add_banner", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 广告编辑
|
||||||
|
export const editBannerData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Banner/banner_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteBannerData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Banner/banner_delete", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
26
src/api/modules/backpack.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 背包列表
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>("get", "/adminapi/User/get_backpack_list", {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 机器人
|
||||||
|
export const queryRobotList = params => {
|
||||||
|
return http.request<Result>("get", "/adminapi/User/get_robot_list", {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 删除机器人数据
|
||||||
|
export const deleteRobotData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/delete_robot", { data });
|
||||||
|
};
|
||||||
|
// 自动生成
|
||||||
|
export const creaRobotData = () => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/get_robot_detail");
|
||||||
|
};
|
||||||
98
src/api/modules/blindBox.ts
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
msg: string;
|
||||||
|
};
|
||||||
|
export const queryGiftList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/blind_box_gifts"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryOpenRecordList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/open_record",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryBoxTypeList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/blind_box_type", { params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryBlindBoxList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/blind_box_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
//
|
||||||
|
export const resetBlindBoxRule = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/BlindBox/reset_set",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getBlindBoxRule = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/rule_detail",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const settingBlindBoxRule = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/BlindBox/set_rule",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addBlindBoxData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/BlindBox/blind_box_add",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const editBlindBoxData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/BlindBox/blind_box_edit",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
//
|
||||||
|
export const removeBlindBoxData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/BlindBox/blind_box_del",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 巡乐会设置
|
||||||
|
export const getXunLeRule = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/xunlehui_rule_detail",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const queryGiftByTypeList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/blind_box_gifts", { params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const settingXunLeRule = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/BlindBox/xunlehui_set_rule",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
94
src/api/modules/decorate.ts
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 道具分类
|
||||||
|
export const queryClassifyList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Decorate/type_array"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 道具列表
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Decorate/decorate_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addDataProp = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/add_decorate",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const editDataProp = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/edit_decorate",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getDataInfo = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/decorate_info",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const deleteDataProp = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/delete_decorate",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 用户装扮列表
|
||||||
|
export const queryDecorateList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Decorate/user_decorate_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 价格列表设置
|
||||||
|
export const queryPriceList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Decorate/price_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addPriceData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/add_price",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const editPriceData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/edit_price",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const deletePriceData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/delete_price",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 赠送
|
||||||
|
export const giveDecorate = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Decorate/give_decorate",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
47
src/api/modules/dynamics.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 话题列表
|
||||||
|
export const queryTopicList = params => {
|
||||||
|
return http.request<Result>("get", "/adminapi/UserZone/topic_lists", {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 添加/编辑话题
|
||||||
|
export const updateTopicData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/UserZone/add_topic", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除话题
|
||||||
|
export const deleteTopicData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/UserZone/del_topic", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 动态列表
|
||||||
|
export const queryDynamicsList = params => {
|
||||||
|
return http.request<Result>("get", "/adminapi/UserZone/zone_lists", {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 动态详情
|
||||||
|
export const getDynamicsInfo = params => {
|
||||||
|
return http.request<Result>("get", "/adminapi/UserZone/zone_detail", {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 删除动态
|
||||||
|
export const deleteDynamics = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/UserZone/del_zone", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const updateSataus = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/UserZone/zone_top_or_show", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
74
src/api/modules/gift.ts
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 礼物分类列表
|
||||||
|
export const queryClassifyList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/GiftLabel/label_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 礼物分类新增
|
||||||
|
export const addClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/GiftLabel/add_label", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 礼物分类新增
|
||||||
|
export const editClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/GiftLabel/edit_label", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除礼物分类
|
||||||
|
export const removeClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/GiftLabel/del_label", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 礼物列表
|
||||||
|
export const queryGiftList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Gift/gift_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 礼物新增
|
||||||
|
export const addGiftData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Gift/add_gift", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 礼物新增
|
||||||
|
export const editGiftData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Gift/edit_gift", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除礼物
|
||||||
|
export const removeGiftData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Gift/del_gift", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 礼物详情
|
||||||
|
export const getGiftInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Gift/gift_info",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
//
|
||||||
|
export const getGiftTypeOrLabel = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Gift/gift_type_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
13
src/api/modules/home.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
export const queryHomeData = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Index/index",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
20
src/api/modules/invite.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
export const queryInviteList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Invited/invitedList",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const queryIncomeListList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Invited/invitedIncomeList",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
66
src/api/modules/level.ts
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 财富等级列表
|
||||||
|
export const queryWealthList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Level/wealth_level_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 新增财富等级
|
||||||
|
export const addWealthData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Level/wealth_level_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//编辑
|
||||||
|
export const editWealthData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Level/wealth_level_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export const deleteWealthData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Level/wealth_level_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 魅力等级列表
|
||||||
|
export const queryCharmList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Level/charm_level_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 新增魅力等级
|
||||||
|
export const addCharmData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Level/charm_level_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//编辑
|
||||||
|
export const editCharmData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Level/charm_level_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export const deleteCharmData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Level/charm_level_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// adminapi/Level/wealth_level_rights_list
|
||||||
|
export const queryCharmPropList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Level/wealth_level_rights_list"
|
||||||
|
);
|
||||||
|
};
|
||||||
47
src/api/modules/message.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/SystemMessage/message_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addMessageData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/SystemMessage/edit_message", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editMessageData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/SystemMessage/edit_message", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteMessageData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/SystemMessage/del_message", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const getInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/SystemMessage/get_message_detail",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getUserList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/User/get_user_list"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getRoomList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/recommend_room_list"
|
||||||
|
);
|
||||||
|
}
|
||||||
93
src/api/modules/newuserList.ts
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 会员列表
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/User/user_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 查看会员详情
|
||||||
|
export const getUserInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/User/userInfo",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 修改会员详情
|
||||||
|
export const editUserInfo = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/user/editUser", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 会员收支日志
|
||||||
|
export const userLogData = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/user/money_log_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 获取会员相册列表
|
||||||
|
export const userPhotoAlbum = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/User/get_album_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除会员
|
||||||
|
export const removeUserData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/delUser", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 封禁会员
|
||||||
|
export const banUserData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/banUser", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 设置官方账号
|
||||||
|
export const officialUserData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/setSysTester", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 修改密码
|
||||||
|
export const changePassWordByUser = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/changePwd", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 设置资金
|
||||||
|
export const setMoneyByUser = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/setMoney", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const queryBanUserList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/User/get_forbidden_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const banUserByIpData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/add_forbidden", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const unbanUserByIp = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/User/del_forbidden", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
42
src/api/modules/newuserTag.ts
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 标签
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>("get", "/adminapi/UserTag/tag_lists", {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 添加标签
|
||||||
|
export const addTagData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/UserTag/add_tag",
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 修改标签
|
||||||
|
export const updateTagData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/UserTag/edit_tag",
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 删除标签
|
||||||
|
export const deleteTagData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/UserTag/del_tag",
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
54
src/api/modules/permission.ts
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 权限列表增删改查
|
||||||
|
export const queryList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Rule/index"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const createPermission = (data) => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Rule/add", { data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const updatePermission = (data) => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Rule/edit", { data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const delPermissionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Rule/del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 角色列表 增删改查
|
||||||
|
export const queryRoleList = () => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Role/index"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const createRole = (data) => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Role/add", { data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const updateRole = (data) => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Role/edit", { data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const delRoleData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Role/del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
282
src/api/modules/room.ts
Normal file
@@ -0,0 +1,282 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 分类列表
|
||||||
|
export const queryClassifyList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/type_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 分类新增
|
||||||
|
export const addClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/add_type", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 分类编辑
|
||||||
|
export const editClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/edit_type", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 分类删除
|
||||||
|
export const removeClassifyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/del_type", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 关系Relation
|
||||||
|
export const queryRelationList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/relation_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 关系新增
|
||||||
|
export const addRelationData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/add_relation", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//关系编辑
|
||||||
|
export const editRelationData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/edit_relation", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 关系删除
|
||||||
|
export const removeRelationData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/del_relation", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 标签
|
||||||
|
// 标签列表
|
||||||
|
export const queryRoomTagList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/label_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 标签新增
|
||||||
|
export const addRoomTagData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/add_label", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 标签编辑
|
||||||
|
export const editRoomTagData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/edit_label", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 标签删除
|
||||||
|
export const removeRoomTagData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/del_label", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 房间列表
|
||||||
|
|
||||||
|
export const queryList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 删除房间
|
||||||
|
export const deleteRoomData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/del_room", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 获取房间信息
|
||||||
|
export const getRoomDetail = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_info",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 获取房间流水
|
||||||
|
export const getRoomWaterFlow = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_flow",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 获取用户进入记录
|
||||||
|
export const getRoomEnterByUser = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_user_log",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const updateRoomData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/edit_room", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 房间背景列表
|
||||||
|
export const queryBackGroundList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_background_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 新增、编辑背景
|
||||||
|
export const updateBackGround = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/room_background_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 删除
|
||||||
|
export const deleteBackGround = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/room_background_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 房间审核列表
|
||||||
|
export const queryRoomExamineList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_audit_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const examineRoomData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/room_audit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 房间补贴规则列表
|
||||||
|
export const queryRoomRulesList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_subsidy_config_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addRoomRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/room_subsidy_config_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const editRoomRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/edit_room_config_subsidy", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const updateRoomRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/room_config_subsidy_status", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const deleteRoomRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/del_room_config_subsidy", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 房间补贴发放
|
||||||
|
export const querySubsidyList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_subsidy_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 补贴发放
|
||||||
|
export const grantSubsidyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/subsidy_give", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 批量发放
|
||||||
|
export const grantSubsidyBybatch = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/subsidy_give_batch", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// cp电影房列表
|
||||||
|
export const queryMovieRoom = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/cp_movie_room",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 封禁cp电影房
|
||||||
|
export const banMovieRoom = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/Room/cp_movie_room_forbid",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 房间操作列表
|
||||||
|
export const queryRoomLogList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_log_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 头条列表
|
||||||
|
export const queryHeadlinesList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Room/room_headline_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const deleteHeadlines = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/room_headline_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const hideHeadlines = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/room_headline_hide", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 获取声网token
|
||||||
|
export const getRoomToken = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Room/get_token", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 盲盒转盘统计 adminapi/BlindBox/blind_box_turntable_lists
|
||||||
|
export const queryTurntableList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/blind_box_turntable_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 盲盒转盘开奖记录
|
||||||
|
export const queryTurntableRecord = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/blind_box_turntable_open_record",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 巡乐会锁定记录
|
||||||
|
export const queryLockRecord = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/BlindBox/xlh_lock_record",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
48
src/api/modules/statistics.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
msg: string;
|
||||||
|
};
|
||||||
|
// 礼物记录列表
|
||||||
|
export const queryGiftGiveList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/GiveGift/give_gift_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 充值统计排行
|
||||||
|
export const queryRechargeRankList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Statistical/get_recharge_ranking",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 送礼、收礼排行
|
||||||
|
export const queryGiftRankList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Statistical/get_gift_ranking",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 消费
|
||||||
|
export const queryConsumerRankList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Statistical/get_consumption_ranking",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 房间流水
|
||||||
|
export const queryRoomFlowRankList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Statistical/get_room_flow_statistics",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
171
src/api/modules/system.ts
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
export const queryRuleList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/CanRecharge/recharge_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addRuleData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/CanRecharge/recharge_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editRuleData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/CanRecharge/recharge_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteRuleData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/CanRecharge/recharge_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const upadteRuleData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/CanRecharge/recharge_status", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 以上充值规则设置
|
||||||
|
export const queryPageist = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Page/page_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addPageData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Page/page_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editPageData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Page/page_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deletePageData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Page/page_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 主题设置
|
||||||
|
export const getThemeList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Theme/theme_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addThemeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Theme/theme_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editThemeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Theme/theme_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteThemeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Theme/theme_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const useThemeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Theme/theme_apply", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 私密设置
|
||||||
|
export const getConfigTypeList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/SysSet/type_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const getConfigSetInfo = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/SysSet/config_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const SetConfigData = data => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"post",
|
||||||
|
"/adminapi/SysSet/config_set",
|
||||||
|
{ data }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 帮助中心
|
||||||
|
|
||||||
|
export const getHelpTypeList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Help/help_type_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addHelpTypeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Help/help_type_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editHelpTypeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Help/help_type_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteHelpTypeData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Help/help_type_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getProblemList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Help/help_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addProblemData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Help/help_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const editProblemData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Help/help_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const deleteProblemData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Help/help_del", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const queryTaskList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Tasks/task_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const editTaskData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Tasks/task_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const upadteTaskData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Tasks/task_open", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
108
src/api/modules/union.ts
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: string;
|
||||||
|
data: any;
|
||||||
|
};
|
||||||
|
// 工会列表
|
||||||
|
export const queryUnionList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Guild/guild_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 工会新增
|
||||||
|
export const addUnionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/guild_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 工会新增
|
||||||
|
export const editUnionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/guild_edit", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 解散工会
|
||||||
|
export const dissolveUnionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/guild_dissolve", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 合并工会
|
||||||
|
export const guildUnionData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/merge_guild", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 查看工会成员列表
|
||||||
|
export const queryUnionMemberList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Guild/guild_member_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 查看工会房间列表
|
||||||
|
export const queryUnionRoomList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Guild/guild_room_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const kickUnionMember = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/kick_guild_member", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 工会补贴规则列表
|
||||||
|
export const queryUnionRulesList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Guild/guild_subsidy_config_lists",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export const addUnionRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/guild_subsidy_config_add", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const editUnionRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/edit_guild_config_subsidy", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const updateUnionRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/guild_config_subsidy_status", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const deleteUnionRules = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/del_guild_config_subsidy", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 补贴列表
|
||||||
|
export const querySubsidyList = params => {
|
||||||
|
return http.request<Result>(
|
||||||
|
"get",
|
||||||
|
"/adminapi/Guild/guild_subsidy_list",
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// 补贴发放
|
||||||
|
export const grantSubsidyData = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/subsidy_give", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 批量发放
|
||||||
|
export const grantSubsidyBybatch = data => {
|
||||||
|
return http.request<Result>("post", "/adminapi/Guild/subsidy_give_batch", {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
10
src/api/routes.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
success: boolean;
|
||||||
|
data: Array<any>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getAsyncRoutes = () => {
|
||||||
|
return http.request<Result>("get", "/adminapi/Rule/menus");
|
||||||
|
};
|
||||||
51
src/api/user.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
export type UserResult = {
|
||||||
|
success: boolean;
|
||||||
|
data: {
|
||||||
|
/** 头像 */
|
||||||
|
avatar: string;
|
||||||
|
/** 用户名 */
|
||||||
|
username: string;
|
||||||
|
/** 昵称 */
|
||||||
|
nickname: string;
|
||||||
|
/** 当前登录用户的角色 */
|
||||||
|
roles: Array<string>;
|
||||||
|
/** 按钮级别权限 */
|
||||||
|
permissions: Array<string>;
|
||||||
|
/** `token` */
|
||||||
|
accessToken: string;
|
||||||
|
/** 用于调用刷新`accessToken`的接口时所需的`token` */
|
||||||
|
refreshToken: string;
|
||||||
|
/** `accessToken`的过期时间(格式'xxxx/xx/xx xx:xx:xx') */
|
||||||
|
expires: Date;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type RefreshTokenResult = {
|
||||||
|
success: boolean;
|
||||||
|
data: {
|
||||||
|
/** `token` */
|
||||||
|
accessToken: string;
|
||||||
|
/** 用于调用刷新`accessToken`的接口时所需的`token` */
|
||||||
|
refreshToken: string;
|
||||||
|
/** `accessToken`的过期时间(格式'xxxx/xx/xx xx:xx:xx') */
|
||||||
|
expires: Date;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 登录 */
|
||||||
|
export const getLogin = (data?: object) => {
|
||||||
|
return http.request<UserResult>("post", "/adminapi/Index/login", { data });
|
||||||
|
};
|
||||||
|
/** 退出 */
|
||||||
|
export const getLoginOut = (data?: object) => {
|
||||||
|
return http.request<UserResult>("post", "/adminapi/Index/logout", { data });
|
||||||
|
};
|
||||||
|
export const getMenu = (data?: object) => {
|
||||||
|
return http.request<UserResult>("post", "/adminapi/Rule/menus", { data });
|
||||||
|
};
|
||||||
|
/** 刷新`token` */
|
||||||
|
export const refreshTokenApi = (data?: object) => {
|
||||||
|
return http.request<RefreshTokenResult>("post", "/refresh-token", { data });
|
||||||
|
};
|
||||||
1
src/assets/china.json
Normal file
27
src/assets/iconfont/iconfont.css
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: "iconfont"; /* Project id 2208059 */
|
||||||
|
src:
|
||||||
|
url("iconfont.woff2?t=1671895108120") format("woff2"),
|
||||||
|
url("iconfont.woff?t=1671895108120") format("woff"),
|
||||||
|
url("iconfont.ttf?t=1671895108120") format("truetype");
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-family: "iconfont" !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-iconfont-tabs:before {
|
||||||
|
content: "\e63e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-iconfont-logo:before {
|
||||||
|
content: "\e620";
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-iconfont-new:before {
|
||||||
|
content: "\e615";
|
||||||
|
}
|
||||||
69
src/assets/iconfont/iconfont.js
Normal file
30
src/assets/iconfont/iconfont.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"id": "2208059",
|
||||||
|
"name": "pure-admin",
|
||||||
|
"font_family": "iconfont",
|
||||||
|
"css_prefix_text": "pure-iconfont-",
|
||||||
|
"description": "pure-admin-iconfont",
|
||||||
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "20594647",
|
||||||
|
"name": "Tabs",
|
||||||
|
"font_class": "tabs",
|
||||||
|
"unicode": "e63e",
|
||||||
|
"unicode_decimal": 58942
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "22129506",
|
||||||
|
"name": "PureLogo",
|
||||||
|
"font_class": "logo",
|
||||||
|
"unicode": "e620",
|
||||||
|
"unicode_decimal": 58912
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "7795615",
|
||||||
|
"name": "New",
|
||||||
|
"font_class": "new",
|
||||||
|
"unicode": "e615",
|
||||||
|
"unicode_decimal": 58901
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
src/assets/iconfont/iconfont.ttf
Normal file
BIN
src/assets/iconfont/iconfont.woff
Normal file
BIN
src/assets/iconfont/iconfont.woff2
Normal file
1
src/assets/login/avatar.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path fill="#386BF3" d="M410.558.109c0 210.974-300.876 361.752-300.876 633.548 0 174.943 134.704 316.787 300.876 316.787s300.877-141.817 300.877-316.787C711.408 361.752 410.558 210.974 410.558.109"/><path fill="#C3D2FB" d="M613.469 73.665c0 211.055-300.877 361.914-300.877 633.547C312.592 882.156 447.296 1024 613.47 1024s300.876-141.817 300.876-316.788C914.29 435.58 613.469 284.72 613.469 73.665"/><path fill="#303F5B" d="M312.592 707.212c0-183.713 137.636-312.171 226.723-441.39 81.702 106.112 172.12 218.74 172.12 367.726A309.755 309.755 0 0 1 420.36 950.064a323.1 323.1 0 0 1-107.769-242.852z"/></svg>
|
||||||
|
After Width: | Height: | Size: 706 B |
BIN
src/assets/login/bg.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
1
src/assets/login/illustration.svg
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
1
src/assets/status/403.svg
Normal file
|
After Width: | Height: | Size: 10 KiB |
1
src/assets/status/404.svg
Normal file
|
After Width: | Height: | Size: 11 KiB |
1
src/assets/status/500.svg
Normal file
|
After Width: | Height: | Size: 13 KiB |
1
src/assets/svg/back_top.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M2.88 18.054a35.9 35.9 0 0 1 8.531-16.32.8.8 0 0 1 1.178 0q.25.27.413.455a35.9 35.9 0 0 1 8.118 15.865c-2.141.451-4.34.747-6.584.874l-2.089 4.178a.5.5 0 0 1-.894 0l-2.089-4.178a44 44 0 0 1-6.584-.874m6.698-1.123 1.157.066L12 19.527l1.265-2.53 1.157-.066a42 42 0 0 0 4.227-.454A33.9 33.9 0 0 0 12 4.09a33.9 33.9 0 0 0-6.649 12.387q2.093.334 4.227.454M12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>
|
||||||
|
After Width: | Height: | Size: 533 B |
1
src/assets/svg/dark.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.38 2.019a7.5 7.5 0 1 0 10.6 10.6C21.662 17.854 17.316 22 12.001 22 6.477 22 2 17.523 2 12c0-5.315 4.146-9.661 9.38-9.981"/></svg>
|
||||||
|
After Width: | Height: | Size: 262 B |
1
src/assets/svg/day.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12M11 1h2v3h-2zm0 19h2v3h-2zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414zm2.121-14.85 1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414zM23 11v2h-3v-2zM4 11v2H1v-2z"/></svg>
|
||||||
|
After Width: | Height: | Size: 435 B |
1
src/assets/svg/enter_outlined.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" aria-hidden="true" class="iconify iconify--ant-design" viewBox="0 0 1024 1024"><path fill="currentColor" d="M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 0 0 0 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8"/></svg>
|
||||||
|
After Width: | Height: | Size: 351 B |
1
src/assets/svg/exit_screen.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3.5 4H1V3h2V1h1v2.5zM13 3V1h-1v2.5l.5.5H15V3zm-1 9.5V15h1v-2h2v-1h-2.5zM1 12v1h2v2h1v-2.5l-.5-.5zm11-1.5-.5.5h-7l-.5-.5v-5l.5-.5h7l.5.5zM10 7H6v2h4z"/></svg>
|
||||||
|
After Width: | Height: | Size: 327 B |
1
src/assets/svg/full_screen.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3 12h10V4H3zm2-6h6v4H5zM2 6H1V2.5l.5-.5H5v1H2zm13-3.5V6h-1V3h-3V2h3.5zM14 10h1v3.5l-.5.5H11v-1h3zM2 13h3v1H1.5l-.5-.5V10h1z"/></svg>
|
||||||
|
After Width: | Height: | Size: 302 B |
1
src/assets/svg/keyboard_esc.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" aria-hidden="true" class="iconify iconify--mdi" viewBox="0 0 24 24"><path fill="currentColor" d="M1 7h6v2H3v2h4v2H3v2h4v2H1zm10 0h4v2h-4v2h2a2 2 0 0 1 2 2v2c0 1.11-.89 2-2 2H9v-2h4v-2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2m8 0h2a2 2 0 0 1 2 2v1h-2V9h-2v6h2v-1h2v1c0 1.11-.89 2-2 2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2"/></svg>
|
||||||
|
After Width: | Height: | Size: 379 B |
1
src/assets/svg/system.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" class="icon" viewBox="0 0 1024 1024"><path d="M554 849.574c0 23.365-18.635 42.307-42 42.307s-42-18.941-42-42.307V662.719c0-23.365 18.635-42.307 42-42.307v-7.051c23.365 0 42 25.993 42 49.358z"/><path d="M893 888.5c0 17.397-14.103 31.5-31.5 31.5h-700c-17.397 0-31.5-14.103-31.5-31.5s14.103-31.5 31.5-31.5h700c17.397 0 31.5 14.103 31.5 31.5m33-714.074C926 135.484 894.686 105 855.744 105H168.256C129.314 105 98 135.484 98 174.426V533h828zM98 630.988C98 669.931 129.314 702 168.256 702h687.488C894.686 702 926 669.931 926 630.988V596H98z"/></svg>
|
||||||
|
After Width: | Height: | Size: 605 B |
1
src/assets/table-bar/collapse.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M13.79 10.21a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42l-2.5-2.5a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21l-2.5 2.5a1 1 0 0 0 1.42 1.42l.79-.8v5.18l-.79-.8a1 1 0 0 0-1.42 1.42l2.5 2.5a1 1 0 0 0 .33.21.94.94 0 0 0 .76 0 1 1 0 0 0 .33-.21l2.5-2.5a1 1 0 0 0-1.42-1.42l-.79.8V9.41ZM7 4h10a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m10 16H7a1 1 0 0 0 0 2h10a1 1 0 0 0 0-2"/></svg>
|
||||||
|
After Width: | Height: | Size: 439 B |
1
src/assets/table-bar/drag.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="32" height="32" fill="currentColor" aria-hidden="true" data-icon="holder" viewBox="64 64 896 896"><path d="M300 276.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97m0 284a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 228a56 56 0 1 0 112 0 56 56 0 0 0-112 0m0 284a56 56 0 1 0 112 0 56 56 0 0 0-112 0M300 844.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 796a56 56 0 1 0 112 0 56 56 0 0 0-112 0"/></svg>
|
||||||
|
After Width: | Height: | Size: 392 B |
1
src/assets/table-bar/expand.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M22 4V2H2v2h9v14.17l-5.5-5.5-1.42 1.41L12 22l7.92-7.92-1.42-1.41-5.5 5.5V4z"/></svg>
|
||||||
|
After Width: | Height: | Size: 161 B |
1
src/assets/table-bar/refresh.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="32" height="32" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>
|
||||||
|
After Width: | Height: | Size: 235 B |
1
src/assets/table-bar/settings.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M3.34 17a10 10 0 0 1-.978-2.326 3 3 0 0 0 .002-5.347A10 10 0 0 1 4.865 4.99a3 3 0 0 0 4.631-2.674 10 10 0 0 1 5.007.002 3 3 0 0 0 4.632 2.672A10 10 0 0 1 20.66 7c.433.749.757 1.53.978 2.326a3 3 0 0 0-.002 5.347 10 10 0 0 1-2.501 4.337 3 3 0 0 0-4.631 2.674 10 10 0 0 1-5.007-.002 3 3 0 0 0-4.632-2.672A10 10 0 0 1 3.34 17m5.66.196a5 5 0 0 1 2.25 2.77q.75.071 1.499.001A5 5 0 0 1 15 17.197a5 5 0 0 1 3.525-.565q.435-.614.748-1.298A5 5 0 0 1 18 12c0-1.26.47-2.437 1.273-3.334a8 8 0 0 0-.75-1.298A5 5 0 0 1 15 6.804a5 5 0 0 1-2.25-2.77q-.75-.071-1.499-.001A5 5 0 0 1 9 6.803a5 5 0 0 1-3.525.565 8 8 0 0 0-.748 1.298A5 5 0 0 1 6 12a5 5 0 0 1-1.273 3.334 8 8 0 0 0 .75 1.298A5 5 0 0 1 9 17.196M12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>
|
||||||
|
After Width: | Height: | Size: 840 B |
BIN
src/assets/user.jpg
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
5
src/components/ReAuth/index.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import auth from "./src/auth";
|
||||||
|
|
||||||
|
const Auth = auth;
|
||||||
|
|
||||||
|
export { Auth };
|
||||||
20
src/components/ReAuth/src/auth.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { defineComponent, Fragment } from "vue";
|
||||||
|
import { hasAuth } from "@/router/utils";
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "Auth",
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: undefined,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setup(props, { slots }) {
|
||||||
|
return () => {
|
||||||
|
if (!slots) return null;
|
||||||
|
return hasAuth(props.value) ? (
|
||||||
|
<Fragment>{slots.default?.()}</Fragment>
|
||||||
|
) : null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
29
src/components/ReCol/index.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import { ElCol } from "element-plus";
|
||||||
|
import { h, defineComponent } from "vue";
|
||||||
|
|
||||||
|
// 封装element-plus的el-col组件
|
||||||
|
export default defineComponent({
|
||||||
|
name: "ReCol",
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Number,
|
||||||
|
default: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
render() {
|
||||||
|
const attrs = this.$attrs;
|
||||||
|
const val = this.value;
|
||||||
|
return h(
|
||||||
|
ElCol,
|
||||||
|
{
|
||||||
|
xs: val,
|
||||||
|
sm: val,
|
||||||
|
md: val,
|
||||||
|
lg: val,
|
||||||
|
xl: val,
|
||||||
|
...attrs
|
||||||
|
},
|
||||||
|
{ default: () => this.$slots.default() }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
2
src/components/ReCountTo/README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
normal 普通数字动画组件
|
||||||
|
rebound 回弹式数字动画组件
|
||||||
11
src/components/ReCountTo/index.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import reNormalCountTo from "./src/normal";
|
||||||
|
import reboundCountTo from "./src/rebound";
|
||||||
|
import { withInstall } from "@pureadmin/utils";
|
||||||
|
|
||||||
|
/** 普通数字动画组件 */
|
||||||
|
const ReNormalCountTo = withInstall(reNormalCountTo);
|
||||||
|
|
||||||
|
/** 回弹式数字动画组件 */
|
||||||
|
const ReboundCountTo = withInstall(reboundCountTo);
|
||||||
|
|
||||||
|
export { ReNormalCountTo, ReboundCountTo };
|
||||||