minitest2.0 0.0.0
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/.editorconfig +8 -0
- package/.env.development +3 -0
- package/.env.production +3 -0
- package/.env.test +3 -0
- package/.gitattributes +1 -0
- package/.oxlintrc.json +10 -0
- package/.prettierrc.json +6 -0
- package/.vscode/extensions.json +9 -0
- package/.vscode/settings.json +13 -0
- package/README.md +179 -0
- package/auto-imports.d.ts +629 -0
- package/components.d.ts +21 -0
- package/design-qa.md +36 -0
- package/docs/MX_API.md +244 -0
- package/docs/REQUEST.md +217 -0
- package/docs/jsapi.js +515 -0
- package/docs/package-json-guide.md +132 -0
- package/env.d.ts +15 -0
- package/eslint.config.ts +26 -0
- package/index.html +16 -0
- package/package.json +83 -0
- package/plugins/bump-version.ts +61 -0
- package/postcss.config.ts +15 -0
- package/public/favicon.ico +0 -0
- package/public/images/12a73787-86a9-4891-a65f-66104746f6a8.png +0 -0
- package/public/images/5798d7aa-ba8b-4605-8079-58b35495ac55.png +0 -0
- package/public/images/73fef1e4-0fd0-4a1a-9b8b-a70a5b6acbbc.png +0 -0
- package/public/images/bc685b4c-0cca-4a79-924c-a8ee10e6f8eb.png +0 -0
- package/public/images/c3dbbd9d-be56-490e-b9f4-6ee17ebefffc.png +0 -0
- package/public/images/ea745a10-42aa-4f44-8d7f-3ab02cc0adcd.png +0 -0
- package/public/images/f5876785-b927-4347-ba19-999114240649.png +0 -0
- package/public/images/img.png +0 -0
- package/public/images/opening-reserve-estimate.png +0 -0
- package/public/images/position-estimate-report.png +0 -0
- package/src/App.vue +131 -0
- package/src/api/announcement.ts +405 -0
- package/src/api/health.ts +13 -0
- package/src/api/pbc-position.ts +178 -0
- package/src/api/rmb-position.ts +233 -0
- package/src/api/tam.ts +173 -0
- package/src/api/user.ts +92 -0
- package/src/auto-imports.d.ts +633 -0
- package/src/components/AppTitleBar.vue +376 -0
- package/src/components.d.ts +33 -0
- package/src/config/config.properties +3 -0
- package/src/config/env.ts +6 -0
- package/src/config/plugin.properties.pro +6 -0
- package/src/config/plugin.properties.test +6 -0
- package/src/core/mxApi/index.ts +451 -0
- package/src/core/request/index.ts +135 -0
- package/src/main.ts +40 -0
- package/src/router/index.ts +144 -0
- package/src/stores/app.ts +103 -0
- package/src/stores/counter.ts +12 -0
- package/src/stores/user.ts +137 -0
- package/src/styles/nprogress.css +22 -0
- package/src/styles/vant-overrides.css +42 -0
- package/src/types/api.d.ts +14 -0
- package/src/types/nprogress.d.ts +8 -0
- package/src/utils/auth-token.ts +241 -0
- package/src/utils/code-highlight.ts +165 -0
- package/src/utils/copy.ts +36 -0
- package/src/utils/query.ts +27 -0
- package/src/utils/request.ts +238 -0
- package/src/utils/rmb-forecast.ts +84 -0
- package/src/utils/toast.ts +61 -0
- package/src/views/article-detail/index.vue +289 -0
- package/src/views/article-edit/index.vue +600 -0
- package/src/views/articles/index.vue +293 -0
- package/src/views/clearing-detail/index.vue +26 -0
- package/src/views/dashboard/index.vue +18 -0
- package/src/views/foreign-position/index.vue +26 -0
- package/src/views/home/index.vue +213 -0
- package/src/views/login/index.vue +275 -0
- package/src/views/mine/index.vue +147 -0
- package/src/views/net-debit/index.vue +26 -0
- package/src/views/opening-reserve-estimate/index.vue +28 -0
- package/src/views/pbc-position/index.vue +357 -0
- package/src/views/position-estimate/index.vue +67 -0
- package/src/views/position-estimate-report/index.vue +28 -0
- package/src/views/rmb-position/index.vue +1013 -0
- package/src/views/rmb-position-create/index.vue +221 -0
- package/src/views/rmb-position-detail/index.vue +355 -0
- package/src/views/settings/index.vue +67 -0
- package/src/views/warning/index.vue +26 -0
- package/tsconfig.app.json +18 -0
- package/tsconfig.json +11 -0
- package/tsconfig.node.json +28 -0
- package/vite.config.ts +100 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { closeWindow, hideWebViewTitle } from '@/core/mxApi'
|
|
3
|
+
|
|
4
|
+
defineOptions({ name: 'AppTitleBar' })
|
|
5
|
+
|
|
6
|
+
withDefaults(
|
|
7
|
+
defineProps<{
|
|
8
|
+
title?: string
|
|
9
|
+
showBack?: boolean
|
|
10
|
+
backAriaLabel?: string
|
|
11
|
+
}>(),
|
|
12
|
+
{
|
|
13
|
+
title: '公告',
|
|
14
|
+
showBack: true,
|
|
15
|
+
backAriaLabel: '返回',
|
|
16
|
+
},
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
const emit = defineEmits<{
|
|
20
|
+
back: []
|
|
21
|
+
capsuleMore: []
|
|
22
|
+
capsuleClose: []
|
|
23
|
+
menuHome: []
|
|
24
|
+
menuSettings: []
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const capsuleMenuOpen = ref(false)
|
|
28
|
+
const capsuleMenuRef = ref<HTMLElement | null>(null)
|
|
29
|
+
|
|
30
|
+
onMounted(() => {
|
|
31
|
+
hideWebViewTitle()
|
|
32
|
+
document.addEventListener('pointerdown', handleDocumentPointerDown)
|
|
33
|
+
document.addEventListener('keydown', handleDocumentKeydown)
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
onBeforeUnmount(() => {
|
|
37
|
+
document.removeEventListener('pointerdown', handleDocumentPointerDown)
|
|
38
|
+
document.removeEventListener('keydown', handleDocumentKeydown)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
function handleCapsuleClose() {
|
|
42
|
+
closeCapsuleMenu()
|
|
43
|
+
emit('capsuleClose')
|
|
44
|
+
closeWindow()
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function toggleCapsuleMenu() {
|
|
48
|
+
capsuleMenuOpen.value = !capsuleMenuOpen.value
|
|
49
|
+
emit('capsuleMore')
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function closeCapsuleMenu() {
|
|
53
|
+
capsuleMenuOpen.value = false
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function handleMenuHome() {
|
|
57
|
+
closeCapsuleMenu()
|
|
58
|
+
emit('menuHome')
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function handleMenuSettings() {
|
|
62
|
+
closeCapsuleMenu()
|
|
63
|
+
emit('menuSettings')
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function handleDocumentPointerDown(event: PointerEvent) {
|
|
67
|
+
const target = event.target
|
|
68
|
+
|
|
69
|
+
if (!(target instanceof Node) || capsuleMenuRef.value?.contains(target)) {
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
closeCapsuleMenu()
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function handleDocumentKeydown(event: KeyboardEvent) {
|
|
77
|
+
if (event.key === 'Escape') {
|
|
78
|
+
closeCapsuleMenu()
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<header class="app-title-bar">
|
|
85
|
+
<div class="app-title-bar__inner">
|
|
86
|
+
<button
|
|
87
|
+
v-if="showBack"
|
|
88
|
+
class="app-title-bar__back"
|
|
89
|
+
type="button"
|
|
90
|
+
:aria-label="backAriaLabel"
|
|
91
|
+
@click="emit('back')"
|
|
92
|
+
>
|
|
93
|
+
<van-icon name="arrow-left" />
|
|
94
|
+
</button>
|
|
95
|
+
|
|
96
|
+
<h1 class="app-title-bar__title">{{ title }}</h1>
|
|
97
|
+
|
|
98
|
+
<div ref="capsuleMenuRef" class="app-title-bar__capsule-area">
|
|
99
|
+
<div class="app-title-bar__capsule" role="group" aria-label="页面操作">
|
|
100
|
+
<button
|
|
101
|
+
class="app-title-bar__capsule-btn"
|
|
102
|
+
type="button"
|
|
103
|
+
aria-label="更多"
|
|
104
|
+
aria-haspopup="menu"
|
|
105
|
+
:aria-expanded="capsuleMenuOpen"
|
|
106
|
+
@click="toggleCapsuleMenu"
|
|
107
|
+
>
|
|
108
|
+
<span class="app-title-bar__dots" aria-hidden="true">
|
|
109
|
+
<i></i>
|
|
110
|
+
<i></i>
|
|
111
|
+
<i></i>
|
|
112
|
+
</span>
|
|
113
|
+
</button>
|
|
114
|
+
<span class="app-title-bar__divider" aria-hidden="true"></span>
|
|
115
|
+
<button
|
|
116
|
+
class="app-title-bar__capsule-btn"
|
|
117
|
+
type="button"
|
|
118
|
+
aria-label="关闭"
|
|
119
|
+
@click="handleCapsuleClose"
|
|
120
|
+
>
|
|
121
|
+
<span class="app-title-bar__circle" aria-hidden="true"></span>
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<transition name="app-title-bar-menu">
|
|
126
|
+
<div v-if="capsuleMenuOpen" class="app-title-bar__menu" role="menu" aria-label="更多菜单">
|
|
127
|
+
<button
|
|
128
|
+
class="app-title-bar__menu-item"
|
|
129
|
+
type="button"
|
|
130
|
+
role="menuitem"
|
|
131
|
+
@click="handleMenuHome"
|
|
132
|
+
>
|
|
133
|
+
<van-icon name="wap-home-o" />
|
|
134
|
+
<span>回到首页</span>
|
|
135
|
+
</button>
|
|
136
|
+
<button
|
|
137
|
+
class="app-title-bar__menu-item"
|
|
138
|
+
type="button"
|
|
139
|
+
role="menuitem"
|
|
140
|
+
@click="handleMenuSettings"
|
|
141
|
+
>
|
|
142
|
+
<van-icon name="setting-o" />
|
|
143
|
+
<span>设置</span>
|
|
144
|
+
</button>
|
|
145
|
+
</div>
|
|
146
|
+
</transition>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</header>
|
|
150
|
+
</template>
|
|
151
|
+
|
|
152
|
+
<style scoped>
|
|
153
|
+
.app-title-bar {
|
|
154
|
+
position: sticky;
|
|
155
|
+
top: 0;
|
|
156
|
+
z-index: 20;
|
|
157
|
+
width: 100%;
|
|
158
|
+
height: calc(50px + env(safe-area-inset-top));
|
|
159
|
+
padding-top: env(safe-area-inset-top);
|
|
160
|
+
border-bottom: 1px solid #f0f1f3;
|
|
161
|
+
color: #171b20;
|
|
162
|
+
background: #ffffff;
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.app-title-bar__inner {
|
|
167
|
+
position: relative;
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
width: 100%;
|
|
172
|
+
max-width: 750px;
|
|
173
|
+
height: 50px;
|
|
174
|
+
margin: 0 auto;
|
|
175
|
+
padding: 0 10px;
|
|
176
|
+
box-sizing: border-box;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.app-title-bar__back,
|
|
180
|
+
.app-title-bar__capsule-btn {
|
|
181
|
+
border: 0;
|
|
182
|
+
padding: 0;
|
|
183
|
+
font: inherit;
|
|
184
|
+
background: transparent;
|
|
185
|
+
appearance: none;
|
|
186
|
+
cursor: pointer;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.app-title-bar__back {
|
|
190
|
+
position: absolute;
|
|
191
|
+
left: 10px;
|
|
192
|
+
top: 50%;
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
width: 36px;
|
|
197
|
+
height: 36px;
|
|
198
|
+
border-radius: 50%;
|
|
199
|
+
color: #171b20;
|
|
200
|
+
font-size: 22px;
|
|
201
|
+
transform: translateY(-50%);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.app-title-bar__back:active {
|
|
205
|
+
background: rgba(23, 27, 32, 0.06);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.app-title-bar__title {
|
|
209
|
+
position: absolute;
|
|
210
|
+
left: 106px;
|
|
211
|
+
right: 106px;
|
|
212
|
+
margin: 0;
|
|
213
|
+
overflow: hidden;
|
|
214
|
+
color: #171b20;
|
|
215
|
+
font-size: 17px;
|
|
216
|
+
font-weight: 700;
|
|
217
|
+
line-height: 1.2;
|
|
218
|
+
text-align: center;
|
|
219
|
+
text-overflow: ellipsis;
|
|
220
|
+
white-space: nowrap;
|
|
221
|
+
pointer-events: none;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.app-title-bar__capsule-area {
|
|
225
|
+
position: absolute;
|
|
226
|
+
right: 10px;
|
|
227
|
+
top: 50%;
|
|
228
|
+
z-index: 2;
|
|
229
|
+
width: 88px;
|
|
230
|
+
transform: translateY(-50%);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.app-title-bar__capsule {
|
|
234
|
+
display: flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
width: 88px;
|
|
237
|
+
height: 32px;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
border: 1px solid rgba(23, 27, 32, 0.12);
|
|
240
|
+
border-radius: 999px;
|
|
241
|
+
background: rgba(255, 255, 255, 0.82);
|
|
242
|
+
box-shadow:
|
|
243
|
+
0 6px 18px rgba(23, 27, 32, 0.08),
|
|
244
|
+
inset 0 0 0 0.5px rgba(255, 255, 255, 0.82);
|
|
245
|
+
backdrop-filter: blur(10px);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.app-title-bar__capsule-btn {
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
justify-content: center;
|
|
252
|
+
width: 43px;
|
|
253
|
+
height: 100%;
|
|
254
|
+
color: #171b20;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.app-title-bar__capsule-btn:active {
|
|
258
|
+
background: rgba(23, 27, 32, 0.06);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.app-title-bar__divider {
|
|
262
|
+
width: 1px;
|
|
263
|
+
height: 18px;
|
|
264
|
+
background: rgba(23, 27, 32, 0.12);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.app-title-bar__dots {
|
|
268
|
+
display: flex;
|
|
269
|
+
align-items: center;
|
|
270
|
+
gap: 4px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.app-title-bar__dots i {
|
|
274
|
+
width: 4px;
|
|
275
|
+
height: 4px;
|
|
276
|
+
border-radius: 50%;
|
|
277
|
+
background: #171b20;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.app-title-bar__circle {
|
|
281
|
+
position: relative;
|
|
282
|
+
width: 18px;
|
|
283
|
+
height: 18px;
|
|
284
|
+
border: 2px solid #171b20;
|
|
285
|
+
border-radius: 50%;
|
|
286
|
+
box-sizing: border-box;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.app-title-bar__circle::after {
|
|
290
|
+
position: absolute;
|
|
291
|
+
left: 50%;
|
|
292
|
+
top: 50%;
|
|
293
|
+
width: 6px;
|
|
294
|
+
height: 6px;
|
|
295
|
+
border-radius: 50%;
|
|
296
|
+
background: #171b20;
|
|
297
|
+
content: '';
|
|
298
|
+
transform: translate(-50%, -50%);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.app-title-bar__menu {
|
|
302
|
+
position: absolute;
|
|
303
|
+
top: 40px;
|
|
304
|
+
right: 0;
|
|
305
|
+
width: 126px;
|
|
306
|
+
padding: 6px;
|
|
307
|
+
border: 1px solid rgba(23, 27, 32, 0.08);
|
|
308
|
+
border-radius: 8px;
|
|
309
|
+
background: #ffffff;
|
|
310
|
+
box-shadow: 0 12px 28px rgba(23, 27, 32, 0.14);
|
|
311
|
+
box-sizing: border-box;
|
|
312
|
+
transform-origin: 78px 0;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.app-title-bar__menu::before {
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: -5px;
|
|
318
|
+
right: 58px;
|
|
319
|
+
width: 10px;
|
|
320
|
+
height: 10px;
|
|
321
|
+
border-top: 1px solid rgba(23, 27, 32, 0.08);
|
|
322
|
+
border-left: 1px solid rgba(23, 27, 32, 0.08);
|
|
323
|
+
background: #ffffff;
|
|
324
|
+
content: '';
|
|
325
|
+
transform: rotate(45deg);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.app-title-bar__menu-item {
|
|
329
|
+
position: relative;
|
|
330
|
+
z-index: 1;
|
|
331
|
+
display: flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
gap: 8px;
|
|
334
|
+
width: 100%;
|
|
335
|
+
min-height: 40px;
|
|
336
|
+
border: 0;
|
|
337
|
+
border-radius: 6px;
|
|
338
|
+
padding: 0 10px;
|
|
339
|
+
color: #171b20;
|
|
340
|
+
font: inherit;
|
|
341
|
+
font-size: 14px;
|
|
342
|
+
line-height: 1;
|
|
343
|
+
white-space: nowrap;
|
|
344
|
+
background: transparent;
|
|
345
|
+
appearance: none;
|
|
346
|
+
cursor: pointer;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.app-title-bar__menu-item:active {
|
|
350
|
+
background: rgba(242, 47, 61, 0.08);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.app-title-bar__menu-item + .app-title-bar__menu-item {
|
|
354
|
+
margin-top: 2px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.app-title-bar-menu-enter-active,
|
|
358
|
+
.app-title-bar-menu-leave-active {
|
|
359
|
+
transition:
|
|
360
|
+
opacity 0.14s ease,
|
|
361
|
+
transform 0.14s ease;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.app-title-bar-menu-enter-from,
|
|
365
|
+
.app-title-bar-menu-leave-to {
|
|
366
|
+
opacity: 0;
|
|
367
|
+
transform: translateY(-4px) scale(0.98);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
@media (max-width: 360px) {
|
|
371
|
+
.app-title-bar__title {
|
|
372
|
+
left: 58px;
|
|
373
|
+
right: 106px;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// biome-ignore lint: disable
|
|
4
|
+
// oxlint-disable
|
|
5
|
+
// ------
|
|
6
|
+
// Generated by unplugin-vue-components
|
|
7
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
|
8
|
+
|
|
9
|
+
export {}
|
|
10
|
+
|
|
11
|
+
/* prettier-ignore */
|
|
12
|
+
declare module 'vue' {
|
|
13
|
+
export interface GlobalComponents {
|
|
14
|
+
AppTitleBar: typeof import('./components/AppTitleBar.vue')['default']
|
|
15
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
|
16
|
+
RouterView: typeof import('vue-router')['RouterView']
|
|
17
|
+
VanButton: typeof import('vant/es')['Button']
|
|
18
|
+
VanCell: typeof import('vant/es')['Cell']
|
|
19
|
+
VanCellGroup: typeof import('vant/es')['CellGroup']
|
|
20
|
+
VanDatePicker: typeof import('vant/es')['DatePicker']
|
|
21
|
+
VanEmpty: typeof import('vant/es')['Empty']
|
|
22
|
+
VanField: typeof import('vant/es')['Field']
|
|
23
|
+
VanForm: typeof import('vant/es')['Form']
|
|
24
|
+
VanIcon: typeof import('vant/es')['Icon']
|
|
25
|
+
VanList: typeof import('vant/es')['List']
|
|
26
|
+
VanLoading: typeof import('vant/es')['Loading']
|
|
27
|
+
VanPopup: typeof import('vant/es')['Popup']
|
|
28
|
+
VanSearch: typeof import('vant/es')['Search']
|
|
29
|
+
VanSwitch: typeof import('vant/es')['Switch']
|
|
30
|
+
VanTabbar: typeof import('vant/es')['Tabbar']
|
|
31
|
+
VanTabbarItem: typeof import('vant/es')['TabbarItem']
|
|
32
|
+
}
|
|
33
|
+
}
|