create-pubinfo 2.0.0-beta.9 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +352 -306
- package/package.json +13 -13
- package/templates/pubinfo-template/.browserslistrc +5 -0
- package/templates/pubinfo-template/.editorconfig +10 -0
- package/templates/pubinfo-template/.env +5 -0
- package/templates/pubinfo-template/.env.development +6 -0
- package/templates/pubinfo-template/.env.production +10 -0
- package/templates/pubinfo-template/_gitignore +37 -0
- package/templates/pubinfo-template/_npmrc +5 -0
- package/templates/pubinfo-template/commitlint.config.js +66 -0
- package/templates/pubinfo-template/eslint.config.ts +3 -0
- package/templates/pubinfo-template/index.html +47 -0
- package/templates/pubinfo-template/openapi.config.ts +33 -0
- package/templates/pubinfo-template/package.json +53 -0
- package/templates/pubinfo-template/pubinfo.config.ts +9 -0
- package/templates/pubinfo-template/public/browser_upgrade/chrome.png +0 -0
- package/templates/pubinfo-template/public/browser_upgrade/edge.png +0 -0
- package/templates/pubinfo-template/public/browser_upgrade/index.css +49 -0
- package/templates/pubinfo-template/public/loading.css +92 -0
- package/templates/pubinfo-template/src/App.vue +7 -0
- package/templates/pubinfo-template/src/api/modules/auth/index.ts +3 -0
- package/templates/pubinfo-template/src/api/modules/auth/renzhengfuwu.ts +145 -0
- package/templates/pubinfo-template/src/api/modules/auth/typings.d.ts +97 -0
- package/templates/pubinfo-template/src/api/request.ts +125 -0
- package/templates/pubinfo-template/src/assets/icons/logo.svg +1 -0
- package/templates/pubinfo-template/src/assets/icons/process-management.svg +1 -0
- package/templates/pubinfo-template/src/assets/icons/workbench.svg +1 -0
- package/templates/pubinfo-template/src/assets/images/login-bg.webp +0 -0
- package/templates/pubinfo-template/src/assets/images/login-bg_dark.webp +0 -0
- package/templates/pubinfo-template/src/assets/images/login-small.png +0 -0
- package/templates/pubinfo-template/src/assets/images/login-small_dark.webp +0 -0
- package/templates/pubinfo-template/src/components/UIProvider/index.vue +51 -0
- package/templates/pubinfo-template/src/layouts/index.vue +38 -0
- package/templates/pubinfo-template/src/main.ts +22 -0
- package/templates/pubinfo-template/src/modules/auth.ts +20 -0
- package/templates/pubinfo-template/src/modules/rbac.ts +11 -0
- package/templates/pubinfo-template/src/routes/index.ts +71 -0
- package/templates/pubinfo-template/src/routes/modules/demo/breadcrumb.example.ts +62 -0
- package/templates/pubinfo-template/src/routes/modules/demo/link.ts +15 -0
- package/templates/pubinfo-template/src/routes/modules/demo/multilevel.menu.example.ts +68 -0
- package/templates/pubinfo-template/src/routes/modules/demo/other.page.ts +37 -0
- package/templates/pubinfo-template/src/routes/modules/demo/single.ts +14 -0
- package/templates/pubinfo-template/src/settings.ts +8 -0
- package/templates/pubinfo-template/src/stores/index.ts +2 -0
- package/templates/pubinfo-template/src/stores/modules/conter.ts +16 -0
- package/templates/pubinfo-template/src/views/demo/breadcrumb_example/detail1.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/breadcrumb_example/detail2.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/breadcrumb_example/list1.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/breadcrumb_example/list2.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/level2/page.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/multilevel_menu_example/page.vue +11 -0
- package/templates/pubinfo-template/src/views/demo/other_page/des.vue +13 -0
- package/templates/pubinfo-template/src/views/demo/other_page/index.vue +25 -0
- package/templates/pubinfo-template/src/views/demo/preview-empty/index.vue +17 -0
- package/templates/pubinfo-template/src/views/demo/single/index.vue +13 -0
- package/templates/pubinfo-template/src/views/system/index.vue +5 -0
- package/templates/pubinfo-template/src/views/system/login/components/LoginForm.vue +29 -0
- package/templates/pubinfo-template/src/views/system/login/components/LoginWithPhone.vue +213 -0
- package/templates/pubinfo-template/src/views/system/login/components/PasswordLogin.vue +194 -0
- package/templates/pubinfo-template/src/views/system/login/components/Savephone.vue +17 -0
- package/templates/pubinfo-template/src/views/system/login/components/Useragreement.vue +26 -0
- package/templates/pubinfo-template/src/views/system/login/composables.ts +84 -0
- package/templates/pubinfo-template/src/views/system/login/index.vue +147 -0
- package/templates/pubinfo-template/stylelint.config.js +3 -0
- package/templates/pubinfo-template/tsconfig.json +3 -0
- package/templates/pubinfo-template/uno.config.ts +17 -0
- package/dist/index.cjs +0 -364
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pubinfo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-
|
|
4
|
+
"version": "2.0.0-rc.1",
|
|
5
5
|
"description": "初始化项目框架",
|
|
6
6
|
"author": "Werheng <werheng.zhang@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -9,29 +9,29 @@
|
|
|
9
9
|
"pubinfo": "./dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"dist"
|
|
12
|
+
"dist",
|
|
13
|
+
"templates"
|
|
13
14
|
],
|
|
14
15
|
"dependencies": {
|
|
15
|
-
"@inquirer/prompts": "^
|
|
16
|
+
"@inquirer/prompts": "^7.6.0",
|
|
16
17
|
"ansi-colors": "^4.1.3",
|
|
17
18
|
"cfonts": "^3.3.0",
|
|
18
|
-
"commander": "^
|
|
19
|
-
"confbox": "^0.
|
|
20
|
-
"consola": "^3.4.
|
|
21
|
-
"giget": "^
|
|
19
|
+
"commander": "^14.0.0",
|
|
20
|
+
"confbox": "^0.2.2",
|
|
21
|
+
"consola": "^3.4.2",
|
|
22
|
+
"giget": "^2.0.0",
|
|
22
23
|
"ofetch": "^1.4.1",
|
|
23
24
|
"ora": "^8.2.0",
|
|
24
25
|
"rimraf": "^6.0.1",
|
|
25
|
-
"semver": "^7.7.
|
|
26
|
+
"semver": "^7.7.2"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^
|
|
29
|
-
"tsup": "^8.4.0"
|
|
29
|
+
"@types/node": "^24.0.10"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"dev": "
|
|
33
|
-
"build": "
|
|
34
|
-
"cli": "
|
|
32
|
+
"dev": "tsdown --watch src",
|
|
33
|
+
"build": "tsdown",
|
|
34
|
+
"cli": "node dist/index.js",
|
|
35
35
|
"cli:clean": "rimraf ./my-app",
|
|
36
36
|
"lint": "eslint . --cache --fix"
|
|
37
37
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# 接口请求地址,会设置到 axios 的 baseURL 参数上
|
|
2
|
+
VITE_APP_API_BASEURL = /pubinfo-sys
|
|
3
|
+
# 是否在打包时启用 Mock
|
|
4
|
+
VITE_BUILD_MOCK = false
|
|
5
|
+
# 是否在打包时生成 sourcemap
|
|
6
|
+
VITE_BUILD_SOURCEMAP = false
|
|
7
|
+
# 是否在打包时开启压缩,支持 gzip 和 brotli,例如 gzip,brotli
|
|
8
|
+
VITE_BUILD_COMPRESS =
|
|
9
|
+
# 是否在打包时启用传统浏览器兼容,可在 .browserslistrc 中进行具体配置
|
|
10
|
+
VITE_BUILD_LEGACY = false
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.pubinfo
|
|
2
|
+
.eslintcache
|
|
3
|
+
.stylelintcache
|
|
4
|
+
|
|
5
|
+
# auto generated
|
|
6
|
+
auto-imports.d.ts
|
|
7
|
+
components.d.ts
|
|
8
|
+
|
|
9
|
+
.DS_Store
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
cache
|
|
13
|
+
coverage
|
|
14
|
+
.turbo
|
|
15
|
+
.eslintcache
|
|
16
|
+
.stylelintcache
|
|
17
|
+
|
|
18
|
+
# local env files
|
|
19
|
+
.env.local
|
|
20
|
+
.env.*.local
|
|
21
|
+
|
|
22
|
+
# Log files
|
|
23
|
+
npm-debug.log*
|
|
24
|
+
yarn-debug.log*
|
|
25
|
+
yarn-error.log*
|
|
26
|
+
pnpm-debug.log*
|
|
27
|
+
lerna-debug.log*
|
|
28
|
+
|
|
29
|
+
# Editor directories and files
|
|
30
|
+
.idea
|
|
31
|
+
# .vscode
|
|
32
|
+
*.suo
|
|
33
|
+
*.ntvs*
|
|
34
|
+
*.njsproj
|
|
35
|
+
*.sln
|
|
36
|
+
*.sw?
|
|
37
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
extends: ['@commitlint/config-conventional'],
|
|
3
|
+
prompt: {
|
|
4
|
+
questions: {
|
|
5
|
+
type: {
|
|
6
|
+
enum: {
|
|
7
|
+
feat: {
|
|
8
|
+
description: '✨ 新增功能 | A new feature',
|
|
9
|
+
title: 'Features',
|
|
10
|
+
emoji: '✨',
|
|
11
|
+
},
|
|
12
|
+
fix: {
|
|
13
|
+
description: '🐛 修复缺陷 | A bug fix',
|
|
14
|
+
title: 'Bug Fixes',
|
|
15
|
+
emoji: '🐛',
|
|
16
|
+
},
|
|
17
|
+
docs: {
|
|
18
|
+
description: '📝 文档更新 | Documentation only changes',
|
|
19
|
+
title: 'Documentation',
|
|
20
|
+
emoji: '📝',
|
|
21
|
+
},
|
|
22
|
+
style: {
|
|
23
|
+
description: '💄 代码格式 | Changes that do not affect the meaning of the code',
|
|
24
|
+
title: 'Styles',
|
|
25
|
+
emoji: '💄',
|
|
26
|
+
},
|
|
27
|
+
refactor: {
|
|
28
|
+
description: '♻️ 代码重构 | A code change that neither fixes a bug nor adds a feature',
|
|
29
|
+
title: 'Code Refactoring',
|
|
30
|
+
emoji: '♻️',
|
|
31
|
+
},
|
|
32
|
+
perf: {
|
|
33
|
+
description: '⚡️ 性能提升 | A code change that improves performance',
|
|
34
|
+
title: 'Performance Improvements',
|
|
35
|
+
emoji: '⚡️',
|
|
36
|
+
},
|
|
37
|
+
test: {
|
|
38
|
+
description: '✅ 测试相关 | Adding missing tests or correcting existing tests',
|
|
39
|
+
title: 'Tests',
|
|
40
|
+
emoji: '✅',
|
|
41
|
+
},
|
|
42
|
+
build: {
|
|
43
|
+
description: '📦️ 构建相关 | Changes that affect the build system or external dependencies',
|
|
44
|
+
title: 'Builds',
|
|
45
|
+
emoji: '📦️',
|
|
46
|
+
},
|
|
47
|
+
ci: {
|
|
48
|
+
description: '🎡 持续集成 | Changes to our CI configuration files and scripts',
|
|
49
|
+
title: 'Continuous Integrations',
|
|
50
|
+
emoji: '🎡',
|
|
51
|
+
},
|
|
52
|
+
chore: {
|
|
53
|
+
description: '🔨 其他修改 | Other changes that do not modify src or test files',
|
|
54
|
+
title: 'Chores',
|
|
55
|
+
emoji: '🔨',
|
|
56
|
+
},
|
|
57
|
+
revert: {
|
|
58
|
+
description: '⏪️ 回退代码 | Revert to a commit',
|
|
59
|
+
title: 'Reverts',
|
|
60
|
+
emoji: '⏪️',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" href="src/assets/icons/logo.svg" type="image/svg+xml"/>
|
|
6
|
+
<link rel="stylesheet" href="/loading.css" />
|
|
7
|
+
<link rel="stylesheet" href="/browser_upgrade/index.css" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
+
<meta http-equiv="Expires" content="0">
|
|
10
|
+
<meta http-equiv="Pragma" content="no-cache">
|
|
11
|
+
<meta http-equiv="Cache-control" content="no-cache">
|
|
12
|
+
<meta http-equiv="Cache" content="no-cache">
|
|
13
|
+
<title>%VITE_APP_TITLE%</title>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="app">
|
|
17
|
+
<div class="w-admin-home">
|
|
18
|
+
<div class="loading">
|
|
19
|
+
<div class="square"></div>
|
|
20
|
+
<div class="square"></div>
|
|
21
|
+
<div class="square"></div>
|
|
22
|
+
<div class="square"></div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="text">载入中</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div id="browser-upgrade">
|
|
27
|
+
<div class="title">为了您的体验,推荐使用以下浏览器</div>
|
|
28
|
+
<div class="browsers">
|
|
29
|
+
<a href="https://www.microsoft.com/edge" target="_blank" class="browser">
|
|
30
|
+
<img class="browser-icon" src="/browser_upgrade/edge.png" />
|
|
31
|
+
<div class="browser-name">Mircosoft Edge</div>
|
|
32
|
+
</a>
|
|
33
|
+
<a href="https://www.google.cn/chrome/" target="_blank" class="browser">
|
|
34
|
+
<img class="browser-icon" src="/browser_upgrade/chrome.png" />
|
|
35
|
+
<div class="browser-name">Google Chrome</div>
|
|
36
|
+
</a>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<script>
|
|
41
|
+
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
|
42
|
+
document.getElementById('browser-upgrade').style.display = 'block';
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
<script type="module" src="/src/main.ts"></script>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineConfig } from '@pubinfo/openapi';
|
|
2
|
+
import { presetName } from '@pubinfo/preset-openapi';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
enabled: false,
|
|
6
|
+
|
|
7
|
+
presets: [
|
|
8
|
+
// 小驼峰式命名
|
|
9
|
+
presetName({
|
|
10
|
+
functionName: 'camelCase',
|
|
11
|
+
}),
|
|
12
|
+
],
|
|
13
|
+
|
|
14
|
+
imports: { '@/api/request': [{ name: 'basic', as: 'request' }] },
|
|
15
|
+
batch: [
|
|
16
|
+
{
|
|
17
|
+
input: 'http://localhost:9099/pubinfo-sys/v3/api-docs/auth',
|
|
18
|
+
output: './src/api/modules/auth',
|
|
19
|
+
imports: { '@/api/request': [{ name: 'auth', as: 'request' }] },
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
|
|
23
|
+
hooks: {
|
|
24
|
+
customType(schema, namespace, defaultFn) {
|
|
25
|
+
// `int64` 在前端会精度丢失,可在此处调整对应字段的 `TS类型`
|
|
26
|
+
if (schema?.type === 'integer' && schema?.format === 'int64') {
|
|
27
|
+
return 'number';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return defaultFn(schema, namespace);
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pubinfo-template",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"private": true,
|
|
5
|
+
"packageManager": "pnpm@10.12.4",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "pubinfo dev",
|
|
8
|
+
"build": "pubinfo build",
|
|
9
|
+
"preview": "pubinfo preview",
|
|
10
|
+
"commit": "git-cz",
|
|
11
|
+
"lint:eslint": "eslint . --cache --fix",
|
|
12
|
+
"lint:stylelint": "stylelint \"src/**/*.{css,scss,vue}\" --cache --fix",
|
|
13
|
+
"viewer:eslint-rule": "pnpx @eslint/config-inspector",
|
|
14
|
+
"openapi": "pnpx @pubinfo/openapi generate"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@ant-design/icons-vue": "^7.0.1",
|
|
18
|
+
"@pubinfo/module-auth": "^2.0.0-beta.33",
|
|
19
|
+
"@pubinfo/module-rbac": "^2.0.0-beta.33",
|
|
20
|
+
"@pubinfo/pro-components": "^1.7.1",
|
|
21
|
+
"@vueuse/core": "^12.8.2",
|
|
22
|
+
"alova": "^3.3.4",
|
|
23
|
+
"ant-design-vue": "^4.2.6",
|
|
24
|
+
"dayjs": "^1.11.13",
|
|
25
|
+
"pubinfo": "^2.0.0-beta.33"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
29
|
+
"@commitlint/cz-commitlint": "^19.8.1",
|
|
30
|
+
"@pubinfo/openapi": "^0.8.4",
|
|
31
|
+
"@pubinfo/preset-openapi": "^0.8.4",
|
|
32
|
+
"commitizen": "^4.3.1",
|
|
33
|
+
"commitlint": "^19.8.1",
|
|
34
|
+
"eslint": "^9.30.1",
|
|
35
|
+
"lint-staged": "^16.1.2",
|
|
36
|
+
"simple-git-hooks": "^2.13.0",
|
|
37
|
+
"stylelint": "^16.21.0",
|
|
38
|
+
"typescript": "^5.8.3"
|
|
39
|
+
},
|
|
40
|
+
"config": {
|
|
41
|
+
"commitizen": {
|
|
42
|
+
"path": "@commitlint/cz-commitlint"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"simple-git-hooks": {
|
|
46
|
+
"pre-commit": "pnpm lint-staged",
|
|
47
|
+
"commit-msg": "pnpm commitlint --edit"
|
|
48
|
+
},
|
|
49
|
+
"lint-staged": {
|
|
50
|
+
"*.{vue,js,ts,jsx,tsx,md,json}": "eslint --cache --fix",
|
|
51
|
+
"*.{css,scss,vue}": "stylelint --cache --fix"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#browser-upgrade {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
z-index: 10001;
|
|
6
|
+
display: none;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
color: #736477;
|
|
10
|
+
user-select: none;
|
|
11
|
+
background-color: snow;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#browser-upgrade .title {
|
|
15
|
+
margin: 40px 0;
|
|
16
|
+
font-size: 24px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#browser-upgrade .browsers {
|
|
21
|
+
text-align: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
#browser-upgrade .browsers .browser {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
margin: 0 20px;
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
#browser-upgrade .browsers .browser .browser-icon {
|
|
32
|
+
display: block;
|
|
33
|
+
width: 50px;
|
|
34
|
+
height: 50px;
|
|
35
|
+
margin: 0 auto;
|
|
36
|
+
border: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#browser-upgrade .browsers .browser .browser-name {
|
|
40
|
+
padding-bottom: 2px;
|
|
41
|
+
margin-top: 10px;
|
|
42
|
+
color: #736477;
|
|
43
|
+
text-align: center;
|
|
44
|
+
border-bottom: 1px solid transparent;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#browser-upgrade .browsers .browser:hover .browser-name {
|
|
48
|
+
border-bottom: 1px solid #736477;
|
|
49
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#app {
|
|
2
|
+
height: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.w-admin-home {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
z-index: 10000;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
color: #736477;
|
|
17
|
+
user-select: none;
|
|
18
|
+
background-color: snow;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.w-admin-home .loading {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
width: 40px;
|
|
27
|
+
height: 40px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.w-admin-home .loading .square {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: 20px;
|
|
35
|
+
height: 20px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.w-admin-home .loading .square::before {
|
|
39
|
+
width: 10px;
|
|
40
|
+
height: 10px;
|
|
41
|
+
content: "";
|
|
42
|
+
border: 3px solid #8c858f;
|
|
43
|
+
border-radius: 15%;
|
|
44
|
+
animation: square-to-dot-animation 2s linear infinite;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.w-admin-home .loading .square:nth-child(1)::before {
|
|
48
|
+
animation-delay: calc(150ms * 1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.w-admin-home .loading .square:nth-child(2)::before {
|
|
52
|
+
animation-delay: calc(150ms * 2);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.w-admin-home .loading .square:nth-child(3)::before {
|
|
56
|
+
animation-delay: calc(150ms * 3);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.w-admin-home .loading .square:nth-child(4)::before {
|
|
60
|
+
animation-delay: calc(150ms * 4);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes square-to-dot-animation {
|
|
64
|
+
15%,
|
|
65
|
+
25% {
|
|
66
|
+
width: 0;
|
|
67
|
+
height: 0;
|
|
68
|
+
margin: 5px;
|
|
69
|
+
border-width: 5px;
|
|
70
|
+
border-radius: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
40% {
|
|
74
|
+
width: 10px;
|
|
75
|
+
height: 10px;
|
|
76
|
+
margin: initial;
|
|
77
|
+
border-width: 3px;
|
|
78
|
+
border-radius: 15%;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.w-admin-home .text {
|
|
83
|
+
position: relative;
|
|
84
|
+
margin-top: 20px;
|
|
85
|
+
font-size: 24px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.w-admin-home .text::after {
|
|
89
|
+
position: absolute;
|
|
90
|
+
padding-left: 5px;
|
|
91
|
+
content: "…";
|
|
92
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { auth as request } from '@/api/request';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 切换登录组织
|
|
5
|
+
* @url /auth/changeLoginOrg
|
|
6
|
+
* @method POST
|
|
7
|
+
* @author @pubinfo/openapi
|
|
8
|
+
*/
|
|
9
|
+
export function postAuthChangeLoginOrg<
|
|
10
|
+
R = API.ResponseDataLoginTokenVo,
|
|
11
|
+
T = API.ResponseDataLoginTokenVo,
|
|
12
|
+
>(
|
|
13
|
+
params: API.postAuthChangeLoginOrgParams,
|
|
14
|
+
options?: Parameters<typeof request.Post<R, T>>[2],
|
|
15
|
+
) {
|
|
16
|
+
return request.Post<R, T>(
|
|
17
|
+
'/auth/changeLoginOrg',
|
|
18
|
+
{},
|
|
19
|
+
{
|
|
20
|
+
params: {
|
|
21
|
+
...params,
|
|
22
|
+
},
|
|
23
|
+
...(options || {}),
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description 判断缓存的token是否有效
|
|
30
|
+
* @url /auth/checkCacheToken
|
|
31
|
+
* @method GET
|
|
32
|
+
* @author @pubinfo/openapi
|
|
33
|
+
*/
|
|
34
|
+
export function getAuthCheckCacheToken<
|
|
35
|
+
R = API.ResponseDataBoolean,
|
|
36
|
+
T = API.ResponseDataBoolean,
|
|
37
|
+
>(
|
|
38
|
+
params: API.getAuthCheckCacheTokenParams,
|
|
39
|
+
options?: Parameters<typeof request.Get<R, T>>[1],
|
|
40
|
+
) {
|
|
41
|
+
return request.Get<R, T>('/auth/checkCacheToken', {
|
|
42
|
+
params: {
|
|
43
|
+
...params,
|
|
44
|
+
},
|
|
45
|
+
...(options || {}),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @description 密码登录
|
|
51
|
+
* @url /auth/login
|
|
52
|
+
* @method POST
|
|
53
|
+
* @author @pubinfo/openapi
|
|
54
|
+
*/
|
|
55
|
+
export function postAuthLogin<
|
|
56
|
+
R = API.ResponseDataLoginTokenVo,
|
|
57
|
+
T = API.ResponseDataLoginTokenVo,
|
|
58
|
+
>(body: API.LoginByPwdDto, options?: Parameters<typeof request.Post<R, T>>[2]) {
|
|
59
|
+
return request.Post<R, T>('/auth/login', body, {
|
|
60
|
+
headers: {
|
|
61
|
+
'Content-Type': 'application/json',
|
|
62
|
+
},
|
|
63
|
+
...(options || {}),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @description 获取登录公钥
|
|
69
|
+
* @url /auth/login/key
|
|
70
|
+
* @method GET
|
|
71
|
+
* @author @pubinfo/openapi
|
|
72
|
+
*/
|
|
73
|
+
export function getAuthLoginKey<
|
|
74
|
+
R = API.ResponseDataString,
|
|
75
|
+
T = API.ResponseDataString,
|
|
76
|
+
>(options?: Parameters<typeof request.Get<R, T>>[1]) {
|
|
77
|
+
return request.Get<R, T>('/auth/login/key', {
|
|
78
|
+
...(options || {}),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @description 获取图片验证码
|
|
84
|
+
* @url /auth/login/validCode
|
|
85
|
+
* @method GET
|
|
86
|
+
* @author @pubinfo/openapi
|
|
87
|
+
*/
|
|
88
|
+
export function getAuthLoginValidCode<
|
|
89
|
+
R = API.ResponseDataValidCodeVo,
|
|
90
|
+
T = API.ResponseDataValidCodeVo,
|
|
91
|
+
>(
|
|
92
|
+
params: API.getAuthLoginValidCodeParams,
|
|
93
|
+
options?: Parameters<typeof request.Get<R, T>>[1],
|
|
94
|
+
) {
|
|
95
|
+
return request.Get<R, T>('/auth/login/validCode', {
|
|
96
|
+
params: {
|
|
97
|
+
...params,
|
|
98
|
+
},
|
|
99
|
+
...(options || {}),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @description 登出
|
|
105
|
+
* @url /auth/loginOut
|
|
106
|
+
* @method POST
|
|
107
|
+
* @author @pubinfo/openapi
|
|
108
|
+
*/
|
|
109
|
+
export function postAuthLoginOut<
|
|
110
|
+
R = API.ResponseDataVoid,
|
|
111
|
+
T = API.ResponseDataVoid,
|
|
112
|
+
>(options?: Parameters<typeof request.Post<R, T>>[2]) {
|
|
113
|
+
return request.Post<R, T>(
|
|
114
|
+
'/auth/loginOut',
|
|
115
|
+
{},
|
|
116
|
+
{
|
|
117
|
+
...(options || {}),
|
|
118
|
+
},
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @description 刷新访问令牌
|
|
124
|
+
* @url /auth/token/refresh
|
|
125
|
+
* @method POST
|
|
126
|
+
* @author @pubinfo/openapi
|
|
127
|
+
*/
|
|
128
|
+
export function postAuthTokenRefresh<
|
|
129
|
+
R = API.ResponseDataLoginTokenVo,
|
|
130
|
+
T = API.ResponseDataLoginTokenVo,
|
|
131
|
+
>(
|
|
132
|
+
params: API.postAuthTokenRefreshParams,
|
|
133
|
+
options?: Parameters<typeof request.Post<R, T>>[2],
|
|
134
|
+
) {
|
|
135
|
+
return request.Post<R, T>(
|
|
136
|
+
'/auth/token/refresh',
|
|
137
|
+
{},
|
|
138
|
+
{
|
|
139
|
+
params: {
|
|
140
|
+
...params,
|
|
141
|
+
},
|
|
142
|
+
...(options || {}),
|
|
143
|
+
},
|
|
144
|
+
);
|
|
145
|
+
}
|