verce-vue-test 0.0.59 → 0.0.61

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 (40) hide show
  1. package/mini2.0-main/.playwright-cli/page-2026-07-07T07-17-06-007Z.yml +61 -0
  2. package/mini2.0-main/.playwright-cli/page-2026-07-07T07-18-36-454Z.yml +0 -0
  3. package/mini2.0-main/.playwright-cli/page-2026-07-07T07-18-47-595Z.yml +66 -0
  4. package/mini2.0-main/.playwright-cli/page-2026-07-07T07-18-59-176Z.yml +0 -0
  5. package/mini2.0-main/src/App.vue +65 -12
  6. package/mini2.0-main/src/api/pbc-position.ts +12 -4
  7. package/mini2.0-main/src/auto-imports.d.ts +0 -6
  8. package/mini2.0-main/src/components/AppTitleBar.vue +173 -24
  9. package/mini2.0-main/src/main.ts +1 -0
  10. package/mini2.0-main/src/router/index.ts +25 -0
  11. package/mini2.0-main/src/stores/app.ts +10 -1
  12. package/mini2.0-main/src/stores/user.ts +1 -1
  13. package/mini2.0-main/src/styles/nprogress.css +22 -0
  14. package/mini2.0-main/src/styles/vant-overrides.css +42 -0
  15. package/mini2.0-main/src/utils/request.ts +6 -5
  16. package/mini2.0-main/src/utils/toast.ts +61 -0
  17. package/mini2.0-main/src/views/article-detail/index.vue +5 -4
  18. package/mini2.0-main/src/views/article-edit/index.vue +8 -7
  19. package/mini2.0-main/src/views/articles/index.vue +2 -3
  20. package/mini2.0-main/src/views/clearing-detail/index.vue +1 -1
  21. package/mini2.0-main/src/views/dashboard/index.vue +18 -0
  22. package/mini2.0-main/src/views/foreign-position/index.vue +1 -1
  23. package/mini2.0-main/src/views/home/index.vue +1 -1
  24. package/mini2.0-main/src/views/login/index.vue +6 -6
  25. package/mini2.0-main/src/views/mine/index.vue +5 -6
  26. package/mini2.0-main/src/views/net-debit/index.vue +1 -1
  27. package/mini2.0-main/src/views/opening-reserve-estimate/index.vue +28 -0
  28. package/mini2.0-main/src/views/pbc-position/index.vue +22 -23
  29. package/mini2.0-main/src/views/position-estimate/index.vue +59 -11
  30. package/mini2.0-main/src/views/position-estimate-report/index.vue +28 -0
  31. package/mini2.0-main/src/views/rmb-position/index.vue +199 -57
  32. package/mini2.0-main/src/views/rmb-position-create/index.vue +6 -5
  33. package/mini2.0-main/src/views/rmb-position-detail/index.vue +3 -2
  34. package/mini2.0-main/src/views/settings/index.vue +13 -3
  35. package/mini2.0-main/src/views/warning/index.vue +1 -1
  36. package/mini2.0-main/vite.config.ts +1 -7
  37. package/package.json +1 -1
  38. package/src/router/index.ts +0 -1
  39. package/src/views/PositionForecastExecutionView.vue +361 -385
  40. package/src/views/PositionForecastView.vue +19 -22
