406 changed files with 25414 additions and 85 deletions
@ -0,0 +1,4 @@
|
||||
NODE_ENV = 'development' |
||||
|
||||
# 请求域名 |
||||
VITE_APP_BASE_URL='http://127.0.0.1:8080/' |
||||
@ -0,0 +1,43 @@
|
||||
/* eslint-env node */ |
||||
require('@rushstack/eslint-patch/modern-module-resolution') |
||||
|
||||
module.exports = { |
||||
root: true, |
||||
ignorePatterns: ['/auto-imports.d.ts', '/components.d.ts'], |
||||
extends: [ |
||||
'plugin:vue/vue3-essential', |
||||
'eslint:recommended', |
||||
'@vue/eslint-config-typescript/recommended', |
||||
'@vue/eslint-config-prettier', |
||||
'./.eslintrc-auto-import.json' |
||||
], |
||||
rules: { |
||||
'prettier/prettier': [ |
||||
'warn', |
||||
{ |
||||
semi: false, |
||||
singleQuote: true, |
||||
printWidth: 100, |
||||
proseWrap: 'preserve', |
||||
bracketSameLine: false, |
||||
endOfLine: 'lf', |
||||
tabWidth: 4, |
||||
useTabs: false, |
||||
trailingComma: 'none' |
||||
} |
||||
], |
||||
'vue/multi-word-component-names': 'off', |
||||
'@typescript-eslint/no-explicit-any': 'off', |
||||
'@typescript-eslint/ban-ts-comment': 'off', |
||||
'no-undef': 'off', |
||||
'vue/prefer-import-from-vue': 'off', |
||||
'no-prototype-builtins': 'off', |
||||
'prefer-spread': 'off', |
||||
'@typescript-eslint/no-non-null-assertion': 'off', |
||||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off', |
||||
'vue/no-mutating-props': 'off' |
||||
}, |
||||
globals: { |
||||
module: 'readonly' |
||||
} |
||||
} |
||||
@ -1,9 +1,35 @@
|
||||
# 编辑器 |
||||
.vscode |
||||
.idea |
||||
|
||||
.history |
||||
# Logs |
||||
logs |
||||
*.log |
||||
npm-debug.log* |
||||
yarn-debug.log* |
||||
yarn-error.log* |
||||
pnpm-debug.log* |
||||
lerna-debug.log* |
||||
|
||||
node_modules |
||||
.DS_Store |
||||
dist |
||||
dist-ssr |
||||
coverage |
||||
*.local |
||||
|
||||
# unplugin-auto-import |
||||
auto-imports.d.ts |
||||
components.d.ts |
||||
.eslintrc-auto-import.json |
||||
|
||||
/cypress/videos/ |
||||
/cypress/screenshots/ |
||||
|
||||
# Editor directories and files |
||||
.idea |
||||
*.suo |
||||
*.ntvs* |
||||
*.njsproj |
||||
*.sln |
||||
*.sw? |
||||
|
||||
*.mjs |
||||
# .env |
||||
.env.development |
||||
.env.production |
||||
|
||||
@ -1,13 +1,66 @@
|
||||
<!doctype html> |
||||
<html lang="en"> |
||||
<!DOCTYPE html> |
||||
<html lang="zh-CN"> |
||||
<head> |
||||
<meta charset="UTF-8" /> |
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||
<title>局长信箱 即接即办</title> |
||||
<style> |
||||
* { |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
.preload { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
height: 100vh; |
||||
width: 100vw; |
||||
} |
||||
|
||||
.circular { |
||||
height: 42px; |
||||
width: 42px; |
||||
animation: loading-rotate 2s linear infinite; |
||||
} |
||||
|
||||
.circular .path { |
||||
animation: loading-dash 1.5s ease-in-out infinite; |
||||
stroke-dasharray: 90, 150; |
||||
stroke-dashoffset: 0; |
||||
stroke-width: 2; |
||||
stroke: #4073fa; |
||||
stroke-linecap: round; |
||||
} |
||||
|
||||
@keyframes loading-rotate { |
||||
100% { |
||||
transform: rotate(1turn); |
||||
} |
||||
} |
||||
|
||||
@keyframes loading-dash { |
||||
|
||||
0% { |
||||
stroke-dasharray: 90, 150; |
||||
stroke-dashoffset: -40px; |
||||
} |
||||
|
||||
100% { |
||||
stroke-dasharray: 90, 150; |
||||
stroke-dashoffset: -120px; |
||||
} |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div id="app"></div> |
||||
<script type="module" src="/src/main.js"></script> |
||||
<div id="app"> |
||||
<div class="preload"> |
||||
<svg viewBox="25 25 50 50" class="circular"> |
||||
<circle cx="50" cy="50" r="20" fill="none" class="path"></circle> |
||||
</svg> |
||||
</div> |
||||
</div> |
||||
<script type="module" src="/src/main.ts"></script> |
||||
</body> |
||||
</html> |
||||
|
||||
@ -1,25 +1,61 @@
|
||||
{ |
||||
"name": "mailbox-vue", |
||||
"private": true, |
||||
"name": "vue-project", |
||||
"version": "0.0.0", |
||||
"type": "module", |
||||
"license": "MIT", |
||||
"scripts": { |
||||
"dev": "vite", |
||||
"build": "vite build", |
||||
"preview": "vite preview" |
||||
"preview": "vite preview --port 4173", |
||||
"build": "node ./scripts/build.mjs", |
||||
"type-check": "vue-tsc --noEmit", |
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" |
||||
}, |
||||
"dependencies": { |
||||
"element-plus": "^2.5.1", |
||||
"pinia": "^2.1.7", |
||||
"vue": "^3.3.11", |
||||
"vue-router": "^4.2.5" |
||||
"@element-plus/icons-vue": "^2.0.6", |
||||
"@highlightjs/vue-plugin": "^2.1.0", |
||||
"@wangeditor/editor": "^5.1.12", |
||||
"@wangeditor/editor-for-vue": "^5.1.12", |
||||
"axios": "^0.27.2", |
||||
"css-color-function": "^1.3.3", |
||||
"echarts": "^5.3.3", |
||||
"element-plus": "^2.2.9", |
||||
"highlight.js": "^11.6.0", |
||||
"nprogress": "^0.2.0", |
||||
"pinia": "^2.0.14", |
||||
"vue": "^3.2.37", |
||||
"vue-clipboard3": "^2.0.0", |
||||
"vue-echarts": "^6.2.3", |
||||
"vue-router": "^4.0.16", |
||||
"vue3-video-play": "^1.3.1-beta.6", |
||||
"vuedraggable": "^4.1.0" |
||||
}, |
||||
"devDependencies": { |
||||
"@vitejs/plugin-vue": "^4.5.2", |
||||
"sass": "^1.69.7", |
||||
"unplugin-auto-import": "^0.17.3", |
||||
"unplugin-vue-components": "^0.26.0", |
||||
"vite": "^5.0.8", |
||||
"vite-svg-loader": "^5.1.0" |
||||
"@rushstack/eslint-patch": "^1.1.0", |
||||
"@tailwindcss/line-clamp": "^0.4.2", |
||||
"@types/lodash-es": "^4.17.6", |
||||
"@types/node": "^16.11.41", |
||||
"@types/nprogress": "^0.2.0", |
||||
"@vitejs/plugin-vue": "^3.0.0", |
||||
"@vitejs/plugin-vue-jsx": "^2.0.0", |
||||
"@vue/eslint-config-prettier": "^7.0.0", |
||||
"@vue/eslint-config-typescript": "^11.0.0", |
||||
"@vue/tsconfig": "^0.1.3", |
||||
"autoprefixer": "^10.4.7", |
||||
"consola": "^2.15.3", |
||||
"eslint": "^8.5.0", |
||||
"eslint-plugin-vue": "^9.0.0", |
||||
"execa": "^6.1.0", |
||||
"fs-extra": "^10.1.0", |
||||
"postcss": "^8.4.14", |
||||
"prettier": "^2.5.1", |
||||
"sass": "^1.53.0", |
||||
"tailwindcss": "^3.0.24", |
||||
"typescript": "~4.7.4", |
||||
"unplugin-auto-import": "^0.9.2", |
||||
"unplugin-vue-components": "^0.19.9", |
||||
"vite": "^3.0.0", |
||||
"vite-plugin-style-import": "^2.0.0", |
||||
"vite-plugin-svg-icons": "^2.0.1", |
||||
"vite-plugin-vue-setup-extend": "^0.4.0", |
||||
"vue-tsc": "^0.38.1" |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,6 @@
|
||||
module.exports = { |
||||
plugins: { |
||||
tailwindcss: {}, |
||||
autoprefixer: {} |
||||
} |
||||
} |
||||
@ -0,0 +1,37 @@
|
||||
import { execaCommand } from 'execa' |
||||
import path from 'path' |
||||
import fsExtra from 'fs-extra' |
||||
const { existsSync, remove, copy } = fsExtra |
||||
const cwd = process.cwd() |
||||
//打包发布路径,谨慎改动
|
||||
const releaseRelativePath = '../public/admin' |
||||
const distPath = path.resolve(cwd, 'dist') |
||||
const releasePath = path.resolve(cwd, releaseRelativePath) |
||||
|
||||
async function build() { |
||||
await execaCommand('vite build', { stdio: 'inherit', encoding: 'utf-8', cwd }) |
||||
if (existsSync(releasePath)) { |
||||
await remove(releasePath) |
||||
} |
||||
console.log(`文件正在复制 ==> ${releaseRelativePath}`) |
||||
try { |
||||
await copyFile(distPath, releasePath) |
||||
} catch (error) { |
||||
console.log(`\n ${error}`) |
||||
} |
||||
console.log(`文件已复制 ==> ${releaseRelativePath}`) |
||||
} |
||||
|
||||
function copyFile(sourceDir, targetDir) { |
||||
return new Promise((resolve, reject) => { |
||||
copy(sourceDir, targetDir, (err) => { |
||||
if (err) { |
||||
reject(err) |
||||
} else { |
||||
resolve() |
||||
} |
||||
}) |
||||
}) |
||||
} |
||||
|
||||
build() |
||||
@ -1,3 +1,58 @@
|
||||
<script setup lang="ts"> |
||||
import { useDark, useWindowSize, useThrottleFn } from '@vueuse/core' |
||||
import zhCn from 'element-plus/lib/locale/lang/zh-cn' |
||||
import useAppStore from './stores/modules/app' |
||||
import useSettingStore from './stores/modules/setting' |
||||
import { ScreenEnum } from './enums/appEnums' |
||||
const appStore = useAppStore() |
||||
const settingStore = useSettingStore() |
||||
const elConfig = { |
||||
zIndex: 3000, |
||||
locale: zhCn |
||||
} |
||||
const isDark = useDark() |
||||
onMounted(async () => { |
||||
//设置主题色 |
||||
settingStore.setTheme(isDark.value) |
||||
// 获取配置 |
||||
const data: any = await appStore.getConfig() |
||||
// 设置网站logo |
||||
let favicon: HTMLLinkElement = document.querySelector('link[rel="icon"]')! |
||||
if (favicon) { |
||||
favicon.href = data.webFavicon |
||||
return |
||||
} |
||||
favicon = document.createElement('link') |
||||
favicon.rel = 'icon' |
||||
favicon.href = data.webFavicon |
||||
document.head.appendChild(favicon) |
||||
}) |
||||
|
||||
const { width } = useWindowSize() |
||||
watch( |
||||
width, |
||||
useThrottleFn((value) => { |
||||
if (value > ScreenEnum.SM) { |
||||
appStore.setMobile(false) |
||||
appStore.toggleCollapsed(false) |
||||
} else { |
||||
appStore.setMobile(true) |
||||
appStore.toggleCollapsed(true) |
||||
} |
||||
if (value < ScreenEnum.MD) { |
||||
appStore.toggleCollapsed(true) |
||||
} |
||||
}), |
||||
{ |
||||
immediate: true |
||||
} |
||||
) |
||||
</script> |
||||
|
||||
<template> |
||||
<router-view /> |
||||
<el-config-provider :locale="elConfig.locale" :z-index="elConfig.zIndex"> |
||||
<router-view /> |
||||
</el-config-provider> |
||||
</template> |
||||
|
||||
<style></style> |
||||
|
||||
@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 配置
|
||||
export function getConfig() { |
||||
return request.get({ url: '/index/config' }) |
||||
} |
||||
|
||||
// 工作台主页
|
||||
export function getWorkbench() { |
||||
return request.get({ url: '/index/console' }) |
||||
} |
||||
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function getRechargeConfig() { |
||||
return request.get({ url: '/marketing/recharge/detail' }) |
||||
} |
||||
|
||||
// 设置
|
||||
export function setRechargeConfig(params: any) { |
||||
return request.post({ url: '/marketing/recharge/save', params }) |
||||
} |
||||
@ -0,0 +1,16 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 用户列表
|
||||
export function getUserList(params: any) { |
||||
return request.get({ url: '/user/list', params }) |
||||
} |
||||
|
||||
// 用户详情
|
||||
export function getUserDetail(params: any) { |
||||
return request.get({ url: '/user/detail', params }) |
||||
} |
||||
|
||||
// 用户编辑
|
||||
export function userEdit(params: any) { |
||||
return request.post({ url: '/user/edit', params }) |
||||
} |
||||
@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function fileCateAdd(params: Record<string, any>) { |
||||
return request.post({ url: '/albums/cateAdd', params }) |
||||
} |
||||
|
||||
export function fileCateEdit(params: Record<string, any>) { |
||||
return request.post({ url: '/albums/cateRename', params }) |
||||
} |
||||
|
||||
// 文件分类删除
|
||||
export function fileCateDelete(params: Record<string, any>) { |
||||
return request.post({ url: '/albums/cateDel', params }) |
||||
} |
||||
|
||||
// 文件分类列表
|
||||
export function fileCateLists(params: Record<string, any>) { |
||||
return request.get({ url: '/albums/cateList', params }) |
||||
} |
||||
|
||||
// 文件列表
|
||||
export function fileList(params: Record<string, any>) { |
||||
return request.get({ url: '/albums/albumList', params }) |
||||
} |
||||
|
||||
// 文件删除
|
||||
export function fileDelete(params: Record<string, any>) { |
||||
return request.post({ url: '/albums/albumDel', params }) |
||||
} |
||||
|
||||
// 文件移动
|
||||
export function fileMove(params: Record<string, any>) { |
||||
return request.post({ url: '/albums/albumMove', params }) |
||||
} |
||||
|
||||
// 文件重命名
|
||||
export function fileRename(params: { id: number; name: string }) { |
||||
return request.post({ url: '/albums/albumRename', params }) |
||||
} |
||||
@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 余额明细
|
||||
export function accountLog(params?: any) { |
||||
return request.get({ url: '/finance/wallet/list', params }) |
||||
} |
||||
|
||||
// 充值记录
|
||||
export function rechargeLists(params?: any) { |
||||
return request.get({ url: '/finance/recharger/list', params }, { ignoreCancelToken: true }) |
||||
} |
||||
|
||||
//退款
|
||||
export function refund(params?: any) { |
||||
return request.post({ url: '/finance/recharger/refund', params }) |
||||
} |
||||
|
||||
//重新退款
|
||||
export function refundAgain(params?: any) { |
||||
return request.post({ url: '/finance/recharger/refundAgain', params }) |
||||
} |
||||
|
||||
//退款记录
|
||||
export function refundRecord(params?: any) { |
||||
return request.get({ url: '/finance/refund/list', params }) |
||||
} |
||||
|
||||
//退款日志
|
||||
export function refundLog(params?: any) { |
||||
return request.get({ url: '/finance/refund/log', params }) |
||||
} |
||||
@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 通知设置列表
|
||||
export function noticeLists(params: any) { |
||||
return request.get({ url: '/setting/notice/list', params }) |
||||
} |
||||
|
||||
// 通知设置详情
|
||||
export function noticeDetail(params: any) { |
||||
return request.get({ url: '/setting/notice/detail', params }) |
||||
} |
||||
|
||||
// 通知设置保存
|
||||
export function setNoticeConfig(params: any) { |
||||
return request.post({ url: '/setting/notice/save', params }) |
||||
} |
||||
|
||||
// 短信设置列表
|
||||
export function smsLists() { |
||||
return request.get({ url: '/setting/sms/list' }) |
||||
} |
||||
|
||||
// 短信设置详情
|
||||
export function smsDetail(params: any) { |
||||
return request.get({ url: '/setting/sms/detail', params }) |
||||
} |
||||
|
||||
// 短信设置保存
|
||||
export function setSmsConfig(params: any) { |
||||
return request.post({ url: '/setting/sms/save', params }) |
||||
} |
||||
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 部门列表
|
||||
export function deptLists(params?: any) { |
||||
return request.get({ url: '/system/dept/list', params }) |
||||
} |
||||
|
||||
// 添加部门
|
||||
export function deptAdd(params: any) { |
||||
return request.post({ url: '/system/dept/add', params }) |
||||
} |
||||
|
||||
// 编辑部门
|
||||
export function deptEdit(params: any) { |
||||
return request.post({ url: '/system/dept/edit', params }) |
||||
} |
||||
|
||||
// 删除部门
|
||||
export function deptDelete(params: any) { |
||||
return request.post({ url: '/system/dept/del', params }) |
||||
} |
||||
|
||||
// 部门详情
|
||||
export function deptDetail(params?: any) { |
||||
return request.get({ url: '/system/dept/detail', params }) |
||||
} |
||||
@ -0,0 +1,30 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 岗位列表
|
||||
export function postLists(params?: any) { |
||||
return request.get({ url: '/system/post/list', params }) |
||||
} |
||||
// 岗位列表
|
||||
export function postAll(params?: any) { |
||||
return request.get({ url: '/system/post/all', params }) |
||||
} |
||||
|
||||
// 添加岗位
|
||||
export function postAdd(params: any) { |
||||
return request.post({ url: '/system/post/add', params }) |
||||
} |
||||
|
||||
// 编辑岗位
|
||||
export function postEdit(params: any) { |
||||
return request.post({ url: '/system/post/edit', params }) |
||||
} |
||||
|
||||
// 删除岗位
|
||||
export function postDelete(params: any) { |
||||
return request.post({ url: '/system/post/del', params }) |
||||
} |
||||
|
||||
// 岗位详情
|
||||
export function postDetail(params: any) { |
||||
return request.get({ url: '/system/post/detail', params }) |
||||
} |
||||
@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 管理员列表
|
||||
export function adminLists(params: any) { |
||||
return request.get({ url: '/system/admin/list', params }) |
||||
} |
||||
|
||||
// 管理员添加
|
||||
export function adminAdd(params: any) { |
||||
return request.post({ url: '/system/admin/add', params }) |
||||
} |
||||
|
||||
// 管理员编辑
|
||||
export function adminDetail(params: any) { |
||||
return request.get({ url: '/system/admin/detail', params }) |
||||
} |
||||
|
||||
// 管理员编辑
|
||||
export function adminEdit(params: any) { |
||||
return request.post({ url: '/system/admin/edit', params }) |
||||
} |
||||
|
||||
// 管理员删除
|
||||
export function adminDelete(params: any) { |
||||
return request.post({ url: '/system/admin/del', params }) |
||||
} |
||||
|
||||
// 管理员删除
|
||||
export function adminStatus(params: any) { |
||||
return request.post({ url: '/system/admin/disable', params }) |
||||
} |
||||
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 菜单列表
|
||||
export function menuLists(params?: Record<string, any>) { |
||||
return request.get({ url: '/system/menu/list', params }) |
||||
} |
||||
|
||||
// 添加菜单
|
||||
export function menuAdd(params: Record<string, any>) { |
||||
return request.post({ url: '/system/menu/add', params }) |
||||
} |
||||
|
||||
// 编辑菜单
|
||||
export function menuEdit(params: Record<string, any>) { |
||||
return request.post({ url: '/system/menu/edit', params }) |
||||
} |
||||
|
||||
// 菜单删除
|
||||
export function menuDelete(params: Record<string, any>) { |
||||
return request.post({ url: '/system/menu/del', params }) |
||||
} |
||||
|
||||
// 菜单删除
|
||||
export function menuDetail(params: Record<string, any>) { |
||||
return request.get({ url: '/system/menu/detail', params }) |
||||
} |
||||
@ -0,0 +1,29 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 角色列表
|
||||
export function roleLists(params: any) { |
||||
return request.get({ url: '/system/role/list', params }) |
||||
} |
||||
|
||||
// 角色列表
|
||||
export function roleAll(params?: any) { |
||||
return request.get({ url: '/system/role/all', params }) |
||||
} |
||||
|
||||
// 角色列表
|
||||
export function roleDetail(params: any) { |
||||
return request.get({ url: '/system/role/detail', params }) |
||||
} |
||||
|
||||
// 添加角色
|
||||
export function roleAdd(params: any) { |
||||
return request.post({ url: '/system/role/add', params }) |
||||
} |
||||
// 编辑角色
|
||||
export function roleEdit(params: any) { |
||||
return request.post({ url: '/system/role/edit', params }) |
||||
} |
||||
// 删除角色
|
||||
export function roleDelete(params: any) { |
||||
return request.post({ url: '/system/role/del', params }) |
||||
} |
||||
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 字典类型列表
|
||||
export function dictTypeLists(params?: any) { |
||||
return request.get({ url: '/setting/dict/type/list', params }) |
||||
} |
||||
|
||||
// 字典类型列表
|
||||
export function dictTypeAll(params?: any) { |
||||
return request.get({ url: '/setting/dict/type/all', params }) |
||||
} |
||||
|
||||
// 添加字典类型
|
||||
export function dictTypeAdd(params: any) { |
||||
return request.post({ url: '/setting/dict/type/add', params }) |
||||
} |
||||
|
||||
// 编辑字典类型
|
||||
export function dictTypeEdit(params: any) { |
||||
return request.post({ url: '/setting/dict/type/edit', params }) |
||||
} |
||||
|
||||
// 删除字典类型
|
||||
export function dictTypeDelete(params: any) { |
||||
return request.post({ url: '/setting/dict/type/del', params }) |
||||
} |
||||
|
||||
// 字典数据列表
|
||||
export function dictDataLists(params: any) { |
||||
return request.get( |
||||
{ url: '/setting/dict/data/list', params }, |
||||
{ |
||||
ignoreCancelToken: true |
||||
} |
||||
) |
||||
} |
||||
|
||||
// 字典数据列表
|
||||
export function dictDataAll(params: any) { |
||||
return request.get( |
||||
{ url: '/setting/dict/data/all', params }, |
||||
{ |
||||
ignoreCancelToken: true |
||||
} |
||||
) |
||||
} |
||||
|
||||
// 添加字典数据
|
||||
export function dictDataAdd(params: any) { |
||||
return request.post({ url: '/setting/dict/data/add', params }) |
||||
} |
||||
|
||||
// 编辑字典数据
|
||||
export function dictDataEdit(params: any) { |
||||
return request.post({ url: '/setting/dict/data/edit', params }) |
||||
} |
||||
|
||||
// 删除字典数据
|
||||
export function dictDataDelete(params: any) { |
||||
return request.post({ url: '/setting/dict/data/del', params }) |
||||
} |
||||
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 获取支付方式
|
||||
export function getPayWay() { |
||||
return request.get({ url: '/setting/payment/method' }) |
||||
} |
||||
|
||||
// 设置支付方式
|
||||
export function setPayWay(params: any) { |
||||
return request.post({ url: '/setting/payment/editMethod', params }) |
||||
} |
||||
|
||||
// 获取支付方式
|
||||
export function getPayConfigLists() { |
||||
return request.get({ url: '/setting/payment/list' }) |
||||
} |
||||
|
||||
// 设置支付方式
|
||||
export function setPayConfig(params: any) { |
||||
return request.post({ url: '/setting/payment/editConfig', params }) |
||||
} |
||||
|
||||
// 设置支付方式
|
||||
export function getPayConfig(params: any) { |
||||
return request.get({ url: '/setting/payment/detail', params }) |
||||
} |
||||
@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
/** |
||||
* @return { Promise } |
||||
* @description 获取热门搜索数据 |
||||
*/ |
||||
export function getSearch() { |
||||
return request.get({ url: '/setting/search/detail' }) |
||||
} |
||||
|
||||
export interface List { |
||||
name: string // 搜索关键字
|
||||
sort: number // 热门搜索排序
|
||||
} |
||||
|
||||
export interface Search { |
||||
isHotSearch: number // 是否开启搜索0/1
|
||||
list: List[] |
||||
} |
||||
/** |
||||
* @return { Promise } |
||||
* @param { Search } Search |
||||
* @description 设置热门搜索 |
||||
*/ |
||||
export function setSearch(params: Search) { |
||||
return request.post({ url: '/setting/search/save', params }) |
||||
} |
||||
@ -0,0 +1,21 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 获取存储引擎列表
|
||||
export function storageLists() { |
||||
return request.get({ url: '/setting/storage/list' }) |
||||
} |
||||
|
||||
// 设置存储引擎信息
|
||||
export function storageChange(params: any) { |
||||
return request.post({ url: '/setting/storage/change', params }) |
||||
} |
||||
|
||||
// 设置存储引擎信息
|
||||
export function storageSetup(params: any) { |
||||
return request.post({ url: '/setting/storage/edit', params }) |
||||
} |
||||
|
||||
// 获取存储配置信息
|
||||
export function storageDetail(params: any) { |
||||
return request.get({ url: '/setting/storage/detail', params }) |
||||
} |
||||
@ -0,0 +1,46 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 获取系统环境
|
||||
export function systemInfo() { |
||||
return request.get({ url: '/monitor/server' }) |
||||
} |
||||
|
||||
// 获取系统日志列表
|
||||
export function systemLogLists(params: any) { |
||||
return request.get({ url: '/system/log/operate', params }) |
||||
} |
||||
|
||||
// 系统缓存监控
|
||||
export function systemCache() { |
||||
return request.get({ url: '/monitor/cache' }) |
||||
} |
||||
|
||||
// 定时任务列表
|
||||
export function crontabLists(params: any) { |
||||
return request.get({ url: '/crontab/list', params }) |
||||
} |
||||
|
||||
// 添加定时任务
|
||||
export function crontabAdd(params: any) { |
||||
return request.post({ url: '/crontab/add', params }) |
||||
} |
||||
|
||||
// 定时任务详情
|
||||
export function crontabDetail(params: any) { |
||||
return request.get({ url: '/crontab/detail', params }) |
||||
} |
||||
|
||||
// 编辑定时任务
|
||||
export function crontabEdit(params: any) { |
||||
return request.post({ url: '/crontab/edit', params }) |
||||
} |
||||
|
||||
// 删除定时任务
|
||||
export function crontabDel(params: any) { |
||||
return request.post({ url: '/crontab/del', params }) |
||||
} |
||||
|
||||
// 获取登录日志列表
|
||||
export function loginLogLists(params: any) { |
||||
return request.get({ url: '/system/log/login', params }) |
||||
} |
||||
@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
/** |
||||
* @return { Promise } |
||||
* @description 获取用户设置 |
||||
*/ |
||||
export function getUserSetup() { |
||||
return request.get({ url: '/setting/user/detail' }) |
||||
} |
||||
|
||||
/** |
||||
* @return { Promise } |
||||
* @param { string } defaultAvatar 默认用户头像 |
||||
* @description 设置用户设置 |
||||
*/ |
||||
export function setUserSetup(params: { defaultAvatar: string }) { |
||||
return request.post({ url: '/setting/user/save', params }) |
||||
} |
||||
|
||||
/** |
||||
* @return { Promise } |
||||
* @description 设置登录注册规则 |
||||
*/ |
||||
export function getLogin() { |
||||
return request.get({ url: '/setting/login/detail' }) |
||||
} |
||||
|
||||
export interface LoginSetup { |
||||
loginWay: number[] | any // 登录方式, 逗号隔开
|
||||
forceBindMobile: number // 强制绑定手机 0/1
|
||||
openAgreement: number // 是否开启协议 0/1
|
||||
openOtherAuth: number // 第三方登录 0/1
|
||||
autoLoginAuth: number[] | any // 第三方自动登录 逗号隔开
|
||||
} |
||||
/** |
||||
* @return { Promise } |
||||
* @param { LoginSetup } LoginSetup |
||||
* @description 设置登录注册规则 |
||||
*/ |
||||
export function setLogin(params: LoginSetup) { |
||||
return request.post({ url: '/setting/login/save', params }) |
||||
} |
||||
@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 获取备案信息
|
||||
export function getCopyright() { |
||||
return request.get({ url: '/setting/copyright/detail' }) |
||||
} |
||||
// 设置备案信息
|
||||
export function setCopyright(params: any) { |
||||
return request.post({ url: '/setting/copyright/save', params }) |
||||
} |
||||
// 获取网站信息
|
||||
export function getWebsite() { |
||||
return request.get({ url: '/setting/website/detail' }) |
||||
} |
||||
// 设置网站信息
|
||||
export function setWebsite(params: any) { |
||||
return request.post({ url: '/setting/website/save', params }) |
||||
} |
||||
|
||||
// 获取政策协议
|
||||
export function getProtocol() { |
||||
return request.get({ url: '/setting/protocol/detail' }) |
||||
} |
||||
// 设置政策协议
|
||||
export function setProtocol(params: any) { |
||||
return request.post({ url: '/setting/protocol/save', params }) |
||||
} |
||||
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
// 代码生成已选数据表列表接口
|
||||
export function generateTable(params: any) { |
||||
return request.get({ url: '/gen/list', params }) |
||||
} |
||||
|
||||
// 数据表列表接口
|
||||
export function dataTable(params: any) { |
||||
return request.get({ url: '/gen/db', params }) |
||||
} |
||||
|
||||
// 数据表所有列表接口
|
||||
export function dataTableAll() { |
||||
return request.get({ url: '/gen/dbAll' }) |
||||
} |
||||
|
||||
//表名查字段
|
||||
export function dataTableToColumn(params: any) { |
||||
return request.get({ url: '/gen/dbColumn', params }) |
||||
} |
||||
//选择要生成代码的数据表
|
||||
export function selectTable(params: any) { |
||||
return request.post( |
||||
{ url: '/gen/importTable', params }, |
||||
{ |
||||
isParamsToData: false |
||||
} |
||||
) |
||||
} |
||||
|
||||
// 已选择的数据表详情
|
||||
export function tableDetail(params: any) { |
||||
return request.get({ url: '/gen/detail', params }) |
||||
} |
||||
|
||||
//同步字段
|
||||
export function syncColumn(params: any) { |
||||
return request.post( |
||||
{ url: '/gen/syncTable', params }, |
||||
{ |
||||
isParamsToData: false |
||||
} |
||||
) |
||||
} |
||||
|
||||
//删除已选择的数据表
|
||||
export function generateDelete(params: any) { |
||||
return request.post({ url: '/gen/delTable', params }) |
||||
} |
||||
|
||||
//编辑已选表字段
|
||||
export function generateEdit(params: any) { |
||||
return request.post({ url: '/gen/editTable', params }) |
||||
} |
||||
|
||||
//预览代码
|
||||
export function generatePreview(params: any) { |
||||
return request.get({ url: '/gen/previewCode', params }) |
||||
} |
||||
|
||||
//生成代码
|
||||
export function generateCode(params: any) { |
||||
return request.get({ url: '/gen/genCode', params }) |
||||
} |
||||
|
||||
//下载代码
|
||||
export function downloadCode(params: any) { |
||||
return request.get( |
||||
{ responseType: 'blob', url: '/gen/downloadCode', params }, |
||||
{ |
||||
isTransformResponse: false |
||||
} |
||||
) |
||||
} |
||||
@ -0,0 +1,32 @@
|
||||
import config from '@/config' |
||||
import request from '@/utils/request' |
||||
|
||||
// 登录
|
||||
export function login(params: Record<string, any>) { |
||||
return request.post({ url: '/system/login', params: { ...params, terminal: config.terminal } }) |
||||
} |
||||
|
||||
// 登录
|
||||
export function loginCaptcha() { |
||||
return request.get({ url: '/system/captcha' }) |
||||
} |
||||
|
||||
// 退出登录
|
||||
export function logout() { |
||||
return request.post({ url: '/system/logout' }) |
||||
} |
||||
|
||||
// 用户信息
|
||||
export function getUserInfo() { |
||||
return request.get({ url: '/system/admin/self' }) |
||||
} |
||||
|
||||
// 菜单路由
|
||||
export function getMenu() { |
||||
return request.get({ url: '/system/menu/route' }) |
||||
} |
||||
|
||||
// 编辑管理员信息
|
||||
export function setUserInfo(params: any) { |
||||
return request.post({ url: '/system/admin/upInfo', params }) |
||||
} |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue