create-pubinfo 2.0.0-rc.3 → 2.0.0-rc.5

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.
Files changed (139) hide show
  1. package/dist/index.js +201 -157
  2. package/package.json +5 -1
  3. package/templates/{pubinfo-template → pubinfo-app}/.env +0 -3
  4. package/templates/{pubinfo-template → pubinfo-app}/_gitignore +1 -0
  5. package/templates/{pubinfo-template/openapi.config.ts → pubinfo-app/openapi.config.ts.hbs} +1 -1
  6. package/templates/{pubinfo-template/package.json → pubinfo-app/package.json.hbs} +12 -7
  7. package/templates/pubinfo-app/src/settings.ts.hbs +8 -0
  8. package/templates/pubinfo-module/.editorconfig +10 -0
  9. package/templates/pubinfo-module/README.md.hbs +27 -0
  10. package/templates/pubinfo-module/_gitignore +38 -0
  11. package/templates/pubinfo-module/_npmrc +5 -0
  12. package/templates/pubinfo-module/eslint.config.ts +3 -0
  13. package/templates/pubinfo-module/package.json.hbs +67 -0
  14. package/templates/pubinfo-module/playground/.env +2 -0
  15. package/templates/pubinfo-module/playground/.env.development +6 -0
  16. package/templates/pubinfo-module/playground/.env.production +10 -0
  17. package/templates/pubinfo-module/playground/index.html +47 -0
  18. package/templates/pubinfo-module/playground/openapi.config.ts.hbs +33 -0
  19. package/templates/pubinfo-module/playground/package.json.hbs +22 -0
  20. package/templates/pubinfo-module/playground/pubinfo.config.ts +9 -0
  21. package/templates/pubinfo-module/playground/public/browser_upgrade/chrome.png +0 -0
  22. package/templates/pubinfo-module/playground/public/browser_upgrade/edge.png +0 -0
  23. package/templates/pubinfo-module/playground/public/browser_upgrade/index.css +49 -0
  24. package/templates/pubinfo-module/playground/public/loading.css +92 -0
  25. package/templates/pubinfo-module/playground/src/App.vue +7 -0
  26. package/templates/pubinfo-module/playground/src/api/modules/auth/index.ts +3 -0
  27. package/templates/pubinfo-module/playground/src/api/modules/auth/renzhengfuwu.ts +145 -0
  28. package/templates/pubinfo-module/playground/src/api/modules/auth/typings.d.ts +97 -0
  29. package/templates/pubinfo-module/playground/src/api/request.ts +125 -0
  30. package/templates/pubinfo-module/playground/src/assets/icons/logo.svg +1 -0
  31. package/templates/pubinfo-module/playground/src/assets/icons/process-management.svg +1 -0
  32. package/templates/pubinfo-module/playground/src/assets/icons/workbench.svg +1 -0
  33. package/templates/pubinfo-module/playground/src/assets/images/login-bg.webp +0 -0
  34. package/templates/pubinfo-module/playground/src/assets/images/login-bg_dark.webp +0 -0
  35. package/templates/pubinfo-module/playground/src/assets/images/login-small.png +0 -0
  36. package/templates/pubinfo-module/playground/src/assets/images/login-small_dark.webp +0 -0
  37. package/templates/pubinfo-module/playground/src/components/UIProvider/index.vue +51 -0
  38. package/templates/pubinfo-module/playground/src/layouts/index.vue +44 -0
  39. package/templates/pubinfo-module/playground/src/main.ts.hbs +24 -0
  40. package/templates/pubinfo-module/playground/src/modules/auth.ts +20 -0
  41. package/templates/pubinfo-module/playground/src/modules/rbac.ts +10 -0
  42. package/templates/pubinfo-module/playground/src/routes/index.ts +71 -0
  43. package/templates/pubinfo-module/playground/src/routes/modules/demo/breadcrumb.example.ts +62 -0
  44. package/templates/pubinfo-module/playground/src/routes/modules/demo/link.ts +15 -0
  45. package/templates/pubinfo-module/playground/src/routes/modules/demo/multilevel.menu.example.ts +68 -0
  46. package/templates/pubinfo-module/playground/src/routes/modules/demo/other.page.ts +37 -0
  47. package/templates/pubinfo-module/playground/src/routes/modules/demo/single.ts +14 -0
  48. package/templates/{pubinfo-template → pubinfo-module/playground}/src/settings.ts +1 -1
  49. package/templates/pubinfo-module/playground/src/stores/index.ts +2 -0
  50. package/templates/pubinfo-module/playground/src/stores/modules/conter.ts +16 -0
  51. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/detail1.vue +11 -0
  52. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/detail2.vue +11 -0
  53. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/list1.vue +11 -0
  54. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/list2.vue +11 -0
  55. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +11 -0
  56. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +11 -0
  57. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/page.vue +11 -0
  58. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/page.vue +11 -0
  59. package/templates/pubinfo-module/playground/src/views/demo/other_page/des.vue +13 -0
  60. package/templates/pubinfo-module/playground/src/views/demo/other_page/index.vue +25 -0
  61. package/templates/pubinfo-module/playground/src/views/demo/preview-empty/index.vue +17 -0
  62. package/templates/pubinfo-module/playground/src/views/demo/single/index.vue +13 -0
  63. package/templates/pubinfo-module/playground/src/views/system/index.vue +5 -0
  64. package/templates/pubinfo-module/playground/src/views/system/login/components/LoginForm.vue +29 -0
  65. package/templates/pubinfo-module/playground/src/views/system/login/components/LoginWithPhone.vue +213 -0
  66. package/templates/pubinfo-module/playground/src/views/system/login/components/PasswordLogin.vue +194 -0
  67. package/templates/pubinfo-module/playground/src/views/system/login/components/Savephone.vue +17 -0
  68. package/templates/pubinfo-module/playground/src/views/system/login/components/Useragreement.vue +26 -0
  69. package/templates/pubinfo-module/playground/src/views/system/login/composables.ts +84 -0
  70. package/templates/pubinfo-module/playground/src/views/system/login/index.vue +142 -0
  71. package/templates/pubinfo-module/playground/tsconfig.json +3 -0
  72. package/templates/pubinfo-module/playground/uno.config.ts +17 -0
  73. package/templates/pubinfo-module/pnpm-workspace.yaml +2 -0
  74. package/templates/pubinfo-module/pubinfo.config.ts.hbs +36 -0
  75. package/templates/pubinfo-module/src/index.ts.hbs +9 -0
  76. package/templates/pubinfo-module/src/pages/demo.vue +11 -0
  77. package/templates/pubinfo-module/stylelint.config.js +3 -0
  78. package/templates/pubinfo-module/tsconfig.json +16 -0
  79. package/templates/pubinfo-module/uno.config.ts +8 -0
  80. package/templates/{pubinfo-template → pubinfo-app}/.browserslistrc +0 -0
  81. package/templates/{pubinfo-template → pubinfo-app}/.editorconfig +0 -0
  82. package/templates/{pubinfo-template → pubinfo-app}/.env.development +0 -0
  83. package/templates/{pubinfo-template → pubinfo-app}/.env.production +0 -0
  84. package/templates/{pubinfo-template → pubinfo-app}/_npmrc +0 -0
  85. package/templates/{pubinfo-template → pubinfo-app}/eslint.config.ts +0 -0
  86. package/templates/{pubinfo-template → pubinfo-app}/index.html +0 -0
  87. package/templates/{pubinfo-template → pubinfo-app}/pubinfo.config.ts +0 -0
  88. package/templates/{pubinfo-template → pubinfo-app}/public/browser_upgrade/chrome.png +0 -0
  89. package/templates/{pubinfo-template → pubinfo-app}/public/browser_upgrade/edge.png +0 -0
  90. package/templates/{pubinfo-template → pubinfo-app}/public/browser_upgrade/index.css +0 -0
  91. package/templates/{pubinfo-template → pubinfo-app}/public/loading.css +0 -0
  92. package/templates/{pubinfo-template → pubinfo-app}/src/App.vue +0 -0
  93. package/templates/{pubinfo-template → pubinfo-app}/src/api/modules/auth/index.ts +0 -0
  94. package/templates/{pubinfo-template → pubinfo-app}/src/api/modules/auth/renzhengfuwu.ts +0 -0
  95. package/templates/{pubinfo-template → pubinfo-app}/src/api/modules/auth/typings.d.ts +0 -0
  96. package/templates/{pubinfo-template → pubinfo-app}/src/api/request.ts +0 -0
  97. package/templates/{pubinfo-template → pubinfo-app}/src/assets/icons/logo.svg +0 -0
  98. package/templates/{pubinfo-template → pubinfo-app}/src/assets/icons/process-management.svg +0 -0
  99. package/templates/{pubinfo-template → pubinfo-app}/src/assets/icons/workbench.svg +0 -0
  100. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-bg.webp +0 -0
  101. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-bg_dark.webp +0 -0
  102. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-small.png +0 -0
  103. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-small_dark.webp +0 -0
  104. package/templates/{pubinfo-template → pubinfo-app}/src/components/UIProvider/index.vue +0 -0
  105. package/templates/{pubinfo-template → pubinfo-app}/src/layouts/index.vue +0 -0
  106. package/templates/{pubinfo-template → pubinfo-app}/src/main.ts +0 -0
  107. package/templates/{pubinfo-template → pubinfo-app}/src/modules/auth.ts +0 -0
  108. package/templates/{pubinfo-template → pubinfo-app}/src/modules/rbac.ts +0 -0
  109. package/templates/{pubinfo-template → pubinfo-app}/src/routes/index.ts +0 -0
  110. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/breadcrumb.example.ts +0 -0
  111. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/link.ts +0 -0
  112. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/multilevel.menu.example.ts +0 -0
  113. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/other.page.ts +0 -0
  114. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/single.ts +0 -0
  115. package/templates/{pubinfo-template → pubinfo-app}/src/stores/index.ts +0 -0
  116. package/templates/{pubinfo-template → pubinfo-app}/src/stores/modules/conter.ts +0 -0
  117. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/detail1.vue +0 -0
  118. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/detail2.vue +0 -0
  119. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/list1.vue +0 -0
  120. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/list2.vue +0 -0
  121. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +0 -0
  122. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +0 -0
  123. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/level2/page.vue +0 -0
  124. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/page.vue +0 -0
  125. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/other_page/des.vue +0 -0
  126. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/other_page/index.vue +0 -0
  127. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/preview-empty/index.vue +0 -0
  128. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/single/index.vue +0 -0
  129. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/index.vue +0 -0
  130. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/LoginForm.vue +0 -0
  131. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/LoginWithPhone.vue +0 -0
  132. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/PasswordLogin.vue +0 -0
  133. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/Savephone.vue +0 -0
  134. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/Useragreement.vue +0 -0
  135. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/composables.ts +1 -1
  136. /package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/index.vue +0 -0
  137. /package/templates/{pubinfo-template → pubinfo-app}/stylelint.config.js +0 -0
  138. /package/templates/{pubinfo-template → pubinfo-app}/tsconfig.json +0 -0
  139. /package/templates/{pubinfo-template → pubinfo-app}/uno.config.ts +0 -0
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "pubinfo-module-{{kebabCase dir}}",
3
+ "type": "module",
4
+ "version": "0.0.0",
5
+ "packageManager": "pnpm@10.12.4",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "default": "./dist/index.js"
10
+ },
11
+ "./style.css": "./dist/index.css"
12
+ },
13
+ "main": "./dist/index.js",
14
+ "module": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "files": [
17
+ "dist",
18
+ "src"
19
+ ],
20
+ "engines": {
21
+ "node": "^20.19.0 || >=22.12.0"
22
+ },
23
+ "scripts": {
24
+ "play": "pnpm run -C playground dev",
25
+ "play:build": "pnpm run -C playground build",
26
+ "play:preview": "pnpm run -C playground preview",
27
+ "dev": "pubinfo build -w",
28
+ "build": "pubinfo build",
29
+ "commit": "pubinfo commit",
30
+ "upgrade": "pubinfo upgrade",
31
+ "prepare": "pubinfo setup && pubinfo commit --init",
32
+ "lint": "pnpm run lint:eslint && pnpm run lint:stylelint",
33
+ "lint:eslint": "eslint . --cache --fix",
34
+ "lint:stylelint": "stylelint \"src/**/*.{css,scss,vue}\" --cache --fix",
35
+ "openapi": "pnpx @pubinfo/openapi generate",
36
+ "release": "bumpp",
37
+ "deps": "pnpx taze -r",
38
+ "deps:up": "pnpx taze -wr"
39
+ },
40
+ "peerDependencies": {
41
+ "pubinfo": ">=2.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@pubinfo/openapi": "^0.9.0",
45
+ "@pubinfo/preset-openapi": "^0.9.0",
46
+ "eslint": "^9.30.1",
47
+ "lint-staged": "^16.1.2",
48
+ "pubinfo": "{{version}}",
49
+ "simple-git-hooks": "^2.13.0",
50
+ "stylelint": "^16.21.0",
51
+ "typescript": "^5.8.3"
52
+ },
53
+ "simple-git-hooks": {
54
+ "pre-commit": "pnpm lint-staged",
55
+ "commit-msg": "pnpm exec pubinfo commit --edit $1"
56
+ },
57
+ "lint-staged": {
58
+ "*.{vue,js,ts,jsx,tsx,md,json}": "eslint --cache --fix",
59
+ "*.{css,less,scss,vue}": "stylelint --cache --fix"
60
+ },
61
+ "config": {
62
+ "commitizen": {
63
+ "path": "node_modules/cz-git",
64
+ "czConfig": ".pubinfo/cz.config.cjs"
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,2 @@
1
+ # 页面标题
2
+ VITE_APP_TITLE = 产数开发底座
@@ -0,0 +1,6 @@
1
+ # 接口请求地址,会设置到 axios 的 baseURL 参数上
2
+ VITE_APP_API_BASEURL = http://localhost:9099/pubinfo-sys
3
+ # 是否开启代理
4
+ VITE_OPEN_PROXY = false
5
+ # 是否启动 vite app inspector
6
+ VITE_APP_INSPECTOR = false
@@ -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,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: {{openapi}},
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,22 @@
1
+ {
2
+ "name": "playground",
3
+ "type": "module",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "pubinfo dev",
7
+ "build": "pubinfo build",
8
+ "preview": "pubinfo preview",
9
+ "openapi": "pnpx @pubinfo/openapi generate"
10
+ },
11
+ "dependencies": {
12
+ "@ant-design/icons-vue": "^7.0.1",
13
+ "@pubinfo/module-auth": "{{version}}",
14
+ "@pubinfo/module-rbac": "{{version}}",
15
+ "@pubinfo/pro-components": "^1.7.3",
16
+ "@vueuse/core": "^13.7.0",
17
+ "alova": "^3.3.4",
18
+ "ant-design-vue": "^4.2.6",
19
+ "dayjs": "^1.11.13",
20
+ "pubinfo-module-{{kebabCase dir}}": "workspace:*"
21
+ }
22
+ }
@@ -0,0 +1,9 @@
1
+ import { definePubinfoConfig } from 'pubinfo/node';
2
+
3
+ export default definePubinfoConfig({
4
+ vite: {
5
+ server: {
6
+ port: 5173,
7
+ },
8
+ },
9
+ });
@@ -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,7 @@
1
+ <template>
2
+ <UIProvider>
3
+ <PubinfoProvider>
4
+ <PubinfoApp />
5
+ </PubinfoProvider>
6
+ </UIProvider>
7
+ </template>
@@ -0,0 +1,3 @@
1
+ // API 更新时间:
2
+ // API 唯一标识:
3
+ export * from './renzhengfuwu';
@@ -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
+ }
@@ -0,0 +1,97 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ declare namespace API {
4
+ type getAuthCheckCacheTokenParams = {
5
+ accessToken: string;
6
+ userId: string;
7
+ };
8
+
9
+ type getAuthLoginValidCodeParams = {
10
+ /** 尺寸(长x宽),例:150x50表示长为150宽为50,不填默认150x50 */
11
+ size?: string;
12
+ /** 验证码长度,不填默认4位 */
13
+ length?: number;
14
+ };
15
+
16
+ type IResponseCode = {
17
+ code?: number;
18
+ msg?: string;
19
+ hint?: string;
20
+ };
21
+
22
+ type LoginByPwdDto = {
23
+ /** 登录类型 */
24
+ loginType: string;
25
+ /** 登录名 */
26
+ loginName: string;
27
+ /** 密码 */
28
+ loginPwd: string;
29
+ /** 验证码hash */
30
+ codeHash: string;
31
+ /** 验证码 */
32
+ code: string;
33
+ };
34
+
35
+ type LoginTokenVo = {
36
+ /** 刷新令牌 */
37
+ refreshToken?: string;
38
+ /** 访问令牌 */
39
+ accessToken?: string;
40
+ loginResponse?: IResponseCode;
41
+ };
42
+
43
+ type postAuthChangeLoginOrgParams = {
44
+ /** 新组织id */
45
+ orgId: string;
46
+ };
47
+
48
+ type postAuthTokenRefreshParams = {
49
+ /** 刷新令牌 */
50
+ refreshToken: string;
51
+ };
52
+
53
+ type ResponseDataBoolean = {
54
+ code?: number;
55
+ msg?: string;
56
+ hint?: string;
57
+ data?: boolean;
58
+ success?: boolean;
59
+ };
60
+
61
+ type ResponseDataLoginTokenVo = {
62
+ code?: number;
63
+ msg?: string;
64
+ hint?: string;
65
+ data?: LoginTokenVo;
66
+ success?: boolean;
67
+ };
68
+
69
+ type ResponseDataString = {
70
+ code?: number;
71
+ msg?: string;
72
+ hint?: string;
73
+ data?: string;
74
+ success?: boolean;
75
+ };
76
+
77
+ type ResponseDataValidCodeVo = {
78
+ code?: number;
79
+ msg?: string;
80
+ hint?: string;
81
+ data?: ValidCodeVo;
82
+ success?: boolean;
83
+ };
84
+
85
+ type ResponseDataVoid = {
86
+ code?: number;
87
+ msg?: string;
88
+ hint?: string;
89
+ data?: Record<string, any>;
90
+ success?: boolean;
91
+ };
92
+
93
+ type ValidCodeVo = {
94
+ key?: string;
95
+ plaintext?: string;
96
+ };
97
+ }