@@ -0,0 +1,61 @@
1
+ - generic [active] [ref=e1]:
2
+ - generic [ref=e3]:
3
+ - banner [ref=e4]:
4
+ - generic [ref=e5]:
5
+ - heading "头寸管理平台" [level=1]
6
+ - group "页面操作" [ref=e9]:
7
+ - button "更多" [ref=e10] [cursor=pointer]
8
+ - button "关闭" [ref=e16] [cursor=pointer]
9
+ - main [ref=e82]:
10
+ - region "欢迎登录头寸管理系统" [ref=e83]:
11
+ - img "欢迎登录头寸管理系统" [ref=e84]
12
+ - generic [ref=e85]:
13
+ - heading "常用功能" [level=2] [ref=e88]
14
+ - generic [ref=e89]:
15
+ - button "人民币头寸 预报及查询 人民币头寸预报及查询" [ref=e90]:
16
+ - generic [ref=e91]:
17
+ - generic [ref=e92]: 人民币头寸
18
+ - generic [ref=e93]: 预报及查询
19
+ - generic [ref=e95]: 
20
+ - img "人民币头寸预报及查询"
21
+ - button "外币头寸 预报及查询 外币头寸预报及查询" [ref=e96]:
22
+ - generic [ref=e97]:
23
+ - generic [ref=e98]: 外币头寸
24
+ - generic [ref=e99]: 预报及查询
25
+ - generic [ref=e101]: 
26
+ - img "外币头寸预报及查询"
27
+ - button "人行头寸 余额查询 人行头寸余额查询" [ref=e102]:
28
+ - generic [ref=e103]:
29
+ - generic [ref=e104]: 人行头寸
30
+ - generic [ref=e105]: 余额查询
31
+ - generic [ref=e107]: 
32
+ - img "人行头寸余额查询"
33
+ - button "头寸匡算 头寸匡算" [ref=e108]:
34
+ - generic [ref=e110]: 头寸匡算
35
+ - generic [ref=e112]: 
36
+ - img "头寸匡算"
37
+ - button "人民币净借记 可用额度管理 人民币净借记可用额度管理" [ref=e113]:
38
+ - generic [ref=e114]:
39
+ - generic [ref=e115]: 人民币净借记
40
+ - generic [ref=e116]: 可用额度管理
41
+ - generic [ref=e118]: 
42
+ - img "人民币净借记可用额度管理"
43
+ - button "人民币小额网银 清算场次明细 人民币小额网银清算场次明细" [ref=e119]:
44
+ - generic [ref=e120]:
45
+ - generic [ref=e121]: 人民币小额网银
46
+ - generic [ref=e122]: 清算场次明细
47
+ - generic [ref=e124]: 
48
+ - img "人民币小额网银清算场次明细"
49
+ - button "预警信息 预警信息" [ref=e125]:
50
+ - generic [ref=e127]: 预警信息
51
+ - generic [ref=e129]: 
52
+ - img "预警信息"
53
+ - tablist [ref=e131]:
54
+ - tab " 首页" [selected] [ref=e132] [cursor=pointer]:
55
+ - generic [ref=e134]: 
56
+ - generic [ref=e135]: 首页
57
+ - tab " 我的" [ref=e136] [cursor=pointer]:
58
+ - generic [ref=e138]: 
59
+ - generic [ref=e139]: 我的
60
+ - dialog [ref=e76]:
61
+ - generic [ref=e77]: 连接错误 502
@@ -0,0 +1,66 @@
1
+ - generic [ref=e3]:
2
+ - banner [ref=e4]:
3
+ - generic [ref=e5]:
4
+ - heading "头寸管理平台" [level=1]
5
+ - generic [ref=e6]:
6
+ - group "页面操作" [ref=e7]:
7
+ - button "更多" [expanded] [active] [ref=e8] [cursor=pointer]
8
+ - button "关闭" [ref=e14] [cursor=pointer]
9
+ - menu "更多菜单" [ref=e76]:
10
+ - menuitem " 回到首页" [ref=e77] [cursor=pointer]:
11
+ - generic [ref=e78]: 
12
+ - generic [ref=e79]: 回到首页
13
+ - menuitem " 设置" [ref=e80] [cursor=pointer]:
14
+ - generic [ref=e81]: 
15
+ - generic [ref=e82]: 设置
16
+ - main [ref=e16]:
17
+ - region "欢迎登录头寸管理系统" [ref=e17]:
18
+ - img "欢迎登录头寸管理系统" [ref=e18]
19
+ - generic [ref=e19]:
20
+ - heading "常用功能" [level=2] [ref=e22]
21
+ - generic [ref=e23]:
22
+ - button "人民币头寸 预报及查询 人民币头寸预报及查询" [ref=e24]:
23
+ - generic [ref=e25]:
24
+ - generic [ref=e26]: 人民币头寸
25
+ - generic [ref=e27]: 预报及查询
26
+ - generic [ref=e29]: 
27
+ - img "人民币头寸预报及查询"
28
+ - button "外币头寸 预报及查询 外币头寸预报及查询" [ref=e30]:
29
+ - generic [ref=e31]:
30
+ - generic [ref=e32]: 外币头寸
31
+ - generic [ref=e33]: 预报及查询
32
+ - generic [ref=e35]: 
33
+ - img "外币头寸预报及查询"
34
+ - button "人行头寸 余额查询 人行头寸余额查询" [ref=e36]:
35
+ - generic [ref=e37]:
36
+ - generic [ref=e38]: 人行头寸
37
+ - generic [ref=e39]: 余额查询
38
+ - generic [ref=e41]: 
39
+ - img "人行头寸余额查询"
40
+ - button "头寸匡算 头寸匡算" [ref=e42]:
41
+ - generic [ref=e44]: 头寸匡算
42
+ - generic [ref=e46]: 
43
+ - img "头寸匡算"
44
+ - button "人民币净借记 可用额度管理 人民币净借记可用额度管理" [ref=e47]:
45
+ - generic [ref=e48]:
46
+ - generic [ref=e49]: 人民币净借记
47
+ - generic [ref=e50]: 可用额度管理
48
+ - generic [ref=e52]: 
49
+ - img "人民币净借记可用额度管理"
50
+ - button "人民币小额网银 清算场次明细 人民币小额网银清算场次明细" [ref=e53]:
51
+ - generic [ref=e54]:
52
+ - generic [ref=e55]: 人民币小额网银
53
+ - generic [ref=e56]: 清算场次明细
54
+ - generic [ref=e58]: 
55
+ - img "人民币小额网银清算场次明细"
56
+ - button "预警信息 预警信息" [ref=e59]:
57
+ - generic [ref=e61]: 预警信息
58
+ - generic [ref=e63]: 
59
+ - img "预警信息"
60
+ - tablist [ref=e65]:
61
+ - tab " 首页" [selected] [ref=e66] [cursor=pointer]:
62
+ - generic [ref=e68]: 
63
+ - generic [ref=e69]: 首页
64
+ - tab " 我的" [ref=e70] [cursor=pointer]:
65
+ - generic [ref=e72]: 
66
+ - generic [ref=e73]: 我的
@@ -8,32 +8,59 @@ const appStore = useAppStore()
8
8
 
