verce-vue-test 0.0.39 → 0.0.41

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 (67) hide show
  1. package/design-qa.md +17 -9
  2. package/package.json +1 -1
  3. package/src/views/HomeView.vue +340 -172
  4. package/vite.config.ts +6 -0
  5. package/mini2.0-main 2/.editorconfig +0 -8
  6. package/mini2.0-main 2/.env.development +0 -3
  7. package/mini2.0-main 2/.env.production +0 -3
  8. package/mini2.0-main 2/.env.test +0 -3
  9. package/mini2.0-main 2/.gitattributes +0 -1
  10. package/mini2.0-main 2/.oxlintrc.json +0 -10
  11. package/mini2.0-main 2/.prettierrc.json +0 -6
  12. package/mini2.0-main 2/.vscode/extensions.json +0 -9
  13. package/mini2.0-main 2/README.md +0 -179
  14. package/mini2.0-main 2/auto-imports.d.ts +0 -629
  15. package/mini2.0-main 2/components.d.ts +0 -21
  16. package/mini2.0-main 2/docs/MX_API.md +0 -244
  17. package/mini2.0-main 2/docs/REQUEST.md +0 -217
  18. package/mini2.0-main 2/docs/jsapi.js +0 -515
  19. package/mini2.0-main 2/docs/package-json-guide.md +0 -132
  20. package/mini2.0-main 2/env.d.ts +0 -13
  21. package/mini2.0-main 2/eslint.config.ts +0 -26
  22. package/mini2.0-main 2/index.html +0 -16
  23. package/mini2.0-main 2/package-lock.json +0 -6442
  24. package/mini2.0-main 2/package.json +0 -66
  25. package/mini2.0-main 2/plugins/bump-version.ts +0 -61
  26. package/mini2.0-main 2/postcss.config.ts +0 -15
  27. package/mini2.0-main 2/public/favicon.ico +0 -0
  28. package/mini2.0-main 2/public/images/12a73787-86a9-4891-a65f-66104746f6a8.png +0 -0
  29. package/mini2.0-main 2/public/images/5798d7aa-ba8b-4605-8079-58b35495ac55.png +0 -0
  30. package/mini2.0-main 2/public/images/73fef1e4-0fd0-4a1a-9b8b-a70a5b6acbbc.png +0 -0
  31. package/mini2.0-main 2/public/images/bc685b4c-0cca-4a79-924c-a8ee10e6f8eb.png +0 -0
  32. package/mini2.0-main 2/public/images/c3dbbd9d-be56-490e-b9f4-6ee17ebefffc.png +0 -0
  33. package/mini2.0-main 2/public/images/ea745a10-42aa-4f44-8d7f-3ab02cc0adcd.png +0 -0
  34. package/mini2.0-main 2/public/images/f5876785-b927-4347-ba19-999114240649.png +0 -0
  35. package/mini2.0-main 2/public/images/img.png +0 -0
  36. package/mini2.0-main 2/src/App.vue +0 -11
  37. package/mini2.0-main 2/src/api/user.ts +0 -33
  38. package/mini2.0-main 2/src/auto-imports.d.ts +0 -639
  39. package/mini2.0-main 2/src/components.d.ts +0 -23
  40. package/mini2.0-main 2/src/config/config.properties +0 -3
  41. package/mini2.0-main 2/src/config/env.ts +0 -6
  42. package/mini2.0-main 2/src/config/plugin.properties.pro +0 -6
  43. package/mini2.0-main 2/src/config/plugin.properties.test +0 -6
  44. package/mini2.0-main 2/src/core/mxApi/index.ts +0 -217
  45. package/mini2.0-main 2/src/core/request/index.ts +0 -42
  46. package/mini2.0-main 2/src/main.ts +0 -28
  47. package/mini2.0-main 2/src/router/index.ts +0 -70
  48. package/mini2.0-main 2/src/stores/app.ts +0 -24
  49. package/mini2.0-main 2/src/stores/counter.ts +0 -12
  50. package/mini2.0-main 2/src/stores/user.ts +0 -52
  51. package/mini2.0-main 2/src/types/api.d.ts +0 -14
  52. package/mini2.0-main 2/src/types/nprogress.d.ts +0 -8
  53. package/mini2.0-main 2/src/utils/query.ts +0 -27
  54. package/mini2.0-main 2/src/utils/request.ts +0 -159
  55. package/mini2.0-main 2/src/views/clearing-detail/index.vue +0 -49
  56. package/mini2.0-main 2/src/views/foreign-position/index.vue +0 -49
  57. package/mini2.0-main 2/src/views/home/index.vue +0 -201
  58. package/mini2.0-main 2/src/views/login/index.vue +0 -196
  59. package/mini2.0-main 2/src/views/net-debit/index.vue +0 -49
  60. package/mini2.0-main 2/src/views/pbc-position/index.vue +0 -49
  61. package/mini2.0-main 2/src/views/position-estimate/index.vue +0 -49
  62. package/mini2.0-main 2/src/views/rmb-position/index.vue +0 -49
  63. package/mini2.0-main 2/src/views/warning/index.vue +0 -49
  64. package/mini2.0-main 2/tsconfig.app.json +0 -18
  65. package/mini2.0-main 2/tsconfig.json +0 -11
  66. package/mini2.0-main 2/tsconfig.node.json +0 -28
  67. package/mini2.0-main 2/vite.config.ts +0 -69
