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.
- package/design-qa.md +17 -9
- package/package.json +1 -1
- package/src/views/HomeView.vue +340 -172
- package/vite.config.ts +6 -0
- package/mini2.0-main 2/.editorconfig +0 -8
- package/mini2.0-main 2/.env.development +0 -3
- package/mini2.0-main 2/.env.production +0 -3
- package/mini2.0-main 2/.env.test +0 -3
- package/mini2.0-main 2/.gitattributes +0 -1
- package/mini2.0-main 2/.oxlintrc.json +0 -10
- package/mini2.0-main 2/.prettierrc.json +0 -6
- package/mini2.0-main 2/.vscode/extensions.json +0 -9
- package/mini2.0-main 2/README.md +0 -179
- package/mini2.0-main 2/auto-imports.d.ts +0 -629
- package/mini2.0-main 2/components.d.ts +0 -21
- package/mini2.0-main 2/docs/MX_API.md +0 -244
- package/mini2.0-main 2/docs/REQUEST.md +0 -217
- package/mini2.0-main 2/docs/jsapi.js +0 -515
- package/mini2.0-main 2/docs/package-json-guide.md +0 -132
- package/mini2.0-main 2/env.d.ts +0 -13
- package/mini2.0-main 2/eslint.config.ts +0 -26
- package/mini2.0-main 2/index.html +0 -16
- package/mini2.0-main 2/package-lock.json +0 -6442
- package/mini2.0-main 2/package.json +0 -66
- package/mini2.0-main 2/plugins/bump-version.ts +0 -61
- package/mini2.0-main 2/postcss.config.ts +0 -15
- package/mini2.0-main 2/public/favicon.ico +0 -0
- package/mini2.0-main 2/public/images/12a73787-86a9-4891-a65f-66104746f6a8.png +0 -0
- package/mini2.0-main 2/public/images/5798d7aa-ba8b-4605-8079-58b35495ac55.png +0 -0
- package/mini2.0-main 2/public/images/73fef1e4-0fd0-4a1a-9b8b-a70a5b6acbbc.png +0 -0
- package/mini2.0-main 2/public/images/bc685b4c-0cca-4a79-924c-a8ee10e6f8eb.png +0 -0
- package/mini2.0-main 2/public/images/c3dbbd9d-be56-490e-b9f4-6ee17ebefffc.png +0 -0
- package/mini2.0-main 2/public/images/ea745a10-42aa-4f44-8d7f-3ab02cc0adcd.png +0 -0
- package/mini2.0-main 2/public/images/f5876785-b927-4347-ba19-999114240649.png +0 -0
- package/mini2.0-main 2/public/images/img.png +0 -0
- package/mini2.0-main 2/src/App.vue +0 -11
- package/mini2.0-main 2/src/api/user.ts +0 -33
- package/mini2.0-main 2/src/auto-imports.d.ts +0 -639
- package/mini2.0-main 2/src/components.d.ts +0 -23
- package/mini2.0-main 2/src/config/config.properties +0 -3
- package/mini2.0-main 2/src/config/env.ts +0 -6
- package/mini2.0-main 2/src/config/plugin.properties.pro +0 -6
- package/mini2.0-main 2/src/config/plugin.properties.test +0 -6
- package/mini2.0-main 2/src/core/mxApi/index.ts +0 -217
- package/mini2.0-main 2/src/core/request/index.ts +0 -42
- package/mini2.0-main 2/src/main.ts +0 -28
- package/mini2.0-main 2/src/router/index.ts +0 -70
- package/mini2.0-main 2/src/stores/app.ts +0 -24
- package/mini2.0-main 2/src/stores/counter.ts +0 -12
- package/mini2.0-main 2/src/stores/user.ts +0 -52
- package/mini2.0-main 2/src/types/api.d.ts +0 -14
- package/mini2.0-main 2/src/types/nprogress.d.ts +0 -8
- package/mini2.0-main 2/src/utils/query.ts +0 -27
- package/mini2.0-main 2/src/utils/request.ts +0 -159
- package/mini2.0-main 2/src/views/clearing-detail/index.vue +0 -49
- package/mini2.0-main 2/src/views/foreign-position/index.vue +0 -49
- package/mini2.0-main 2/src/views/home/index.vue +0 -201
- package/mini2.0-main 2/src/views/login/index.vue +0 -196
- package/mini2.0-main 2/src/views/net-debit/index.vue +0 -49
- package/mini2.0-main 2/src/views/pbc-position/index.vue +0 -49
- package/mini2.0-main 2/src/views/position-estimate/index.vue +0 -49
- package/mini2.0-main 2/src/views/rmb-position/index.vue +0 -49
- package/mini2.0-main 2/src/views/warning/index.vue +0 -49
- package/mini2.0-main 2/tsconfig.app.json +0 -18
- package/mini2.0-main 2/tsconfig.json +0 -11
- package/mini2.0-main 2/tsconfig.node.json +0 -28
- 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
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
-
}
|