9
9
  const baseTabItems = [
10
10
  { title: '首页', path: '/', icon: 'wap-home-o' },
11
+ { title: '看板', path: '/dashboard', icon: 'chart-trending-o' },
11
12
  { title: '公告', path: '/articles', icon: 'records-o' },
12
13
  { title: '我的', path: '/mine', icon: 'manager-o' },
13
14
  ]
14
15
 
15
16
  const tabItems = computed(() =>
16
- baseTabItems.filter((item) => item.path !== '/articles' || appStore.showAnnouncementTab),
17
+ baseTabItems.filter((item) => {
18
+ if (item.path === '/dashboard') return appStore.showDashboardTab
19
+ if (item.path === '/articles') return appStore.showAnnouncementTab
20
+
21
+ return true
22
+ }),
17
23
  )
18
24
 
19
25
  const showTabbar = computed(() => route.meta.hideTabbar !== true)
20
- const noBackRouteNames = new Set(['Home', 'Login', 'Articles', 'Mine'])
26
+ const noBackRouteNames = new Set(['Home', 'Login', 'Dashboard', 'Articles', 'Mine'])
21
27
  const headerTitle = computed(() => String(route.meta.title || ''))
22
28
  const showHeaderBack = computed(() => !noBackRouteNames.has(String(route.name || '')))
23
29
 