@@ -1,66 +0,0 @@
1
- {
2
- "name": "mini2.0",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "vite",
8
- "dev:test": "vite --mode test",
9
- "build": "run-p type-check \"build-only {@}\" --",
10
- "build:test": "run-s type-check build-only:test",
11
- "build:prod": "run-s type-check build-only:prod",
12
- "preview": "vite preview",
13
- "build-only": "vite build",
14
- "build-only:test": "vite build --mode test",
15
- "build-only:prod": "vite build --mode production",
16
- "type-check": "vue-tsc --build",
17
- "lint": "run-s lint:*",
18
- "lint:oxlint": "oxlint . --fix",
19
- "lint:eslint": "eslint . --fix --cache",
20
- "format": "prettier --write --experimental-cli src/"
21
- },
22
- "dependencies": {
23
- "@iconify/vue": "^5.0.1",
24
- "@vueuse/core": "^14.3.0",
25
- "adm-zip": "^0.5.17",
26
- "axios": "^1.16.1",
27
- "clipboard": "^2.0.11",
28
- "crypto-js": "^4.2.0",
29
- "dayjs": "^1.11.21",
30
- "nprogress": "^0.2.0",
31
- "pinia": "^3.0.4",
32
- "pinia-plugin-persistedstate": "^4.7.1",
33
- "qrcode": "^1.5.4",
34
- "vant": "^4.9.24",
35
- "vconsole": "^3.15.1",
36
- "vue": "^3.5.32",
37
- "vue-router": "^5.0.4"
38
- },
39
- "devDependencies": {
40
- "@tsconfig/node24": "^24.0.4",
41
- "@types/adm-zip": "^0.5.8",
42
- "@types/node": "^24.12.2",
43
- "@vitejs/plugin-vue": "^6.0.6",
44
- "@vue/eslint-config-typescript": "^14.7.0",
45
- "@vue/tsconfig": "^0.9.1",
46
- "eslint": "^10.2.1",
47
- "eslint-config-prettier": "^10.1.8",
48
- "eslint-plugin-oxlint": "~1.60.0",
49
- "eslint-plugin-vue": "~10.8.0",
50
- "jiti": "^2.6.1",
51
- "less": "^4.6.4",
52
- "npm-run-all2": "^8.0.4",
53
- "oxlint": "~1.60.0",
54
- "postcss-px-to-viewport-8-plugin": "^1.2.5",
55
- "prettier": "3.8.3",
56
- "typescript": "~6.0.0",
57
- "unplugin-auto-import": "^21.0.0",
58
- "unplugin-vue-components": "^32.1.0",
59
- "vite": "^8.0.8",
60
- "vite-plugin-vue-devtools": "^8.1.1",
61
- "vue-tsc": "^3.2.6"
62
- },
63
- "engines": {
64
- "node": "^20.19.0 || >=22.12.0"
65
- }
66
- }
@@ -1,61 +0,0 @@
1
- import { readFileSync, writeFileSync, cpSync, rmSync } from 'node:fs'
2
- import { resolve, basename } from 'node:path'
3
- import type { Plugin } from 'vite'
4
- import AdmZip from 'adm-zip'
5
-
6
- /**
7
- * 打包时自增版本号、复制配置文件、压缩 dist 为 zip
8
- */
9
- export function bumpVersion(mode: string): Plugin {
10
- return {
11
- name: 'bump-version-and-copy',
12
- writeBundle(options) {
13
- const outDir = options.dir
14
- if (!outDir) return
15
-
16
- const suffix = mode === 'production' ? 'pro' : 'test'
17
- const src = `src/config/plugin.properties.${suffix}`
18
-
19
- let content = readFileSync(src, 'utf-8')
20
- const match = content.match(/version_code=(\d+)/)
21
- if (!match) return
22
-
23
- const oldCode = Number(match[1])
24
- const newCode = oldCode + 1
25
-
26
- // 版本号规则:5位 version_code → 4位版本名
27
- // version_code: ABCDD A=major B=minor C=patch DD=hotfix
28
- // version_name: A.B.C.DD 示例 66102 → 6.6.1.02
29
- const major = Math.floor(newCode / 10000)
30
- const minor = Math.floor((newCode / 1000) % 10)
31
- const patch = Math.floor((newCode / 100) % 10)
32
- const hotfix = String(newCode % 100).padStart(2, '0')
33
- const versionName = `${major}.${minor}.${patch}.${hotfix}`
34
-
35
- content = content
36
- .replace(/version_code=\d+/, `version_code=${newCode}`)
37
- .replace(/version_name=[^;\n]+/, `version_name=${versionName}`)
38
-
39
- writeFileSync(src, content)
40
- writeFileSync(resolve(outDir, '..', 'plugin.properties'), content)
41
-
42
- // 复制 config.properties 到 dist/www/
43
- cpSync('src/config/config.properties', resolve(outDir, 'config.properties'))
44
-
45
- console.log(`[plugin.properties] version: ${oldCode} → ${newCode} (${versionName})`)
46
-
47
- // 压缩 dist 为 zip(使用 adm-zip,跨平台兼容)
48
- const distDir = resolve(outDir, '..')
49
- const zipName = `dist_${newCode}.zip`
50
- const zipPath = resolve(distDir, zipName)
51
- const zip = new AdmZip()
52
-
53
- zip.addLocalFolder(resolve(distDir, 'www'), 'www')
54
- zip.addLocalFile(resolve(distDir, 'plugin.properties'))
55
-
56
- rmSync(zipPath, { force: true })
57
- zip.writeZip(zipPath)
58
- console.log(`[zip] 已生成 ${basename(distDir)}/${zipName}`)
59
- },
60
- }
61
- }
@@ -1,15 +0,0 @@
1
- import pxToViewport from 'postcss-px-to-viewport-8-plugin'
2
-
3
- export default {
4
- plugins: [
5
- pxToViewport({
6
- viewportWidth: 375,
7
-
8
- viewportUnit: 'vw',
9
-
10
- unitPrecision: 6,
11
-
12
- minPixelValue: 2,
13
- }),
14
- ],
15
- }
Binary file
@@ -1,11 +0,0 @@
1
- <script setup lang="ts"></script>
2
-
3
- <template>
4
- <router-view v-slot="{ Component }">
5
- <keep-alive include="Home">
6
- <component :is="Component" />
7
- </keep-alive>
8
- </router-view>
9
- </template>
10
-
11
- <style scoped></style>
@@ -1,33 +0,0 @@
1
- import { request } from '@/core/request'
2
-
3
- interface UserInfo {
4
- id: number
5
- username: string
6
- avatar: string
7
- }
8
-
9
- export function getUserInfoApi(id: number) {
10
- return request<UserInfo>({ url: `/user/${id}` })
11
- }
12
-
13
- export function loginApi(data: { username: string; password: string }) {
14
- return request({
15
- url: '/uaa/oauth/token',
16
- method: 'POST',
17
- data,
18
- auth:{
19
- username: 'client',
20
- password: 'secret'
21
- }
22
- })
23
- }
24
-
25
- export function loginByAppTokenApi(appToken: string) {
26
- return request({
27
- url: '/uaa/oauth/token',
28
- method: 'POST',
29
- data: {
30
- token: appToken,
31
- }
32
- })
33
- }