verce-vue-test 0.0.58 → 0.0.59
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/mini2.0-main/src/App.vue +12 -1
- package/mini2.0-main/src/api/rmb-position.ts +2 -1
- package/mini2.0-main/src/api/tam.ts +5 -2
- package/mini2.0-main/src/api/user.ts +21 -0
- package/mini2.0-main/src/components/{AnnouncementTitleBar.vue → AppTitleBar.vue} +36 -31
- package/mini2.0-main/src/components.d.ts +1 -1
- package/mini2.0-main/src/core/mxApi/index.ts +5 -0
- package/mini2.0-main/src/router/index.ts +17 -17
- package/mini2.0-main/src/stores/app.ts +56 -2
- package/mini2.0-main/src/views/article-detail/index.vue +0 -12
- package/mini2.0-main/src/views/article-edit/index.vue +0 -8
- package/mini2.0-main/src/views/articles/index.vue +0 -8
- package/mini2.0-main/src/views/clearing-detail/index.vue +0 -23
- package/mini2.0-main/src/views/foreign-position/index.vue +0 -23
- package/mini2.0-main/src/views/login/index.vue +15 -1
- package/mini2.0-main/src/views/net-debit/index.vue +0 -23
- package/mini2.0-main/src/views/pbc-position/index.vue +0 -68
- package/mini2.0-main/src/views/position-estimate/index.vue +0 -23
- package/mini2.0-main/src/views/rmb-position/index.vue +6 -60
- package/mini2.0-main/src/views/rmb-position-create/index.vue +4 -42
- package/mini2.0-main/src/views/rmb-position-detail/index.vue +1 -39
- package/mini2.0-main/src/views/settings/index.vue +1 -54
- package/mini2.0-main/src/views/warning/index.vue +0 -23
- package/mini2.0-main/vite.config.ts +10 -2
- package/package.json +1 -1
package/mini2.0-main/src/App.vue
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import AppTitleBar from '@/components/AppTitleBar.vue'
|
|
2
3
|
import { useAppStore } from '@/stores/app'
|
|
3
4
|
|
|
4
5
|
const route = useRoute()
|
|
@@ -16,6 +17,9 @@ const tabItems = computed(() =>
|
|
|
16
17
|
)
|
|
17
18
|
|
|
18
19
|
const showTabbar = computed(() => route.meta.hideTabbar !== true)
|
|
20
|
+
const noBackRouteNames = new Set(['Home', 'Login', 'Articles', 'Mine'])
|
|
21
|
+
const headerTitle = computed(() => String(route.meta.title || ''))
|
|
22
|
+
const showHeaderBack = computed(() => !noBackRouteNames.has(String(route.name || '')))
|
|
19
23
|
|
|
20
24
|
const activeTab = computed({
|
|
21
25
|
get: () => route.path,
|
|
@@ -29,6 +33,8 @@ const activeTab = computed({
|
|
|
29
33
|
|
|
30
34
|
<template>
|
|
31
35
|
<div class="app-shell">
|
|
36
|
+
<AppTitleBar :title="headerTitle" :show-back="showHeaderBack" @back="router.back()" />
|
|
37
|
+
|
|
32
38
|
<router-view v-slot="{ Component }">
|
|
33
39
|
<keep-alive include="HomePage">
|
|
34
40
|
<component :is="Component" />
|
|
@@ -36,7 +42,12 @@ const activeTab = computed({
|
|
|
36
42
|
</router-view>
|
|
37
43
|
|
|
38
44
|
<van-tabbar v-if="showTabbar" v-model="activeTab" fixed placeholder safe-area-inset-bottom>
|
|
39
|
-
<van-tabbar-item
|
|
45
|
+
<van-tabbar-item
|
|
46
|
+
v-for="item in tabItems"
|
|
47
|
+
:key="item.path"
|
|
48
|
+
:name="item.path"
|
|
49
|
+
:icon="item.icon"
|
|
50
|
+
>
|
|
40
51
|
{{ item.title }}
|
|
41
52
|
</van-tabbar-item>
|
|
42
53
|
</van-tabbar>
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
type TamRequestPayload,
|
|
5
5
|
type TamResponse,
|
|
6
6
|
} from '@/api/tam'
|
|
7
|
+
import { useAppStore } from '@/stores/app'
|
|
7
8
|
|
|
8
9
|
export type RmbForecastRecord = {
|
|
9
10
|
/** 业务类型,用于映射列表中的业务名称。 */
|
|
@@ -171,7 +172,7 @@ export function buildRmbForecastQueryPayload({
|
|
|
171
172
|
pageIndex,
|
|
172
173
|
pageSize,
|
|
173
174
|
}: QueryOptions): RmbForecastQueryPayload {
|
|
174
|
-
const tranDate = normalizeDate(form.tranDate)
|
|
175
|
+
const tranDate = normalizeDate(form.tranDate || useAppStore().systemWorkDate)
|
|
175
176
|
|
|
176
177
|
// 当前视图只提供交易日期、落地机构、起始金额、截止金额,其余查询字段按接口约定传空。
|
|
177
178
|
return buildTamRequestPayload({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import dayjs from 'dayjs'
|
|
2
2
|
import { request } from '@/core/request'
|
|
3
|
+
import { useAppStore } from '@/stores/app'
|
|
3
4
|
import { useUserStore } from '@/stores/user'
|
|
4
5
|
|
|
5
6
|
export type TamAppHead = {
|
|
@@ -72,7 +73,9 @@ export function buildTamRequestPayload<TBody>({
|
|
|
72
73
|
head,
|
|
73
74
|
}: BuildTamPayloadOptions<TBody>): TamRequestPayload<TBody> {
|
|
74
75
|
const now = dayjs()
|
|
76
|
+
const appStore = useAppStore()
|
|
75
77
|
const loginContext = getTamLoginContext()
|
|
78
|
+
const tranDate = appStore.systemWorkDateCompact
|
|
76
79
|
|
|
77
80
|
return {
|
|
78
81
|
appHead: {
|
|
@@ -88,7 +91,7 @@ export function buildTamRequestPayload<TBody>({
|
|
|
88
91
|
branchId: loginContext.branchId,
|
|
89
92
|
consumerId: 'TAM001',
|
|
90
93
|
// 规则:当前登录用户 ID + 日期 + 8 位运行期递增序列。
|
|
91
|
-
consumerSeqNo: `${loginContext.userId}${
|
|
94
|
+
consumerSeqNo: `${loginContext.userId}${tranDate}${createConsumerSeq()}`,
|
|
92
95
|
digitalSign: '',
|
|
93
96
|
fileFlag: 'N',
|
|
94
97
|
filePath: '',
|
|
@@ -98,7 +101,7 @@ export function buildTamRequestPayload<TBody>({
|
|
|
98
101
|
spanId: '',
|
|
99
102
|
traceId: '',
|
|
100
103
|
tranCode,
|
|
101
|
-
tranDate
|
|
104
|
+
tranDate,
|
|
102
105
|
tranTimestamp: now.format('HHmmss'),
|
|
103
106
|
userId: loginContext.userId,
|
|
104
107
|
verifyUserId: '',
|
|
@@ -14,6 +14,20 @@ export type UserOrg = {
|
|
|
14
14
|
orgId: string
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export type LastLoginTimeInfo = {
|
|
18
|
+
loginTm?: string
|
|
19
|
+
userRealName?: string
|
|
20
|
+
reqMsg?: string
|
|
21
|
+
optType?: string
|
|
22
|
+
loginLogId?: string
|
|
23
|
+
optDesc?: string
|
|
24
|
+
loginUserName?: string
|
|
25
|
+
respMsg?: string
|
|
26
|
+
appDt?: string
|
|
27
|
+
respCd?: string
|
|
28
|
+
reqIpAddr?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
17
31
|
export function getUserInfoApi(id: number) {
|
|
18
32
|
return request<UserInfo>({ url: `/user/${id}` })
|
|
19
33
|
}
|
|
@@ -28,6 +42,13 @@ export function getOrgByUserNameApi(username: string) {
|
|
|
28
42
|
})
|
|
29
43
|
}
|
|
30
44
|
|
|
45
|
+
export function getLastLoginTimeApi() {
|
|
46
|
+
return request<LastLoginTimeInfo>({
|
|
47
|
+
url: '/uaa/log/lastLoginTime',
|
|
48
|
+
method: 'GET',
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
|
|
31
52
|
export function loginApi(data: { username: string; password: string }) {
|
|
32
53
|
return request<AuthTokenResponse>({
|
|
33
54
|
url: '/uaa/oauth/token',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { hideWebViewTitle } from '@/core/mxApi'
|
|
2
|
+
import { closeWindow, hideWebViewTitle } from '@/core/mxApi'
|
|
3
3
|
|
|
4
|
-
defineOptions({ name: '
|
|
4
|
+
defineOptions({ name: 'AppTitleBar' })
|
|
5
5
|
|
|
6
6
|
withDefaults(
|
|
7
7
|
defineProps<{
|
|
@@ -25,14 +25,19 @@ const emit = defineEmits<{
|
|
|
25
25
|
onMounted(() => {
|
|
26
26
|
hideWebViewTitle()
|
|
27
27
|
})
|
|
28
|
+
|
|
29
|
+
function handleCapsuleClose() {
|
|
30
|
+
emit('capsuleClose')
|
|
31
|
+
closeWindow()
|
|
32
|
+
}
|
|
28
33
|
</script>
|
|
29
34
|
|
|
30
35
|
<template>
|
|
31
|
-
<header class="
|
|
32
|
-
<div class="
|
|
36
|
+
<header class="app-title-bar">
|
|
37
|
+
<div class="app-title-bar__inner">
|
|
33
38
|
<button
|
|
34
39
|
v-if="showBack"
|
|
35
|
-
class="
|
|
40
|
+
class="app-title-bar__back"
|
|
36
41
|
type="button"
|
|
37
42
|
:aria-label="backAriaLabel"
|
|
38
43
|
@click="emit('back')"
|
|
@@ -40,29 +45,29 @@ onMounted(() => {
|
|
|
40
45
|
<van-icon name="arrow-left" />
|
|
41
46
|
</button>
|
|
42
47
|
|
|
43
|
-
<h1 class="
|
|
48
|
+
<h1 class="app-title-bar__title">{{ title }}</h1>
|
|
44
49
|
|
|
45
|
-
<div class="
|
|
50
|
+
<div class="app-title-bar__capsule" role="group" aria-label="页面操作">
|
|
46
51
|
<button
|
|
47
|
-
class="
|
|
52
|
+
class="app-title-bar__capsule-btn"
|
|
48
53
|
type="button"
|
|
49
54
|
aria-label="更多"
|
|
50
55
|
@click="emit('capsuleMore')"
|
|
51
56
|
>
|
|
52
|
-
<span class="
|
|
57
|
+
<span class="app-title-bar__dots" aria-hidden="true">
|
|
53
58
|
<i></i>
|
|
54
59
|
<i></i>
|
|
55
60
|
<i></i>
|
|
56
61
|
</span>
|
|
57
62
|
</button>
|
|
58
|
-
<span class="
|
|
63
|
+
<span class="app-title-bar__divider" aria-hidden="true"></span>
|
|
59
64
|
<button
|
|
60
|
-
class="
|
|
65
|
+
class="app-title-bar__capsule-btn"
|
|
61
66
|
type="button"
|
|
62
67
|
aria-label="关闭"
|
|
63
|
-
@click="
|
|
68
|
+
@click="handleCapsuleClose"
|
|
64
69
|
>
|
|
65
|
-
<span class="
|
|
70
|
+
<span class="app-title-bar__circle" aria-hidden="true"></span>
|
|
66
71
|
</button>
|
|
67
72
|
</div>
|
|
68
73
|
</div>
|
|
@@ -70,20 +75,20 @@ onMounted(() => {
|
|
|
70
75
|
</template>
|
|
71
76
|
|
|
72
77
|
<style scoped>
|
|
73
|
-
.
|
|
78
|
+
.app-title-bar {
|
|
74
79
|
position: sticky;
|
|
75
80
|
top: 0;
|
|
76
81
|
z-index: 20;
|
|
77
82
|
width: 100%;
|
|
78
83
|
height: calc(50px + env(safe-area-inset-top));
|
|
79
84
|
padding-top: env(safe-area-inset-top);
|
|
85
|
+
border-bottom: 1px solid #f0f1f3;
|
|
80
86
|
color: #171b20;
|
|
81
|
-
background:
|
|
82
|
-
backdrop-filter: blur(12px);
|
|
87
|
+
background: #ffffff;
|
|
83
88
|
box-sizing: border-box;
|
|
84
89
|
}
|
|
85
90
|
|
|
86
|
-
.
|
|
91
|
+
.app-title-bar__inner {
|
|
87
92
|
position: relative;
|
|
88
93
|
display: flex;
|
|
89
94
|
align-items: center;
|
|
@@ -96,8 +101,8 @@ onMounted(() => {
|
|
|
96
101
|
box-sizing: border-box;
|
|
97
102
|
}
|
|
98
103
|
|
|
99
|
-
.
|
|
100
|
-
.
|
|
104
|
+
.app-title-bar__back,
|
|
105
|
+
.app-title-bar__capsule-btn {
|
|
101
106
|
border: 0;
|
|
102
107
|
padding: 0;
|
|
103
108
|
font: inherit;
|
|
@@ -106,7 +111,7 @@ onMounted(() => {
|
|
|
106
111
|
cursor: pointer;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
|
-
.
|
|
114
|
+
.app-title-bar__back {
|
|
110
115
|
position: absolute;
|
|
111
116
|
left: 10px;
|
|
112
117
|
top: 50%;
|
|
@@ -121,11 +126,11 @@ onMounted(() => {
|
|
|
121
126
|
transform: translateY(-50%);
|
|
122
127
|
}
|
|
123
128
|
|
|
124
|
-
.
|
|
129
|
+
.app-title-bar__back:active {
|
|
125
130
|
background: rgba(23, 27, 32, 0.06);
|
|
126
131
|
}
|
|
127
132
|
|
|
128
|
-
.
|
|
133
|
+
.app-title-bar__title {
|
|
129
134
|
position: absolute;
|
|
130
135
|
left: 106px;
|
|
131
136
|
right: 106px;
|
|
@@ -141,7 +146,7 @@ onMounted(() => {
|
|
|
141
146
|
pointer-events: none;
|
|
142
147
|
}
|
|
143
148
|
|
|
144
|
-
.
|
|
149
|
+
.app-title-bar__capsule {
|
|
145
150
|
position: absolute;
|
|
146
151
|
right: 10px;
|
|
147
152
|
top: 50%;
|
|
@@ -160,7 +165,7 @@ onMounted(() => {
|
|
|
160
165
|
transform: translateY(-50%);
|
|
161
166
|
}
|
|
162
167
|
|
|
163
|
-
.
|
|
168
|
+
.app-title-bar__capsule-btn {
|
|
164
169
|
display: flex;
|
|
165
170
|
align-items: center;
|
|
166
171
|
justify-content: center;
|
|
@@ -169,30 +174,30 @@ onMounted(() => {
|
|
|
169
174
|
color: #171b20;
|
|
170
175
|
}
|
|
171
176
|
|
|
172
|
-
.
|
|
177
|
+
.app-title-bar__capsule-btn:active {
|
|
173
178
|
background: rgba(23, 27, 32, 0.06);
|
|
174
179
|
}
|
|
175
180
|
|
|
176
|
-
.
|
|
181
|
+
.app-title-bar__divider {
|
|
177
182
|
width: 1px;
|
|
178
183
|
height: 18px;
|
|
179
184
|
background: rgba(23, 27, 32, 0.12);
|
|
180
185
|
}
|
|
181
186
|
|
|
182
|
-
.
|
|
187
|
+
.app-title-bar__dots {
|
|
183
188
|
display: flex;
|
|
184
189
|
align-items: center;
|
|
185
190
|
gap: 4px;
|
|
186
191
|
}
|
|
187
192
|
|
|
188
|
-
.
|
|
193
|
+
.app-title-bar__dots i {
|
|
189
194
|
width: 4px;
|
|
190
195
|
height: 4px;
|
|
191
196
|
border-radius: 50%;
|
|
192
197
|
background: #171b20;
|
|
193
198
|
}
|
|
194
199
|
|
|
195
|
-
.
|
|
200
|
+
.app-title-bar__circle {
|
|
196
201
|
position: relative;
|
|
197
202
|
width: 18px;
|
|
198
203
|
height: 18px;
|
|
@@ -201,7 +206,7 @@ onMounted(() => {
|
|
|
201
206
|
box-sizing: border-box;
|
|
202
207
|
}
|
|
203
208
|
|
|
204
|
-
.
|
|
209
|
+
.app-title-bar__circle::after {
|
|
205
210
|
position: absolute;
|
|
206
211
|
left: 50%;
|
|
207
212
|
top: 50%;
|
|
@@ -214,7 +219,7 @@ onMounted(() => {
|
|
|
214
219
|
}
|
|
215
220
|
|
|
216
221
|
@media (max-width: 360px) {
|
|
217
|
-
.
|
|
222
|
+
.app-title-bar__title {
|
|
218
223
|
left: 58px;
|
|
219
224
|
right: 106px;
|
|
220
225
|
}
|
|
@@ -11,7 +11,7 @@ export {}
|
|
|
11
11
|
/* prettier-ignore */
|
|
12
12
|
declare module 'vue' {
|
|
13
13
|
export interface GlobalComponents {
|
|
14
|
-
|
|
14
|
+
AppTitleBar: typeof import('./components/AppTitleBar.vue')['default']
|
|
15
15
|
RouterLink: typeof import('vue-router')['RouterLink']
|
|
16
16
|
RouterView: typeof import('vue-router')['RouterView']
|
|
17
17
|
VanButton: typeof import('vant/es')['Button']
|
|
@@ -128,6 +128,7 @@ interface MXWebuiHost {
|
|
|
128
128
|
showWebViewTitle?: (title?: string) => void
|
|
129
129
|
setWebViewTitle?: (title: string) => void
|
|
130
130
|
setNavBgColor?: (bgColor: string) => void
|
|
131
|
+
closeWindow?: () => void
|
|
131
132
|
setCustomHeader?: (options: MXWebuiCustomHeaderOptions) => void
|
|
132
133
|
updateCustomHeader?: (options: MXWebuiCustomHeaderOptions) => void
|
|
133
134
|
}
|
|
@@ -351,6 +352,10 @@ export function setNavBgColor(bgColor: string) {
|
|
|
351
352
|
return callMXWebui('setNavBgColor', bgColor)
|
|
352
353
|
}
|
|
353
354
|
|
|
355
|
+
export function closeWindow() {
|
|
356
|
+
return callMXWebui('closeWindow')
|
|
357
|
+
}
|
|
358
|
+
|
|
354
359
|
export function setCustomHeader(options: MXWebuiCustomHeaderOptions) {
|
|
355
360
|
return callMXWebui('setCustomHeader', options)
|
|
356
361
|
}
|
|
@@ -8,103 +8,103 @@ const router = createRouter({
|
|
|
8
8
|
path: '/',
|
|
9
9
|
name: 'Home',
|
|
10
10
|
component: () => import('@/views/home/index.vue'),
|
|
11
|
-
meta: { requiresAuth: true },
|
|
11
|
+
meta: { requiresAuth: true, title: '头寸管理平台' },
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
path: '/login',
|
|
15
15
|
name: 'Login',
|
|
16
16
|
component: () => import('@/views/login/index.vue'),
|
|
17
|
-
meta: { hideTabbar: true },
|
|
17
|
+
meta: { hideTabbar: true, title: '账号登录' },
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
path: '/rmb-position',
|
|
21
21
|
name: 'RmbPosition',
|
|
22
22
|
component: () => import('@/views/rmb-position/index.vue'),
|
|
23
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
23
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '本币预报信息查询' },
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
path: '/rmb-position/new',
|
|
27
27
|
name: 'RmbPositionCreate',
|
|
28
28
|
component: () => import('@/views/rmb-position-create/index.vue'),
|
|
29
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
29
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '新增本币预报' },
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
path: '/rmb-position/:predRefNo',
|
|
33
33
|
name: 'RmbPositionDetail',
|
|
34
34
|
component: () => import('@/views/rmb-position-detail/index.vue'),
|
|
35
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
35
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '预报详情' },
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
path: '/foreign-position',
|
|
39
39
|
name: 'ForeignPosition',
|
|
40
40
|
component: () => import('@/views/foreign-position/index.vue'),
|
|
41
|
-
meta: { requiresAuth: true },
|
|
41
|
+
meta: { requiresAuth: true, title: '外币头寸预报及查询' },
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
path: '/pbc-position',
|
|
45
45
|
name: 'PbcPosition',
|
|
46
46
|
component: () => import('@/views/pbc-position/index.vue'),
|
|
47
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
47
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '人行头寸余额查询' },
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
path: '/position-estimate',
|
|
51
51
|
name: 'PositionEstimate',
|
|
52
52
|
component: () => import('@/views/position-estimate/index.vue'),
|
|
53
|
-
meta: { requiresAuth: true },
|
|
53
|
+
meta: { requiresAuth: true, title: '头寸匡算' },
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
path: '/net-debit',
|
|
57
57
|
name: 'NetDebit',
|
|
58
58
|
component: () => import('@/views/net-debit/index.vue'),
|
|
59
|
-
meta: { requiresAuth: true },
|
|
59
|
+
meta: { requiresAuth: true, title: '人民币净借记可用额度管理' },
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
path: '/clearing-detail',
|
|
63
63
|
name: 'ClearingDetail',
|
|
64
64
|
component: () => import('@/views/clearing-detail/index.vue'),
|
|
65
|
-
meta: { requiresAuth: true },
|
|
65
|
+
meta: { requiresAuth: true, title: '人民币小额网银清算场次明细' },
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
path: '/warning',
|
|
69
69
|
name: 'Warning',
|
|
70
70
|
component: () => import('@/views/warning/index.vue'),
|
|
71
|
-
meta: { requiresAuth: true },
|
|
71
|
+
meta: { requiresAuth: true, title: '预警信息' },
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
path: '/articles',
|
|
75
75
|
name: 'Articles',
|
|
76
76
|
component: () => import('@/views/articles/index.vue'),
|
|
77
|
-
meta: { requiresAuth: true },
|
|
77
|
+
meta: { requiresAuth: true, title: '公告' },
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
path: '/articles/new',
|
|
81
81
|
name: 'ArticlePublish',
|
|
82
82
|
component: () => import('@/views/article-edit/index.vue'),
|
|
83
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
83
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '发布公告' },
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
path: '/articles/:id',
|
|
87
87
|
name: 'ArticleDetail',
|
|
88
88
|
component: () => import('@/views/article-detail/index.vue'),
|
|
89
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
89
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '公告详情' },
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
path: '/articles/:id/edit',
|
|
93
93
|
name: 'ArticleEdit',
|
|
94
94
|
component: () => import('@/views/article-edit/index.vue'),
|
|
95
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
95
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '编辑公告' },
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
path: '/mine',
|
|
99
99
|
name: 'Mine',
|
|
100
100
|
component: () => import('@/views/mine/index.vue'),
|
|
101
|
-
meta: { requiresAuth: true },
|
|
101
|
+
meta: { requiresAuth: true, title: '我的' },
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
path: '/settings',
|
|
105
105
|
name: 'Settings',
|
|
106
106
|
component: () => import('@/views/settings/index.vue'),
|
|
107
|
-
meta: { requiresAuth: true, hideTabbar: true },
|
|
107
|
+
meta: { requiresAuth: true, hideTabbar: true, title: '设置' },
|
|
108
108
|
},
|
|
109
109
|
],
|
|
110
110
|
})
|
|
@@ -16,6 +16,15 @@ export const useAppStore = defineStore(
|
|
|
16
16
|
/** 是否在底部导航中显示公告入口 */
|
|
17
17
|
const showAnnouncementTab = ref(false)
|
|
18
18
|
|
|
19
|
+
/** 后端返回的系统工作日期原始值,来自 /uaa/log/lastLoginTime 的 appDt。 */
|
|
20
|
+
const systemAppDate = ref('')
|
|
21
|
+
|
|
22
|
+
/** 系统工作日期,页面日期控件使用 YYYY-MM-DD。 */
|
|
23
|
+
const systemWorkDate = computed(() => normalizeSystemWorkDate(systemAppDate.value) || today())
|
|
24
|
+
|
|
25
|
+
/** 系统工作日期,TAM 等接口使用 YYYYMMDD。 */
|
|
26
|
+
const systemWorkDateCompact = computed(() => systemWorkDate.value.replaceAll('-', ''))
|
|
27
|
+
|
|
19
28
|
/**
|
|
20
29
|
* 初始化原生环境检测
|
|
21
30
|
*
|
|
@@ -29,12 +38,57 @@ export const useAppStore = defineStore(
|
|
|
29
38
|
showAnnouncementTab.value = value
|
|
30
39
|
}
|
|
31
40
|
|
|
32
|
-
|
|
41
|
+
function setSystemAppDate(value: string) {
|
|
42
|
+
systemAppDate.value = value
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function clearSystemAppDate() {
|
|
46
|
+
systemAppDate.value = ''
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
isNative,
|
|
51
|
+
showAnnouncementTab,
|
|
52
|
+
systemAppDate,
|
|
53
|
+
systemWorkDate,
|
|
54
|
+
systemWorkDateCompact,
|
|
55
|
+
initNativeDetection,
|
|
56
|
+
setShowAnnouncementTab,
|
|
57
|
+
setSystemAppDate,
|
|
58
|
+
clearSystemAppDate,
|
|
59
|
+
}
|
|
33
60
|
},
|
|
34
61
|
{
|
|
35
62
|
persist: {
|
|
36
63
|
key: 'mini2_app_settings',
|
|
37
|
-
pick: ['showAnnouncementTab'],
|
|
64
|
+
pick: ['showAnnouncementTab', 'systemAppDate'],
|
|
38
65
|
},
|
|
39
66
|
},
|
|
40
67
|
)
|
|
68
|
+
|
|
69
|
+
function normalizeSystemWorkDate(value: string) {
|
|
70
|
+
const text = value.trim()
|
|
71
|
+
|
|
72
|
+
if (!text) return ''
|
|
73
|
+
|
|
74
|
+
const dashedDate = text.match(/^(\d{4})-(\d{2})-(\d{2})/)
|
|
75
|
+
if (dashedDate) {
|
|
76
|
+
return `${dashedDate[1]}-${dashedDate[2]}-${dashedDate[3]}`
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const compactDate = text.match(/^(\d{4})(\d{2})(\d{2})/)
|
|
80
|
+
if (compactDate) {
|
|
81
|
+
return `${compactDate[1]}-${compactDate[2]}-${compactDate[3]}`
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return ''
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function today() {
|
|
88
|
+
const now = new Date()
|
|
89
|
+
const year = now.getFullYear()
|
|
90
|
+
const month = String(now.getMonth() + 1).padStart(2, '0')
|
|
91
|
+
const day = String(now.getDate()).padStart(2, '0')
|
|
92
|
+
|
|
93
|
+
return `${year}-${month}-${day}`
|
|
94
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import AnnouncementTitleBar from '@/components/AnnouncementTitleBar.vue'
|
|
3
2
|
import { highlightArticleHtml } from '@/utils/code-highlight'
|
|
4
3
|
import { copyText } from '@/utils/copy'
|
|
5
4
|
import { formatArticleDate, getArticleDetail, type Article } from '@/api/announcement'
|
|
@@ -40,10 +39,6 @@ async function loadArticle() {
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
function goBack() {
|
|
44
|
-
router.back()
|
|
45
|
-
}
|
|
46
|
-
|
|
47
42
|
function editArticle() {
|
|
48
43
|
if (article.value) {
|
|
49
44
|
router.push(`/articles/${article.value.id}/edit`)
|
|
@@ -89,8 +84,6 @@ function articleContentToText(html: string) {
|
|
|
89
84
|
|
|
90
85
|
<template>
|
|
91
86
|
<main class="article-detail-page">
|
|
92
|
-
<AnnouncementTitleBar class="article-title-bar" title="公告详情" @back="goBack" />
|
|
93
|
-
|
|
94
87
|
<section v-if="loading" class="state-section">
|
|
95
88
|
<van-loading vertical>加载中...</van-loading>
|
|
96
89
|
</section>
|
|
@@ -135,11 +128,6 @@ function articleContentToText(html: string) {
|
|
|
135
128
|
box-sizing: border-box;
|
|
136
129
|
}
|
|
137
130
|
|
|
138
|
-
.article-title-bar {
|
|
139
|
-
width: calc(100% + 22px);
|
|
140
|
-
margin: 0 -11px;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
131
|
.article-detail {
|
|
144
132
|
margin-top: 12px;
|
|
145
133
|
padding: 18px 15px 20px;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import AnnouncementTitleBar from '@/components/AnnouncementTitleBar.vue'
|
|
3
2
|
import {
|
|
4
3
|
createArticle,
|
|
5
4
|
extractTextFromHtml,
|
|
@@ -255,8 +254,6 @@ function normalizeCodeLanguage(value: string) {
|
|
|
255
254
|
|
|
256
255
|
<template>
|
|
257
256
|
<main class="article-edit-page">
|
|
258
|
-
<AnnouncementTitleBar class="article-title-bar" :title="pageTitle" @back="handleCancel" />
|
|
259
|
-
|
|
260
257
|
<section class="form-panel">
|
|
261
258
|
<van-field
|
|
262
259
|
v-model="title"
|
|
@@ -388,11 +385,6 @@ function normalizeCodeLanguage(value: string) {
|
|
|
388
385
|
box-sizing: border-box;
|
|
389
386
|
}
|
|
390
387
|
|
|
391
|
-
.article-title-bar {
|
|
392
|
-
width: calc(100% + 22px);
|
|
393
|
-
margin: 0 -11px;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
388
|
.form-panel,
|
|
397
389
|
.editor-panel {
|
|
398
390
|
overflow: hidden;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import AnnouncementTitleBar from '@/components/AnnouncementTitleBar.vue'
|
|
3
2
|
import {
|
|
4
3
|
extractTextFromHtml,
|
|
5
4
|
formatArticleDate,
|
|
@@ -68,8 +67,6 @@ function openEdit(article: Article) {
|
|
|
68
67
|
|
|
69
68
|
<template>
|
|
70
69
|
<main class="article-list-page">
|
|
71
|
-
<AnnouncementTitleBar class="article-title-bar" title="公告" :show-back="false" />
|
|
72
|
-
|
|
73
70
|
<header class="article-hero">
|
|
74
71
|
<div class="hero-copy">
|
|
75
72
|
<p>Announcement Center</p>
|
|
@@ -138,11 +135,6 @@ function openEdit(article: Article) {
|
|
|
138
135
|
box-sizing: border-box;
|
|
139
136
|
}
|
|
140
137
|
|
|
141
|
-
.article-title-bar {
|
|
142
|
-
width: calc(100% + 22px);
|
|
143
|
-
margin: 0 -11px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
138
|
.article-hero {
|
|
147
139
|
display: flex;
|
|
148
140
|
align-items: center;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
2
|
<main class="page">
|
|
5
|
-
<header class="page-header">
|
|
6
|
-
<button class="back-btn" type="button" @click="$router.back()">←</button>
|
|
7
|
-
<h1>人民币小额网银清算场次明细</h1>
|
|
8
|
-
</header>
|
|
9
3
|
<section class="page-body">
|
|
10
4
|
<p class="placeholder">页面建设中…</p>
|
|
11
5
|
</section>
|
|
@@ -20,23 +14,6 @@
|
|
|
20
14
|
padding: 0 11px;
|
|
21
15
|
background: #f7f8fa;
|
|
22
16
|
}
|
|
23
|
-
.page-header {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 8px;
|
|
27
|
-
height: 48px;
|
|
28
|
-
}
|
|
29
|
-
.back-btn {
|
|
30
|
-
border: 0;
|
|
31
|
-
background: transparent;
|
|
32
|
-
font-size: 20px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
}
|
|
35
|
-
.page-header h1 {
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-size: 17px;
|
|
38
|
-
font-weight: 700;
|
|
39
|
-
}
|
|
40
17
|
.page-body {
|
|
41
18
|
padding: 24px 0;
|
|
42
19
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
2
|
<main class="page">
|
|
5
|
-
<header class="page-header">
|
|
6
|
-
<button class="back-btn" type="button" @click="$router.back()">←</button>
|
|
7
|
-
<h1>外币头寸预报及查询</h1>
|
|
8
|
-
</header>
|
|
9
3
|
<section class="page-body">
|
|
10
4
|
<p class="placeholder">页面建设中…</p>
|
|
11
5
|
</section>
|
|
@@ -20,23 +14,6 @@
|
|
|
20
14
|
padding: 0 11px;
|
|
21
15
|
background: #f7f8fa;
|
|
22
16
|
}
|
|
23
|
-
.page-header {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 8px;
|
|
27
|
-
height: 48px;
|
|
28
|
-
}
|
|
29
|
-
.back-btn {
|
|
30
|
-
border: 0;
|
|
31
|
-
background: transparent;
|
|
32
|
-
font-size: 20px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
}
|
|
35
|
-
.page-header h1 {
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-size: 17px;
|
|
38
|
-
font-weight: 700;
|
|
39
|
-
}
|
|
40
17
|
.page-body {
|
|
41
18
|
padding: 24px 0;
|
|
42
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useRouter } from 'vue-router'
|
|
3
|
-
import { getOrgByUserNameApi, loginApi, loginByAppTokenApi } from '@/api/user'
|
|
3
|
+
import { getLastLoginTimeApi, getOrgByUserNameApi, loginApi, loginByAppTokenApi } from '@/api/user'
|
|
4
4
|
import { showToast } from 'vant'
|
|
5
5
|
import { useAppStore } from '@/stores/app'
|
|
6
6
|
import { useUserStore } from '@/stores/user'
|
|
@@ -98,6 +98,8 @@ async function saveBusinessTokenAndOrg(response: unknown) {
|
|
|
98
98
|
saveAuthTokens(response as AuthTokenResponse)
|
|
99
99
|
|
|
100
100
|
try {
|
|
101
|
+
await saveSystemWorkDate()
|
|
102
|
+
|
|
101
103
|
const username = userStore.username.trim()
|
|
102
104
|
if (!username) {
|
|
103
105
|
rejectLoginWithoutOrg()
|
|
@@ -116,10 +118,22 @@ async function saveBusinessTokenAndOrg(response: unknown) {
|
|
|
116
118
|
} catch (error) {
|
|
117
119
|
// 机构校验失败时撤销刚保存的登录态,避免后续路由误认为已登录。
|
|
118
120
|
userStore.clearToken()
|
|
121
|
+
appStore.clearSystemAppDate()
|
|
119
122
|
throw error
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
|
|
126
|
+
async function saveSystemWorkDate() {
|
|
127
|
+
const response = await getLastLoginTimeApi()
|
|
128
|
+
const appDt = response.data?.appDt
|
|
129
|
+
|
|
130
|
+
if (!appDt) {
|
|
131
|
+
throw new Error('系统工作日期为空')
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
appStore.setSystemAppDate(appDt)
|
|
135
|
+
}
|
|
136
|
+
|
|
123
137
|
function rejectLoginWithoutOrg(): never {
|
|
124
138
|
showToast(LOGIN_UNAVAILABLE_MESSAGE)
|
|
125
139
|
throw new Error(LOGIN_UNAVAILABLE_MESSAGE)
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
2
|
<main class="page">
|
|
5
|
-
<header class="page-header">
|
|
6
|
-
<button class="back-btn" type="button" @click="$router.back()">←</button>
|
|
7
|
-
<h1>人民币净借记可用额度管理</h1>
|
|
8
|
-
</header>
|
|
9
3
|
<section class="page-body">
|
|
10
4
|
<p class="placeholder">页面建设中…</p>
|
|
11
5
|
</section>
|
|
@@ -20,23 +14,6 @@
|
|
|
20
14
|
padding: 0 11px;
|
|
21
15
|
background: #f7f8fa;
|
|
22
16
|
}
|
|
23
|
-
.page-header {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 8px;
|
|
27
|
-
height: 48px;
|
|
28
|
-
}
|
|
29
|
-
.back-btn {
|
|
30
|
-
border: 0;
|
|
31
|
-
background: transparent;
|
|
32
|
-
font-size: 20px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
}
|
|
35
|
-
.page-header h1 {
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-size: 17px;
|
|
38
|
-
font-weight: 700;
|
|
39
|
-
}
|
|
40
17
|
.page-body {
|
|
41
18
|
padding: 24px 0;
|
|
42
19
|
}
|
|
@@ -20,7 +20,6 @@ type PositionSection = {
|
|
|
20
20
|
items: PositionItem[]
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const router = useRouter()
|
|
24
23
|
const balanceDetail = ref<PbcPositionBalance | null>(null)
|
|
25
24
|
const sending = ref(false)
|
|
26
25
|
const querying = ref(false)
|
|
@@ -152,15 +151,6 @@ function getErrorMessage(error: unknown, fallback: string) {
|
|
|
152
151
|
|
|
153
152
|
<template>
|
|
154
153
|
<main class="pbc-page">
|
|
155
|
-
<header class="pbc-header">
|
|
156
|
-
<button class="back-btn" type="button" aria-label="返回" @click="router.back()">
|
|
157
|
-
<van-icon name="arrow-left" />
|
|
158
|
-
<span>返回</span>
|
|
159
|
-
</button>
|
|
160
|
-
<h1>人行头寸余额查询</h1>
|
|
161
|
-
<span class="header-spacer" aria-hidden="true"></span>
|
|
162
|
-
</header>
|
|
163
|
-
|
|
164
154
|
<section class="balance-card" aria-label="人行头寸余额">
|
|
165
155
|
<div v-for="section in positionSections" :key="section.key" class="info-section">
|
|
166
156
|
<dl class="info-list">
|
|
@@ -222,51 +212,6 @@ button {
|
|
|
222
212
|
appearance: none;
|
|
223
213
|
}
|
|
224
214
|
|
|
225
|
-
.pbc-header {
|
|
226
|
-
position: relative;
|
|
227
|
-
display: grid;
|
|
228
|
-
grid-template-columns: 88px minmax(0, 1fr) 88px;
|
|
229
|
-
align-items: end;
|
|
230
|
-
height: calc(env(safe-area-inset-top, 0px) + 68px);
|
|
231
|
-
padding: calc(env(safe-area-inset-top, 0px) + 15px) 14px 14px;
|
|
232
|
-
color: #ffffff;
|
|
233
|
-
background:
|
|
234
|
-
radial-gradient(circle at 80% 12%, rgba(255, 126, 126, 0.24), transparent 86px),
|
|
235
|
-
linear-gradient(135deg, #ff2c31 0%, #ff2029 58%, #ff3337 100%);
|
|
236
|
-
box-shadow: 0 2px 7px rgba(230, 30, 36, 0.2);
|
|
237
|
-
box-sizing: border-box;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.back-btn {
|
|
241
|
-
display: inline-flex;
|
|
242
|
-
align-items: center;
|
|
243
|
-
justify-self: start;
|
|
244
|
-
min-width: 74px;
|
|
245
|
-
height: 38px;
|
|
246
|
-
color: #ffffff;
|
|
247
|
-
font-size: 19px;
|
|
248
|
-
font-weight: 520;
|
|
249
|
-
line-height: 1;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.back-btn .van-icon {
|
|
253
|
-
margin-right: 5px;
|
|
254
|
-
font-size: 29px;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.pbc-header h1 {
|
|
258
|
-
min-width: 0;
|
|
259
|
-
margin: 0;
|
|
260
|
-
overflow: hidden;
|
|
261
|
-
color: #ffffff;
|
|
262
|
-
font-size: 20px;
|
|
263
|
-
font-weight: 700;
|
|
264
|
-
line-height: 38px;
|
|
265
|
-
text-align: center;
|
|
266
|
-
text-overflow: ellipsis;
|
|
267
|
-
white-space: nowrap;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
215
|
.balance-card {
|
|
271
216
|
overflow: hidden;
|
|
272
217
|
margin: 17px 13px 0;
|
|
@@ -401,19 +346,6 @@ button {
|
|
|
401
346
|
}
|
|
402
347
|
|
|
403
348
|
@media (max-width: 350px) {
|
|
404
|
-
.pbc-header {
|
|
405
|
-
grid-template-columns: 92px minmax(0, 1fr) 92px;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.back-btn {
|
|
409
|
-
min-width: 76px;
|
|
410
|
-
font-size: 17px;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.pbc-header h1 {
|
|
414
|
-
font-size: 18px;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
349
|
.field-label,
|
|
418
350
|
.info-row dd {
|
|
419
351
|
font-size: 13px;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
2
|
<main class="page">
|
|
5
|
-
<header class="page-header">
|
|
6
|
-
<button class="back-btn" type="button" @click="$router.back()">←</button>
|
|
7
|
-
<h1>头寸匡算</h1>
|
|
8
|
-
</header>
|
|
9
3
|
<section class="page-body">
|
|
10
4
|
<p class="placeholder">页面建设中…</p>
|
|
11
5
|
</section>
|
|
@@ -20,23 +14,6 @@
|
|
|
20
14
|
padding: 0 11px;
|
|
21
15
|
background: #f7f8fa;
|
|
22
16
|
}
|
|
23
|
-
.page-header {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 8px;
|
|
27
|
-
height: 48px;
|
|
28
|
-
}
|
|
29
|
-
.back-btn {
|
|
30
|
-
border: 0;
|
|
31
|
-
background: transparent;
|
|
32
|
-
font-size: 20px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
}
|
|
35
|
-
.page-header h1 {
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-size: 17px;
|
|
38
|
-
font-weight: 700;
|
|
39
|
-
}
|
|
40
17
|
.page-body {
|
|
41
18
|
padding: 24px 0;
|
|
42
19
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import dayjs from 'dayjs'
|
|
3
2
|
import {
|
|
4
3
|
buildRmbForecastQueryPayload,
|
|
5
4
|
queryRmbForecastPage,
|
|
6
5
|
type RmbForecastQueryForm,
|
|
7
6
|
type RmbForecastRecord,
|
|
8
7
|
} from '@/api/rmb-position'
|
|
8
|
+
import { useAppStore } from '@/stores/app'
|
|
9
9
|
import {
|
|
10
10
|
forecastStatusMap,
|
|
11
11
|
formatForecastAmount,
|
|
@@ -39,7 +39,8 @@ type PendingForecast = {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const router = useRouter()
|
|
42
|
-
const
|
|
42
|
+
const appStore = useAppStore()
|
|
43
|
+
const defaultTranDate = appStore.systemWorkDate
|
|
43
44
|
const heroImage = `${import.meta.env.BASE_URL}images/5798d7aa-ba8b-4605-8079-58b35495ac55.png`
|
|
44
45
|
const pageSize = 10
|
|
45
46
|
const backTopThreshold = 520
|
|
@@ -51,7 +52,7 @@ const queryForm = reactive({
|
|
|
51
52
|
maxAmount: '',
|
|
52
53
|
})
|
|
53
54
|
|
|
54
|
-
const selectedDate = ref(
|
|
55
|
+
const selectedDate = ref(defaultTranDate)
|
|
55
56
|
const showDatePicker = ref(false)
|
|
56
57
|
const datePickerValue = ref(selectedDate.value.split('-'))
|
|
57
58
|
const minDate = new Date(2020, 0, 1)
|
|
@@ -264,16 +265,6 @@ function isPendingForecast(value: Partial<PendingForecast> | null): value is Pen
|
|
|
264
265
|
|
|
265
266
|
<template>
|
|
266
267
|
<main class="rmb-page">
|
|
267
|
-
<header class="app-header">
|
|
268
|
-
<button class="nav-btn" type="button" aria-label="返回" @click="router.back()">
|
|
269
|
-
<van-icon name="arrow-left" />
|
|
270
|
-
</button>
|
|
271
|
-
<h1>头寸管理平台</h1>
|
|
272
|
-
<button class="capsule-btn" type="button" aria-label="更多">
|
|
273
|
-
<van-icon name="weapp-nav" />
|
|
274
|
-
</button>
|
|
275
|
-
</header>
|
|
276
|
-
|
|
277
268
|
<section class="query-card">
|
|
278
269
|
<div class="hero-panel">
|
|
279
270
|
<div class="hero-copy">
|
|
@@ -411,8 +402,7 @@ function isPendingForecast(value: Partial<PendingForecast> | null): value is Pen
|
|
|
411
402
|
max-width: 750px;
|
|
412
403
|
min-height: 100vh;
|
|
413
404
|
margin: 0 auto;
|
|
414
|
-
padding: calc(env(safe-area-inset-
|
|
415
|
-
calc(env(safe-area-inset-bottom, 0px) + 118px);
|
|
405
|
+
padding: 13px 13px calc(env(safe-area-inset-bottom, 0px) + 118px);
|
|
416
406
|
color: #080d1f;
|
|
417
407
|
background:
|
|
418
408
|
radial-gradient(circle at 50% 0%, rgba(255, 242, 243, 0.92), transparent 118px),
|
|
@@ -432,50 +422,6 @@ button {
|
|
|
432
422
|
appearance: none;
|
|
433
423
|
}
|
|
434
424
|
|
|
435
|
-
.app-header {
|
|
436
|
-
position: relative;
|
|
437
|
-
display: flex;
|
|
438
|
-
align-items: center;
|
|
439
|
-
justify-content: space-between;
|
|
440
|
-
height: 55px;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.app-header h1 {
|
|
444
|
-
position: absolute;
|
|
445
|
-
left: 64px;
|
|
446
|
-
right: 64px;
|
|
447
|
-
margin: 0;
|
|
448
|
-
color: #080d1f;
|
|
449
|
-
font-size: 18px;
|
|
450
|
-
font-weight: 800;
|
|
451
|
-
line-height: 1.2;
|
|
452
|
-
text-align: center;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.nav-btn {
|
|
456
|
-
display: flex;
|
|
457
|
-
align-items: center;
|
|
458
|
-
justify-content: center;
|
|
459
|
-
width: 34px;
|
|
460
|
-
height: 34px;
|
|
461
|
-
color: #080d1f;
|
|
462
|
-
font-size: 24px;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
.capsule-btn {
|
|
466
|
-
display: flex;
|
|
467
|
-
align-items: center;
|
|
468
|
-
justify-content: center;
|
|
469
|
-
width: 42px;
|
|
470
|
-
height: 28px;
|
|
471
|
-
border: 1px solid #e6e9ef;
|
|
472
|
-
border-radius: 16px;
|
|
473
|
-
color: #080d1f;
|
|
474
|
-
font-size: 20px;
|
|
475
|
-
background: rgba(255, 255, 255, 0.88);
|
|
476
|
-
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
425
|
.query-card {
|
|
480
426
|
overflow: hidden;
|
|
481
427
|
border-radius: 13px;
|
|
@@ -539,7 +485,7 @@ button {
|
|
|
539
485
|
|
|
540
486
|
.filter-sticky {
|
|
541
487
|
position: sticky;
|
|
542
|
-
top: env(safe-area-inset-top, 0px);
|
|
488
|
+
top: calc(50px + env(safe-area-inset-top, 0px));
|
|
543
489
|
z-index: 15;
|
|
544
490
|
margin-top: -18px;
|
|
545
491
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import { useAppStore } from '@/stores/app'
|
|
3
3
|
|
|
4
4
|
defineOptions({ name: 'RmbPositionCreatePage' })
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ type PendingForecast = {
|
|
|
13
13
|
|
|
14
14
|
const route = useRoute()
|
|
15
15
|
const router = useRouter()
|
|
16
|
-
const
|
|
16
|
+
const appStore = useAppStore()
|
|
17
17
|
const pendingForecastKey = 'rmb-position:pending-create'
|
|
18
18
|
|
|
19
19
|
const form = reactive({
|
|
@@ -33,7 +33,7 @@ function getInitialTranDate() {
|
|
|
33
33
|
return tranDate
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
return
|
|
36
|
+
return appStore.systemWorkDate
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function parseAmount(value: string) {
|
|
@@ -81,14 +81,6 @@ function submitCreate() {
|
|
|
81
81
|
|
|
82
82
|
<template>
|
|
83
83
|
<main class="create-page">
|
|
84
|
-
<header class="app-header">
|
|
85
|
-
<button class="nav-btn" type="button" aria-label="返回" @click="router.back()">
|
|
86
|
-
<van-icon name="arrow-left" />
|
|
87
|
-
</button>
|
|
88
|
-
<h1>新增本币预报</h1>
|
|
89
|
-
<span class="header-spacer"></span>
|
|
90
|
-
</header>
|
|
91
|
-
|
|
92
84
|
<section class="form-card" aria-label="新增本币预报表单">
|
|
93
85
|
<van-cell-group inset class="forecast-form">
|
|
94
86
|
<van-field
|
|
@@ -128,8 +120,7 @@ function submitCreate() {
|
|
|
128
120
|
max-width: 750px;
|
|
129
121
|
min-height: 100vh;
|
|
130
122
|
margin: 0 auto;
|
|
131
|
-
padding: calc(env(safe-area-inset-
|
|
132
|
-
calc(env(safe-area-inset-bottom, 0px) + 88px);
|
|
123
|
+
padding: 13px 13px calc(env(safe-area-inset-bottom, 0px) + 88px);
|
|
133
124
|
color: #080d1f;
|
|
134
125
|
background:
|
|
135
126
|
radial-gradient(circle at 50% 0%, rgba(255, 242, 243, 0.92), transparent 118px),
|
|
@@ -137,35 +128,6 @@ function submitCreate() {
|
|
|
137
128
|
box-sizing: border-box;
|
|
138
129
|
}
|
|
139
130
|
|
|
140
|
-
.app-header {
|
|
141
|
-
display: grid;
|
|
142
|
-
grid-template-columns: 36px 1fr 36px;
|
|
143
|
-
align-items: center;
|
|
144
|
-
height: 39px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.app-header h1 {
|
|
148
|
-
margin: 0;
|
|
149
|
-
color: #111728;
|
|
150
|
-
font-size: 17px;
|
|
151
|
-
font-weight: 750;
|
|
152
|
-
text-align: center;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.nav-btn,
|
|
156
|
-
.header-spacer {
|
|
157
|
-
width: 32px;
|
|
158
|
-
height: 32px;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.nav-btn {
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
color: #111728;
|
|
166
|
-
font-size: 20px;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
131
|
.form-card {
|
|
170
132
|
margin-top: 15px;
|
|
171
133
|
border-radius: 13px;
|
|
@@ -133,14 +133,6 @@ function fieldText(value?: string) {
|
|
|
133
133
|
|
|
134
134
|
<template>
|
|
135
135
|
<main class="detail-page">
|
|
136
|
-
<header class="app-header">
|
|
137
|
-
<button class="nav-btn" type="button" aria-label="返回" @click="router.back()">
|
|
138
|
-
<van-icon name="arrow-left" />
|
|
139
|
-
</button>
|
|
140
|
-
<h1>预报详情</h1>
|
|
141
|
-
<span class="header-spacer"></span>
|
|
142
|
-
</header>
|
|
143
|
-
|
|
144
136
|
<section v-if="loading" class="state-section">
|
|
145
137
|
<van-loading vertical>加载中...</van-loading>
|
|
146
138
|
</section>
|
|
@@ -186,8 +178,7 @@ function fieldText(value?: string) {
|
|
|
186
178
|
max-width: 750px;
|
|
187
179
|
min-height: 100vh;
|
|
188
180
|
margin: 0 auto;
|
|
189
|
-
padding: calc(env(safe-area-inset-
|
|
190
|
-
calc(env(safe-area-inset-bottom, 0px) + 24px);
|
|
181
|
+
padding: 13px 13px calc(env(safe-area-inset-bottom, 0px) + 24px);
|
|
191
182
|
color: #080d1f;
|
|
192
183
|
background:
|
|
193
184
|
radial-gradient(circle at 50% 0%, rgba(255, 242, 243, 0.92), transparent 118px),
|
|
@@ -202,35 +193,6 @@ button {
|
|
|
202
193
|
appearance: none;
|
|
203
194
|
}
|
|
204
195
|
|
|
205
|
-
.app-header {
|
|
206
|
-
display: grid;
|
|
207
|
-
grid-template-columns: 36px 1fr 36px;
|
|
208
|
-
align-items: center;
|
|
209
|
-
height: 39px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.app-header h1 {
|
|
213
|
-
margin: 0;
|
|
214
|
-
color: #111728;
|
|
215
|
-
font-size: 17px;
|
|
216
|
-
font-weight: 750;
|
|
217
|
-
text-align: center;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.nav-btn,
|
|
221
|
-
.header-spacer {
|
|
222
|
-
width: 32px;
|
|
223
|
-
height: 32px;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.nav-btn {
|
|
227
|
-
display: flex;
|
|
228
|
-
align-items: center;
|
|
229
|
-
justify-content: center;
|
|
230
|
-
color: #111728;
|
|
231
|
-
font-size: 20px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
196
|
.state-section {
|
|
235
197
|
display: flex;
|
|
236
198
|
justify-content: center;
|
|
@@ -3,7 +3,6 @@ import { useAppStore } from '@/stores/app'
|
|
|
3
3
|
|
|
4
4
|
defineOptions({ name: 'SettingsPage' })
|
|
5
5
|
|
|
6
|
-
const router = useRouter()
|
|
7
6
|
const appStore = useAppStore()
|
|
8
7
|
|
|
9
8
|
const showAnnouncementTab = computed({
|
|
@@ -14,23 +13,11 @@ const showAnnouncementTab = computed({
|
|
|
14
13
|
|
|
15
14
|
<template>
|
|
16
15
|
<main class="settings-page">
|
|
17
|
-
<header class="settings-header">
|
|
18
|
-
<button class="header-icon-btn" type="button" aria-label="返回" @click="router.back()">
|
|
19
|
-
<van-icon name="arrow-left" />
|
|
20
|
-
</button>
|
|
21
|
-
<h1>设置</h1>
|
|
22
|
-
<span class="header-spacer"></span>
|
|
23
|
-
</header>
|
|
24
|
-
|
|
25
16
|
<section class="settings-section">
|
|
26
17
|
<van-cell-group inset>
|
|
27
18
|
<van-cell title="显示公告" label="控制底部导航栏是否显示公告入口" center>
|
|
28
19
|
<template #right-icon>
|
|
29
|
-
<van-switch
|
|
30
|
-
v-model="showAnnouncementTab"
|
|
31
|
-
size="22px"
|
|
32
|
-
active-color="#f22f3d"
|
|
33
|
-
/>
|
|
20
|
+
<van-switch v-model="showAnnouncementTab" size="22px" active-color="#f22f3d" />
|
|
34
21
|
</template>
|
|
35
22
|
</van-cell>
|
|
36
23
|
</van-cell-group>
|
|
@@ -50,46 +37,6 @@ const showAnnouncementTab = computed({
|
|
|
50
37
|
box-sizing: border-box;
|
|
51
38
|
}
|
|
52
39
|
|
|
53
|
-
.settings-header {
|
|
54
|
-
position: sticky;
|
|
55
|
-
top: 0;
|
|
56
|
-
z-index: 10;
|
|
57
|
-
display: grid;
|
|
58
|
-
grid-template-columns: 40px minmax(0, 1fr) 40px;
|
|
59
|
-
align-items: center;
|
|
60
|
-
height: 50px;
|
|
61
|
-
background: rgba(247, 248, 250, 0.96);
|
|
62
|
-
backdrop-filter: blur(10px);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.settings-header h1 {
|
|
66
|
-
margin: 0;
|
|
67
|
-
color: #171b20;
|
|
68
|
-
font-size: 17px;
|
|
69
|
-
font-weight: 700;
|
|
70
|
-
line-height: 1.2;
|
|
71
|
-
text-align: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.header-icon-btn {
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
width: 34px;
|
|
79
|
-
height: 34px;
|
|
80
|
-
border: 0;
|
|
81
|
-
border-radius: 50%;
|
|
82
|
-
color: #171b20;
|
|
83
|
-
font-size: 20px;
|
|
84
|
-
background: transparent;
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.header-spacer {
|
|
89
|
-
width: 34px;
|
|
90
|
-
height: 34px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
40
|
.settings-section {
|
|
94
41
|
margin-top: 14px;
|
|
95
42
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
2
|
<main class="page">
|
|
5
|
-
<header class="page-header">
|
|
6
|
-
<button class="back-btn" type="button" @click="$router.back()">←</button>
|
|
7
|
-
<h1>预警信息</h1>
|
|
8
|
-
</header>
|
|
9
3
|
<section class="page-body">
|
|
10
4
|
<p class="placeholder">页面建设中…</p>
|
|
11
5
|
</section>
|
|
@@ -20,23 +14,6 @@
|
|
|
20
14
|
padding: 0 11px;
|
|
21
15
|
background: #f7f8fa;
|
|
22
16
|
}
|
|
23
|
-
.page-header {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 8px;
|
|
27
|
-
height: 48px;
|
|
28
|
-
}
|
|
29
|
-
.back-btn {
|
|
30
|
-
border: 0;
|
|
31
|
-
background: transparent;
|
|
32
|
-
font-size: 20px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
}
|
|
35
|
-
.page-header h1 {
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-size: 17px;
|
|
38
|
-
font-weight: 700;
|
|
39
|
-
}
|
|
40
17
|
.page-body {
|
|
41
18
|
padding: 24px 0;
|
|
42
19
|
}
|
|
@@ -22,7 +22,7 @@ export default defineConfig(({ command, mode }) => {
|
|
|
22
22
|
},
|
|
23
23
|
plugins: [
|
|
24
24
|
vue(),
|
|
25
|
-
vueDevTools(),
|
|
25
|
+
env.VITE_ENABLE_VUE_DEVTOOLS === 'true' && vueDevTools(),
|
|
26
26
|
|
|
27
27
|
// 自动导入 Vue / Vue Router / Pinia / VueUse / Vant 的 API,省去手动 import
|
|
28
28
|
AutoImport({
|
|
@@ -31,7 +31,15 @@ export default defineConfig(({ command, mode }) => {
|
|
|
31
31
|
'vue-router',
|
|
32
32
|
'pinia',
|
|
33
33
|
'@vueuse/core',
|
|
34
|
-
{
|
|
34
|
+
{
|
|
35
|
+
vant: [
|
|
36
|
+
'showToast',
|
|
37
|
+
'showDialog',
|
|
38
|
+
'showConfirmDialog',
|
|
39
|
+
'showLoadingToast',
|
|
40
|
+
'closeToast',
|
|
41
|
+
],
|
|
42
|
+
},
|
|
35
43
|
],
|
|
36
44
|
dts: 'src/auto-imports.d.ts',
|
|
37
45
|
vueTemplate: true,
|