24
- const activeTab = computed({
25
- get: () => route.path,
26
- set: (path: string) => {
27
- if (path !== route.path) {
28
- router.push(path)
29
- }
30
- },
30
+ const activeTab = computed(() => {
31
+ const currentPath = route.path
32
+
33
+ return tabItems.value.some((item) => item.path === currentPath) ? currentPath : ''
31
34
  })
35
+
36
+ function switchTab(path: string) {
37
+ if (path !== route.path) {
38
+ router.push(path)
39
+ }
40
+ }
41
+
42
+ function goHomeFromCapsuleMenu() {
43
+ if (route.name !== 'Home') {
44
+ router.replace({ name: 'Home' })
45
+ }
46
+ }
47
+
48
+ function goSettingsFromCapsuleMenu() {
49
+ if (route.name !== 'Settings') {
50
+ router.push({ name: 'Settings' })
51
+ }
52
+ }
32
53
  </script>
33
54
 
34
55
  <template>
35
- <div class="app-shell">
36
- <AppTitleBar :title="headerTitle" :show-back="showHeaderBack" @back="router.back()" />
56
+ <div class="app-shell" :class="{ 'app-shell--with-tabbar': showTabbar }">
57
+ <AppTitleBar
58
+ :title="headerTitle"
59
+ :show-back="showHeaderBack"
60
+ @back="router.back()"
61
+ @menu-home="goHomeFromCapsuleMenu"
62
+ @menu-settings="goSettingsFromCapsuleMenu"
63
+ />
37
64
 
38
65
  <router-view v-slot="{ Component }">
39
66
  <keep-alive include="HomePage">
@@ -41,12 +68,13 @@ const activeTab = computed({
41
68
  </keep-alive>
42
69
  </router-view>
43
70
 
44
- <van-tabbar v-if="showTabbar" v-model="activeTab" fixed placeholder safe-area-inset-bottom>
71
+ <van-tabbar v-if="showTabbar" :model-value="activeTab" fixed placeholder safe-area-inset-bottom>
45
72
  <van-tabbar-item
46
73
  v-for="item in tabItems"
47
74
  :key="item.path"
48
75
  :name="item.path"
49
76
  :icon="item.icon"
77
+ @click="switchTab(item.path)"
50
78
  >
51
79
  {{ item.title }}
52
80
  </van-tabbar-item>
@@ -56,10 +84,35 @@ const activeTab = computed({
56
84
 
57
85
  <style scoped>
58
86
  .app-shell {
87
+ --app-title-bar-height: calc(50px + env(safe-area-inset-top, 0px));
88
+ --app-tabbar-height: calc(
89
+ var(--van-tabbar-height, 50px) + env(safe-area-inset-bottom, 0px) + var(--van-border-width, 1px)
90
+ );
91
+ --app-page-bottom-height: 0px;
92
+ --app-page-min-height: calc(100vh - var(--app-title-bar-height) - var(--app-page-bottom-height));
93
+
59
94
  min-height: 100vh;
60
95
  background: #f7f8fa;
61
96
  }
62
97
 
98
+ .app-shell--with-tabbar {
99
+ --app-page-bottom-height: var(--app-tabbar-height);
100
+ }
101
+
102
+ .app-shell :deep(main) {
103
+ display: flow-root;
104
+ }
105
+
106
+ @supports (height: 100dvh) {
107
+ .app-shell {
108
+ --app-page-min-height: calc(
109
+ 100dvh - var(--app-title-bar-height) - var(--app-page-bottom-height)
110
+ );
111
+
112
+ min-height: 100dvh;
113
+ }
114
+ }
115
+
63
116
  :deep(.van-tabbar) {
64
117
  max-width: 750px;
65
118
  left: 50%;
@@ -80,9 +80,11 @@ type PbcPositionSendBody = {
80
80
  refNo?: string
81
81
  }
82
82
 
83
- type PbcPositionQueryBody = {
84
- resultList?: PbcPositionRecord[]
85
- }
83
+ type PbcPositionQueryBody =
84
+ | PbcPositionRecord[]
85
+ | {
86
+ resultList?: PbcPositionRecord[]
87
+ }
86
88
 
87
89
  type PbcPositionDetailRequestBody = {
88
90
  refNo: string
@@ -142,7 +144,7 @@ export async function queryPbcPositionBalance(requestRefNo: string): Promise<Pbc
142
144
  console.log('[人行头寸余额查询1入参]', queryPayload)
143
145
 
144
146
  const queryResponse = await queryPbcPositionList(queryPayload)
145
- const records = queryResponse.body.resultList || []
147
+ const records = getPbcPositionRecords(queryResponse.body)
146
148
 
147
149
  if (records.length === 0) {
148
150
  throw new Error('人行头寸余额查询结果为空')
@@ -168,3 +170,9 @@ export async function queryPbcPositionBalance(requestRefNo: string): Promise<Pbc
168
170
 
169
171
  throw new Error(`未查询到编号 ${requestRefNo} 对应的余额结果`)
170
172
  }
173
+
174
+ function getPbcPositionRecords(body: PbcPositionQueryBody) {
175
+ if (Array.isArray(body)) return body
176
+
177
+ return body.resultList || []
178
+ }
@@ -10,7 +10,6 @@ declare global {
10
10
  const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
11
11
  const asyncComputed: typeof import('@vueuse/core').asyncComputed
12
12
  const autoResetRef: typeof import('@vueuse/core').autoResetRef
13
- const closeToast: typeof import('vant').closeToast
14
13
  const computed: typeof import('vue').computed
15
14
  const computedAsync: typeof import('@vueuse/core').computedAsync
16
15
  const computedEager: typeof import('@vueuse/core').computedEager
@@ -107,8 +106,6 @@ declare global {
107
106
  const shallowRef: typeof import('vue').shallowRef
108
107
  const showConfirmDialog: typeof import('vant').showConfirmDialog
109
108
  const showDialog: typeof import('vant').showDialog
110
- const showLoadingToast: typeof import('vant').showLoadingToast
111
- const showToast: typeof import('vant').showToast
112
109
  const storeToRefs: typeof import('pinia').storeToRefs
113
110
  const syncRef: typeof import('@vueuse/core').syncRef
114
111
  const syncRefs: typeof import('@vueuse/core').syncRefs
@@ -331,7 +328,6 @@ declare module 'vue' {
331
328
  readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
332
329
  readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
333
330
  readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
334
- readonly closeToast: UnwrapRef<typeof import('vant')['closeToast']>
335
331
  readonly computed: UnwrapRef<typeof import('vue')['computed']>
336
332
  readonly computedAsync: UnwrapRef<typeof import('@vueuse/core')['computedAsync']>
337
333
  readonly computedEager: UnwrapRef<typeof import('@vueuse/core')['computedEager']>
@@ -428,8 +424,6 @@ declare module 'vue' {
428
424
  readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
429
425
  readonly showConfirmDialog: UnwrapRef<typeof import('vant')['showConfirmDialog']>
430
426
  readonly showDialog: UnwrapRef<typeof import('vant')['showDialog']>
431
- readonly showLoadingToast: UnwrapRef<typeof import('vant')['showLoadingToast']>
432
- readonly showToast: UnwrapRef<typeof import('vant')['showToast']>
433
427
  readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
434
428
  readonly syncRef: UnwrapRef<typeof import('@vueuse/core')['syncRef']>
435
429
  readonly syncRefs: UnwrapRef<typeof import('@vueuse/core')['syncRefs']>
@@ -20,16 +20,64 @@ const emit = defineEmits<{
20
20
  back: []
21
21
  capsuleMore: []
22
22
  capsuleClose: []
23
+ menuHome: []
24
+ menuSettings: []
23
25
  }>()
24
26
 
27
+ const capsuleMenuOpen = ref(false)
28
+ const capsuleMenuRef = ref<HTMLElement | null>(null)
29
+
25
30
  onMounted(() => {
26
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)
27
39
  })
28
40
 
29
41
  function handleCapsuleClose() {
42
+ closeCapsuleMenu()
30
43
  emit('capsuleClose')
31
44
  closeWindow()
32
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
+ }
33
81
  </script>
34
82
 
35
83
  <template>
@@ -47,28 +95,55 @@ function handleCapsuleClose() {
47
95
 
48
96
  <h1 class="app-title-bar__title">{{ title }}</h1>
49
97
 
50
- <div class="app-title-bar__capsule" role="group" aria-label="页面操作">
51
- <button
52
- class="app-title-bar__capsule-btn"
53
- type="button"
54
- aria-label="更多"
55
- @click="emit('capsuleMore')"
56
- >
57
- <span class="app-title-bar__dots" aria-hidden="true">
58
- <i></i>
59
- <i></i>
60
- <i></i>
61
- </span>
62
- </button>
63
- <span class="app-title-bar__divider" aria-hidden="true"></span>
64
- <button
65
- class="app-title-bar__capsule-btn"
66
- type="button"
67
- aria-label="关闭"
68
- @click="handleCapsuleClose"
69
- >
70
- <span class="app-title-bar__circle" aria-hidden="true"></span>
71
- </button>
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>
72
147
  </div>
73
148
  </div>
74
149
  </header>
@@ -146,10 +221,16 @@ function handleCapsuleClose() {
146
221
  pointer-events: none;
147
222
  }
148
223
 
149
- .app-title-bar__capsule {
224
+ .app-title-bar__capsule-area {
150
225
  position: absolute;
151
226
  right: 10px;
152
227
  top: 50%;
228
+ z-index: 2;
229
+ width: 88px;
230
+ transform: translateY(-50%);
231
+ }
232
+
233
+ .app-title-bar__capsule {
153
234
  display: flex;
154
235
  align-items: center;
155
236
  width: 88px;
@@ -162,7 +243,6 @@ function handleCapsuleClose() {
162
243
  0 6px 18px rgba(23, 27, 32, 0.08),
163
244
  inset 0 0 0 0.5px rgba(255, 255, 255, 0.82);
164
245
  backdrop-filter: blur(10px);
165
- transform: translateY(-50%);
166
246
  }
167
247
 
168
248
  .app-title-bar__capsule-btn {
@@ -218,6 +298,75 @@ function handleCapsuleClose() {
218
298
  transform: translate(-50%, -50%);
219
299
  }
220
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
+
221
370
  @media (max-width: 360px) {
222
371
  .app-title-bar__title {
223
372
  left: 58px;
@@ -2,6 +2,7 @@ import { createApp } from 'vue'
2
2
  import { createPinia } from 'pinia'
3
3
  import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
4
4
  import 'vant/lib/index.css'
5
+ import './styles/vant-overrides.css'
5
6
 
6
7
  import App from './App.vue'
7
8
  import router from './router'
@@ -3,6 +3,13 @@ import { useUserStore } from '@/stores/user'
3
3
 
4
4
  const router = createRouter({
5
5
  history: createWebHashHistory(),
6
+ scrollBehavior(_to, _from, savedPosition) {
7
+ if (savedPosition) {
8
+ return savedPosition
9
+ }
10
+
11
+ return { left: 0, top: 0 }
12
+ },
6
13
  routes: [
7
14
  {
8
15
  path: '/',
@@ -52,6 +59,18 @@ const router = createRouter({
52
59
  component: () => import('@/views/position-estimate/index.vue'),
53
60
  meta: { requiresAuth: true, title: '头寸匡算' },
54
61
  },
62
+ {
63
+ path: '/position-estimate/report',
64
+ name: 'PositionEstimateReport',
65
+ component: () => import('@/views/position-estimate-report/index.vue'),
66
+ meta: { requiresAuth: true, hideTabbar: true, title: '头寸匡算报表' },
67
+ },
68
+ {
69
+ path: '/position-estimate/opening-reserve',
70
+ name: 'OpeningReserveEstimate',
71
+ component: () => import('@/views/opening-reserve-estimate/index.vue'),
72
+ meta: { requiresAuth: true, hideTabbar: true, title: '日初备款数匡算' },
73
+ },
55
74
  {
56
75
  path: '/net-debit',
57
76
  name: 'NetDebit',
@@ -70,6 +89,12 @@ const router = createRouter({
70
89
  component: () => import('@/views/warning/index.vue'),
71
90
  meta: { requiresAuth: true, title: '预警信息' },
72
91
  },
92
+ {
93
+ path: '/dashboard',
94
+ name: 'Dashboard',
95
+ component: () => import('@/views/dashboard/index.vue'),
96
+ meta: { requiresAuth: true, title: '看板' },
97
+ },
73
98
  {
74
99
  path: '/articles',
75
100
  name: 'Articles',
@@ -13,6 +13,9 @@ export const useAppStore = defineStore(
13
13
  /** 是否在原生 APP WebView 环境中 */
14
14
  const isNative = ref(false)
15
15
 
16
+ /** 是否在底部导航中显示看板入口 */
17
+ const showDashboardTab = ref(false)
18
+
16
19
  /** 是否在底部导航中显示公告入口 */
17
20
  const showAnnouncementTab = ref(false)
18
21
 
@@ -34,6 +37,10 @@ export const useAppStore = defineStore(
34
37
  isNative.value = await waitNativeReady()
35
38
  }
36
39
 
40
+ function setShowDashboardTab(value: boolean) {
41
+ showDashboardTab.value = value
42
+ }
43
+
37
44
  function setShowAnnouncementTab(value: boolean) {
38
45
  showAnnouncementTab.value = value
39
46
  }
@@ -48,11 +55,13 @@ export const useAppStore = defineStore(
48
55
 
49
56
  return {
50
57
  isNative,
58
+ showDashboardTab,
51
59
  showAnnouncementTab,
52
60
  systemAppDate,
53
61
  systemWorkDate,
54
62
  systemWorkDateCompact,
55
63
  initNativeDetection,
64
+ setShowDashboardTab,
56
65
  setShowAnnouncementTab,
57
66
  setSystemAppDate,
58
67
  clearSystemAppDate,
@@ -61,7 +70,7 @@ export const useAppStore = defineStore(
61
70
  {
62
71
  persist: {
63
72
  key: 'mini2_app_settings',
64
- pick: ['showAnnouncementTab', 'systemAppDate'],
73
+ pick: ['showDashboardTab', 'showAnnouncementTab', 'systemAppDate'],
65
74
  },
66
75
  },
67
76
  )
@@ -20,7 +20,7 @@ export const useUserStore = defineStore(
20
20
  // -------------------------------- State --------------------------------
21
21
 
22
22
  /** 登录凭证,登录成功后由后端返回,后续请求通过请求头携带 */
23
- const token = ref('1')
23
+ const token = ref('1s')
24
24
  const refreshToken = ref('')
25
25
  const username = ref('')
26
26
  const realName = ref('')