verce-vue-test 0.0.48 → 0.0.49
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/package.json +1 -1
- package/mini2.0/.editorconfig +0 -8
- package/mini2.0/.env.development +0 -3
- package/mini2.0/.env.production +0 -3
- package/mini2.0/.env.test +0 -3
- package/mini2.0/.gitattributes +0 -1
- package/mini2.0/.oxlintrc.json +0 -10
- package/mini2.0/.prettierrc.json +0 -6
- package/mini2.0/.vscode/extensions.json +0 -9
- package/mini2.0/README.md +0 -179
- package/mini2.0/auto-imports.d.ts +0 -629
- package/mini2.0/components.d.ts +0 -21
- package/mini2.0/design-qa.md +0 -36
- package/mini2.0/docs/MX_API.md +0 -244
- package/mini2.0/docs/REQUEST.md +0 -217
- package/mini2.0/docs/jsapi.js +0 -515
- package/mini2.0/docs/package-json-guide.md +0 -132
- package/mini2.0/env.d.ts +0 -15
- package/mini2.0/eslint.config.ts +0 -26
- package/mini2.0/index.html +0 -16
- package/mini2.0/package-lock.json +0 -6473
- package/mini2.0/package.json +0 -66
- package/mini2.0/plugins/bump-version.ts +0 -61
- package/mini2.0/postcss.config.ts +0 -15
- package/mini2.0/public/favicon.ico +0 -0
- package/mini2.0/public/images/12a73787-86a9-4891-a65f-66104746f6a8.png +0 -0
- package/mini2.0/public/images/5798d7aa-ba8b-4605-8079-58b35495ac55.png +0 -0
- package/mini2.0/public/images/73fef1e4-0fd0-4a1a-9b8b-a70a5b6acbbc.png +0 -0
- package/mini2.0/public/images/bc685b4c-0cca-4a79-924c-a8ee10e6f8eb.png +0 -0
- package/mini2.0/public/images/c3dbbd9d-be56-490e-b9f4-6ee17ebefffc.png +0 -0
- package/mini2.0/public/images/ea745a10-42aa-4f44-8d7f-3ab02cc0adcd.png +0 -0
- package/mini2.0/public/images/f5876785-b927-4347-ba19-999114240649.png +0 -0
- package/mini2.0/public/images/img.png +0 -0
- package/mini2.0/src/App.vue +0 -59
- package/mini2.0/src/api/health.ts +0 -13
- package/mini2.0/src/api/rmb-position.ts +0 -287
- package/mini2.0/src/api/user.ts +0 -54
- package/mini2.0/src/auto-imports.d.ts +0 -639
- package/mini2.0/src/components.d.ts +0 -30
- package/mini2.0/src/config/config.properties +0 -3
- package/mini2.0/src/config/env.ts +0 -6
- package/mini2.0/src/config/plugin.properties.pro +0 -6
- package/mini2.0/src/config/plugin.properties.test +0 -6
- package/mini2.0/src/core/mxApi/index.ts +0 -344
- package/mini2.0/src/core/request/index.ts +0 -135
- package/mini2.0/src/main.ts +0 -39
- package/mini2.0/src/router/index.ts +0 -77
- package/mini2.0/src/stores/app.ts +0 -24
- package/mini2.0/src/stores/counter.ts +0 -12
- package/mini2.0/src/stores/user.ts +0 -85
- package/mini2.0/src/types/api.d.ts +0 -14
- package/mini2.0/src/types/nprogress.d.ts +0 -8
- package/mini2.0/src/utils/auth-token.ts +0 -197
- package/mini2.0/src/utils/query.ts +0 -27
- package/mini2.0/src/utils/request.ts +0 -233
- package/mini2.0/src/views/clearing-detail/index.vue +0 -49
- package/mini2.0/src/views/foreign-position/index.vue +0 -49
- package/mini2.0/src/views/home/index.vue +0 -213
- package/mini2.0/src/views/login/index.vue +0 -202
- package/mini2.0/src/views/mine/index.vue +0 -143
- package/mini2.0/src/views/net-debit/index.vue +0 -49
- package/mini2.0/src/views/pbc-position/index.vue +0 -49
- package/mini2.0/src/views/position-estimate/index.vue +0 -49
- package/mini2.0/src/views/rmb-position/index.vue +0 -1042
- package/mini2.0/src/views/warning/index.vue +0 -49
- package/mini2.0/tsconfig.app.json +0 -18
- package/mini2.0/tsconfig.json +0 -11
- package/mini2.0/tsconfig.node.json +0 -28
- package/mini2.0/vite.config.ts +0 -98
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts" name="HomePage">
|
|
2
|
-
import { healthCheckApi } from '@/api/health'
|
|
3
|
-
|
|
4
|
-
type HomeFeature = {
|
|
5
|
-
title: string[]
|
|
6
|
-
image: string
|
|
7
|
-
route: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
defineOptions({ name: 'HomePage' })
|
|
11
|
-
|
|
12
|
-
const bannerImage = `${import.meta.env.BASE_URL}images/img.png`
|
|
13
|
-
|
|
14
|
-
const router = useRouter()
|
|
15
|
-
|
|
16
|
-
onMounted(() => {
|
|
17
|
-
healthCheckApi()
|
|
18
|
-
.then((res) => {
|
|
19
|
-
console.log('[首页] 健康检查成功', res)
|
|
20
|
-
})
|
|
21
|
-
.catch((error) => {
|
|
22
|
-
console.error('[首页] 健康检查失败', error)
|
|
23
|
-
})
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const features: HomeFeature[] = [
|
|
27
|
-
{
|
|
28
|
-
title: ['人民币头寸', '预报及查询'],
|
|
29
|
-
image: `${import.meta.env.BASE_URL}images/f5876785-b927-4347-ba19-999114240649.png`,
|
|
30
|
-
route: '/rmb-position',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: ['外币头寸', '预报及查询'],
|
|
34
|
-
image: `${import.meta.env.BASE_URL}images/12a73787-86a9-4891-a65f-66104746f6a8.png`,
|
|
35
|
-
route: '/foreign-position',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: ['人行头寸', '余额查询'],
|
|
39
|
-
image: `${import.meta.env.BASE_URL}images/73fef1e4-0fd0-4a1a-9b8b-a70a5b6acbbc.png`,
|
|
40
|
-
route: '/pbc-position',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: ['头寸匡算'],
|
|
44
|
-
image: `${import.meta.env.BASE_URL}images/ea745a10-42aa-4f44-8d7f-3ab02cc0adcd.png`,
|
|
45
|
-
route: '/position-estimate',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
title: ['人民币净借记', '可用额度管理'],
|
|
49
|
-
image: `${import.meta.env.BASE_URL}images/5798d7aa-ba8b-4605-8079-58b35495ac55.png`,
|
|
50
|
-
route: '/net-debit',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
title: ['人民币小额网银', '清算场次明细'],
|
|
54
|
-
image: `${import.meta.env.BASE_URL}images/c3dbbd9d-be56-490e-b9f4-6ee17ebefffc.png`,
|
|
55
|
-
route: '/clearing-detail',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: ['预警信息'],
|
|
59
|
-
image: `${import.meta.env.BASE_URL}images/bc685b4c-0cca-4a79-924c-a8ee10e6f8eb.png`,
|
|
60
|
-
route: '/warning',
|
|
61
|
-
},
|
|
62
|
-
]
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<template>
|
|
66
|
-
<main class="home-page">
|
|
67
|
-
<section class="banner-section" aria-label="欢迎登录头寸管理系统">
|
|
68
|
-
<img class="banner-image" :src="bannerImage" alt="欢迎登录头寸管理系统" />
|
|
69
|
-
</section>
|
|
70
|
-
|
|
71
|
-
<section class="feature-section">
|
|
72
|
-
<div class="section-title">
|
|
73
|
-
<span class="section-title-mark"></span>
|
|
74
|
-
<h2>常用功能</h2>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div class="feature-grid">
|
|
78
|
-
<button
|
|
79
|
-
v-for="item in features"
|
|
80
|
-
:key="item.title.join('')"
|
|
81
|
-
class="feature-card"
|
|
82
|
-
type="button"
|
|
83
|
-
@click="router.push(item.route)"
|
|
84
|
-
>
|
|
85
|
-
<span class="feature-title">
|
|
86
|
-
<span v-for="line in item.title" :key="line">{{ line }}</span>
|
|
87
|
-
</span>
|
|
88
|
-
<span class="feature-arrow" aria-hidden="true"><van-icon name="arrow" /></span>
|
|
89
|
-
<img class="feature-image" :src="item.image" :alt="item.title.join('')" />
|
|
90
|
-
</button>
|
|
91
|
-
</div>
|
|
92
|
-
</section>
|
|
93
|
-
</main>
|
|
94
|
-
</template>
|
|
95
|
-
|
|
96
|
-
<style scoped>
|
|
97
|
-
.home-page {
|
|
98
|
-
width: 100%;
|
|
99
|
-
max-width: 750px;
|
|
100
|
-
min-height: 100vh;
|
|
101
|
-
margin: 0 auto;
|
|
102
|
-
padding: 7px 11px 16px;
|
|
103
|
-
color: #171b20;
|
|
104
|
-
background:
|
|
105
|
-
radial-gradient(circle at 50% 12%, rgba(255, 245, 245, 0.88), transparent 124px),
|
|
106
|
-
#ffffff;
|
|
107
|
-
box-sizing: border-box;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.feature-card {
|
|
111
|
-
border: 0;
|
|
112
|
-
padding: 0;
|
|
113
|
-
font: inherit;
|
|
114
|
-
background: transparent;
|
|
115
|
-
appearance: none;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.banner-image {
|
|
119
|
-
display: block;
|
|
120
|
-
width: 100%;
|
|
121
|
-
height: auto;
|
|
122
|
-
border-radius: 9px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.feature-section {
|
|
126
|
-
margin-top: 18px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.section-title {
|
|
130
|
-
display: flex;
|
|
131
|
-
align-items: center;
|
|
132
|
-
gap: 8px;
|
|
133
|
-
height: 28px;
|
|
134
|
-
margin-bottom: 11px;
|
|
135
|
-
padding-left: 2px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.section-title-mark {
|
|
139
|
-
width: 5px;
|
|
140
|
-
height: 16px;
|
|
141
|
-
border-radius: 8px;
|
|
142
|
-
background: linear-gradient(180deg, #ff1826 0%, #ff4854 100%);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.section-title h2 {
|
|
146
|
-
margin: 0;
|
|
147
|
-
color: #171b20;
|
|
148
|
-
font-size: 16px;
|
|
149
|
-
font-weight: 700;
|
|
150
|
-
line-height: 1;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.feature-grid {
|
|
154
|
-
display: grid;
|
|
155
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
156
|
-
gap: 8px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.feature-card {
|
|
160
|
-
position: relative;
|
|
161
|
-
height: 104px;
|
|
162
|
-
overflow: hidden;
|
|
163
|
-
text-align: left;
|
|
164
|
-
border: 1px solid #ffdfe1;
|
|
165
|
-
border-radius: 9px;
|
|
166
|
-
background:
|
|
167
|
-
radial-gradient(circle at 78% 74%, rgba(255, 225, 225, 0.52), transparent 58px),
|
|
168
|
-
linear-gradient(135deg, #fff4f4 0%, #ffffff 52%, #fffafa 100%);
|
|
169
|
-
box-shadow: 0 4px 14px rgba(250, 70, 78, 0.035);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.feature-title {
|
|
173
|
-
position: absolute;
|
|
174
|
-
top: 16px;
|
|
175
|
-
left: 12px;
|
|
176
|
-
z-index: 1;
|
|
177
|
-
display: flex;
|
|
178
|
-
flex-direction: column;
|
|
179
|
-
width: 104px;
|
|
180
|
-
padding: 0;
|
|
181
|
-
color: #15191d;
|
|
182
|
-
font-size: 15px;
|
|
183
|
-
font-weight: 700;
|
|
184
|
-
line-height: 1.42;
|
|
185
|
-
word-break: keep-all;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.feature-arrow {
|
|
189
|
-
position: absolute;
|
|
190
|
-
left: 12px;
|
|
191
|
-
bottom: 20px;
|
|
192
|
-
z-index: 2;
|
|
193
|
-
display: flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
justify-content: center;
|
|
196
|
-
width: 18px;
|
|
197
|
-
height: 18px;
|
|
198
|
-
border-radius: 50%;
|
|
199
|
-
background: linear-gradient(135deg, #ff3443 0%, #ff5b62 100%);
|
|
200
|
-
color: #ffffff;
|
|
201
|
-
font-size: 11px;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.feature-image {
|
|
205
|
-
position: absolute;
|
|
206
|
-
right: -4px;
|
|
207
|
-
bottom: -7px;
|
|
208
|
-
width: 94px;
|
|
209
|
-
height: 94px;
|
|
210
|
-
object-fit: contain;
|
|
211
|
-
pointer-events: none;
|
|
212
|
-
}
|
|
213
|
-
</style>
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useRouter } from 'vue-router'
|
|
3
|
-
import { loginApi, loginByAppTokenApi } from '@/api/user'
|
|
4
|
-
import { showToast } from 'vant'
|
|
5
|
-
import { useAppStore } from '@/stores/app'
|
|
6
|
-
import { getAppToken } from '@/core/mxApi'
|
|
7
|
-
import { saveAuthTokens, type AuthTokenResponse } from '@/utils/auth-token'
|
|
8
|
-
|
|
9
|
-
const router = useRouter()
|
|
10
|
-
const appStore = useAppStore()
|
|
11
|
-
|
|
12
|
-
const form = ref({
|
|
13
|
-
username: '',
|
|
14
|
-
password: '',
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const loading = ref(false)
|
|
18
|
-
const appVersion = __APP_VERSION__
|
|
19
|
-
const APP_TOKEN_TIMEOUT = 30000
|
|
20
|
-
|
|
21
|
-
onMounted(() => {
|
|
22
|
-
if (!appStore.isNative) return
|
|
23
|
-
|
|
24
|
-
loginWithAppToken()
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
async function loginWithAppToken() {
|
|
28
|
-
loading.value = true
|
|
29
|
-
try {
|
|
30
|
-
const appToken = await getAppTokenWithTimeout()
|
|
31
|
-
const res = await loginByAppTokenApi(appToken)
|
|
32
|
-
saveBusinessToken(res)
|
|
33
|
-
showToast('登录成功')
|
|
34
|
-
router.push('/')
|
|
35
|
-
} catch (error) {
|
|
36
|
-
console.error('[登录页] APP token 自动登录失败', error)
|
|
37
|
-
showToast({ message: 'APP 自动登录失败,请手动登录', duration: 3000 })
|
|
38
|
-
appStore.isNative = false
|
|
39
|
-
} finally {
|
|
40
|
-
loading.value = false
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function getAppTokenWithTimeout() {
|
|
45
|
-
return Promise.race([
|
|
46
|
-
getAppToken(),
|
|
47
|
-
new Promise<string>((_, reject) => {
|
|
48
|
-
window.setTimeout(() => {
|
|
49
|
-
reject(new Error('30 秒内未获取到敏行 token'))
|
|
50
|
-
}, APP_TOKEN_TIMEOUT)
|
|
51
|
-
}),
|
|
52
|
-
])
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async function onSubmit() {
|
|
56
|
-
loading.value = true
|
|
57
|
-
try {
|
|
58
|
-
const res = await loginApi(form.value)
|
|
59
|
-
saveBusinessToken(res)
|
|
60
|
-
showToast('登录成功')
|
|
61
|
-
router.push('/')
|
|
62
|
-
} catch {
|
|
63
|
-
// 错误已由 request.ts 拦截器统一处理
|
|
64
|
-
} finally {
|
|
65
|
-
loading.value = false
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function saveBusinessToken(response: unknown) {
|
|
70
|
-
saveAuthTokens(response as AuthTokenResponse)
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
|
-
|
|
74
|
-
<template>
|
|
75
|
-
<div class="login-page">
|
|
76
|
-
<van-loading v-if="appStore.isNative" vertical class="native-loading">
|
|
77
|
-
正在登录...
|
|
78
|
-
</van-loading>
|
|
79
|
-
|
|
80
|
-
<template v-else>
|
|
81
|
-
<section class="login-header">
|
|
82
|
-
<p class="login-eyebrow">Welcome back</p>
|
|
83
|
-
<h1 class="login-title">账号登录</h1>
|
|
84
|
-
<p class="login-subtitle">请输入账号信息继续访问</p>
|
|
85
|
-
</section>
|
|
86
|
-
|
|
87
|
-
<van-form class="login-form" @submit="onSubmit">
|
|
88
|
-
<van-cell-group inset class="form-panel">
|
|
89
|
-
<van-field
|
|
90
|
-
v-model="form.username"
|
|
91
|
-
name="username"
|
|
92
|
-
label="用户名"
|
|
93
|
-
placeholder="请输入用户名"
|
|
94
|
-
:rules="[{ required: true, message: '请输入用户名' }]"
|
|
95
|
-
/>
|
|
96
|
-
<van-field
|
|
97
|
-
v-model="form.password"
|
|
98
|
-
type="password"
|
|
99
|
-
name="password"
|
|
100
|
-
label="密码"
|
|
101
|
-
placeholder="请输入密码"
|
|
102
|
-
:rules="[{ required: true, message: '请输入密码' }]"
|
|
103
|
-
/>
|
|
104
|
-
</van-cell-group>
|
|
105
|
-
<div class="btn-wrap">
|
|
106
|
-
<van-button block round type="primary" native-type="submit" :loading="loading">
|
|
107
|
-
登录
|
|
108
|
-
</van-button>
|
|
109
|
-
</div>
|
|
110
|
-
</van-form>
|
|
111
|
-
</template>
|
|
112
|
-
|
|
113
|
-
<footer class="login-version">v{{ appVersion }}</footer>
|
|
114
|
-
</div>
|
|
115
|
-
</template>
|
|
116
|
-
|
|
117
|
-
<style scoped>
|
|
118
|
-
.login-page {
|
|
119
|
-
min-height: 100vh;
|
|
120
|
-
padding: 72px 24px 24px;
|
|
121
|
-
display: flex;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
background:
|
|
124
|
-
radial-gradient(circle at 18% 8%, rgba(25, 137, 250, 0.16), transparent 110px),
|
|
125
|
-
linear-gradient(180deg, #f6f9ff 0%, #ffffff 44%, #f7f8fa 100%);
|
|
126
|
-
box-sizing: border-box;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.login-header {
|
|
130
|
-
margin-bottom: 36px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.login-eyebrow {
|
|
134
|
-
margin: 0 0 10px;
|
|
135
|
-
color: #1989fa;
|
|
136
|
-
font-size: 14px;
|
|
137
|
-
font-weight: 600;
|
|
138
|
-
line-height: 1.2;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.login-title {
|
|
142
|
-
margin: 0;
|
|
143
|
-
color: #1f2937;
|
|
144
|
-
font-size: 28px;
|
|
145
|
-
font-weight: 700;
|
|
146
|
-
line-height: 1.18;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.login-subtitle {
|
|
150
|
-
margin: 10px 0 0;
|
|
151
|
-
color: #6b7280;
|
|
152
|
-
font-size: 15px;
|
|
153
|
-
line-height: 1.5;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.login-form {
|
|
157
|
-
--van-cell-font-size: 15px;
|
|
158
|
-
--van-cell-line-height: 24px;
|
|
159
|
-
--van-cell-vertical-padding: 15px;
|
|
160
|
-
--van-cell-horizontal-padding: 16px;
|
|
161
|
-
--van-field-label-width: 66px;
|
|
162
|
-
--van-field-label-margin-right: 8px;
|
|
163
|
-
--van-field-placeholder-text-color: #b6bdc8;
|
|
164
|
-
--van-button-large-height: 48px;
|
|
165
|
-
--van-button-default-height: 48px;
|
|
166
|
-
--van-button-default-font-size: 17px;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.form-panel {
|
|
170
|
-
margin: 0;
|
|
171
|
-
border-radius: 14px;
|
|
172
|
-
overflow: hidden;
|
|
173
|
-
box-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.btn-wrap {
|
|
177
|
-
margin-top: 28px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.btn-wrap :deep(.van-button) {
|
|
181
|
-
border: 0;
|
|
182
|
-
background: linear-gradient(135deg, #1989fa 0%, #1268e5 100%);
|
|
183
|
-
box-shadow: 0 9px 18px rgba(25, 137, 250, 0.26);
|
|
184
|
-
font-weight: 600;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.native-loading {
|
|
188
|
-
display: flex;
|
|
189
|
-
justify-content: center;
|
|
190
|
-
align-items: center;
|
|
191
|
-
min-height: 60vh;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.login-version {
|
|
195
|
-
margin-top: auto;
|
|
196
|
-
padding-top: 28px;
|
|
197
|
-
color: #9ca3af;
|
|
198
|
-
font-size: 12px;
|
|
199
|
-
line-height: 1.4;
|
|
200
|
-
text-align: center;
|
|
201
|
-
}
|
|
202
|
-
</style>
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useUserStore } from '@/stores/user'
|
|
3
|
-
|
|
4
|
-
defineOptions({ name: 'MinePage' })
|
|
5
|
-
|
|
6
|
-
const router = useRouter()
|
|
7
|
-
const userStore = useUserStore()
|
|
8
|
-
const appVersion = __APP_VERSION__
|
|
9
|
-
|
|
10
|
-
const tokenText = computed(() => (userStore.token ? '已登录' : '未登录'))
|
|
11
|
-
const displayName = computed(() => userStore.realName || userStore.username || tokenText.value)
|
|
12
|
-
const organizationNameText = computed(() => userStore.organizationName || '暂无所属机构')
|
|
13
|
-
|
|
14
|
-
async function handleLogout() {
|
|
15
|
-
try {
|
|
16
|
-
await showConfirmDialog({
|
|
17
|
-
title: '退出登录',
|
|
18
|
-
message: '确认退出当前账号?',
|
|
19
|
-
confirmButtonText: '退出',
|
|
20
|
-
confirmButtonColor: '#f22f3d',
|
|
21
|
-
})
|
|
22
|
-
userStore.clearToken()
|
|
23
|
-
showToast('已退出登录')
|
|
24
|
-
router.replace('/login')
|
|
25
|
-
} catch {
|
|
26
|
-
// 用户取消时不需要处理
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<main class="mine-page">
|
|
33
|
-
<section class="profile-header">
|
|
34
|
-
<div class="avatar" aria-hidden="true">
|
|
35
|
-
<van-icon name="manager-o" />
|
|
36
|
-
</div>
|
|
37
|
-
<div class="profile-copy">
|
|
38
|
-
<h1>{{ displayName }}</h1>
|
|
39
|
-
<p>{{ organizationNameText }}</p>
|
|
40
|
-
</div>
|
|
41
|
-
</section>
|
|
42
|
-
|
|
43
|
-
<section class="info-section">
|
|
44
|
-
<van-cell-group inset>
|
|
45
|
-
<van-cell title="登录状态" :value="tokenText" />
|
|
46
|
-
<van-cell title="应用版本" :value="`v${appVersion}`" />
|
|
47
|
-
</van-cell-group>
|
|
48
|
-
</section>
|
|
49
|
-
|
|
50
|
-
<section class="action-section">
|
|
51
|
-
<van-button block round type="danger" plain @click="handleLogout">退出登录</van-button>
|
|
52
|
-
</section>
|
|
53
|
-
</main>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
56
|
-
<style scoped>
|
|
57
|
-
.mine-page {
|
|
58
|
-
width: 100%;
|
|
59
|
-
max-width: 750px;
|
|
60
|
-
min-height: 100vh;
|
|
61
|
-
margin: 0 auto;
|
|
62
|
-
padding: 22px 11px 24px;
|
|
63
|
-
color: #171b20;
|
|
64
|
-
background:
|
|
65
|
-
radial-gradient(circle at 16% 4%, rgba(242, 47, 61, 0.1), transparent 112px),
|
|
66
|
-
#f7f8fa;
|
|
67
|
-
box-sizing: border-box;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.profile-header {
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
gap: 14px;
|
|
74
|
-
min-height: 92px;
|
|
75
|
-
padding: 18px 16px;
|
|
76
|
-
border-radius: 8px;
|
|
77
|
-
background: linear-gradient(135deg, #ffffff 0%, #fff5f6 100%);
|
|
78
|
-
box-shadow: 0 6px 18px rgba(22, 27, 34, 0.05);
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.avatar {
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
justify-content: center;
|
|
86
|
-
width: 54px;
|
|
87
|
-
height: 54px;
|
|
88
|
-
flex: 0 0 54px;
|
|
89
|
-
border-radius: 50%;
|
|
90
|
-
color: #ffffff;
|
|
91
|
-
font-size: 28px;
|
|
92
|
-
background: linear-gradient(135deg, #f22f3d 0%, #ff6a71 100%);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.profile-copy {
|
|
96
|
-
flex: 1;
|
|
97
|
-
min-width: 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.profile-copy h1 {
|
|
101
|
-
margin: 0;
|
|
102
|
-
color: #171b20;
|
|
103
|
-
font-size: 22px;
|
|
104
|
-
font-weight: 700;
|
|
105
|
-
line-height: 1.25;
|
|
106
|
-
overflow: hidden;
|
|
107
|
-
text-overflow: ellipsis;
|
|
108
|
-
white-space: nowrap;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.profile-copy p {
|
|
112
|
-
margin: 6px 0 0;
|
|
113
|
-
color: #6b7280;
|
|
114
|
-
font-size: 14px;
|
|
115
|
-
line-height: 1.4;
|
|
116
|
-
overflow: hidden;
|
|
117
|
-
text-overflow: ellipsis;
|
|
118
|
-
white-space: nowrap;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.info-section {
|
|
122
|
-
margin-top: 14px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.info-section :deep(.van-cell-group--inset) {
|
|
126
|
-
margin: 0;
|
|
127
|
-
border-radius: 8px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.info-section :deep(.van-cell) {
|
|
131
|
-
align-items: center;
|
|
132
|
-
min-height: 50px;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.action-section {
|
|
136
|
-
margin-top: 22px;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.action-section :deep(.van-button) {
|
|
140
|
-
height: 46px;
|
|
141
|
-
font-size: 16px;
|
|
142
|
-
}
|
|
143
|
-
</style>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<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
|
-
<section class="page-body">
|
|
10
|
-
<p class="placeholder">页面建设中…</p>
|
|
11
|
-
</section>
|
|
12
|
-
</main>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style scoped>
|
|
16
|
-
.page {
|
|
17
|
-
max-width: 750px;
|
|
18
|
-
min-height: 100vh;
|
|
19
|
-
margin: 0 auto;
|
|
20
|
-
padding: 0 11px;
|
|
21
|
-
background: #f7f8fa;
|
|
22
|
-
}
|
|
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
|
-
.page-body {
|
|
41
|
-
padding: 24px 0;
|
|
42
|
-
}
|
|
43
|
-
.placeholder {
|
|
44
|
-
text-align: center;
|
|
45
|
-
color: #969799;
|
|
46
|
-
font-size: 14px;
|
|
47
|
-
padding-top: 120px;
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<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
|
-
<section class="page-body">
|
|
10
|
-
<p class="placeholder">页面建设中…</p>
|
|
11
|
-
</section>
|
|
12
|
-
</main>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style scoped>
|
|
16
|
-
.page {
|
|
17
|
-
max-width: 750px;
|
|
18
|
-
min-height: 100vh;
|
|
19
|
-
margin: 0 auto;
|
|
20
|
-
padding: 0 11px;
|
|
21
|
-
background: #f7f8fa;
|
|
22
|
-
}
|
|
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
|
-
.page-body {
|
|
41
|
-
padding: 24px 0;
|
|
42
|
-
}
|
|
43
|
-
.placeholder {
|
|
44
|
-
text-align: center;
|
|
45
|
-
color: #969799;
|
|
46
|
-
font-size: 14px;
|
|
47
|
-
padding-top: 120px;
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<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
|
-
<section class="page-body">
|
|
10
|
-
<p class="placeholder">页面建设中…</p>
|
|
11
|
-
</section>
|
|
12
|
-
</main>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style scoped>
|
|
16
|
-
.page {
|
|
17
|
-
max-width: 750px;
|
|
18
|
-
min-height: 100vh;
|
|
19
|
-
margin: 0 auto;
|
|
20
|
-
padding: 0 11px;
|
|
21
|
-
background: #f7f8fa;
|
|
22
|
-
}
|
|
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
|
-
.page-body {
|
|
41
|
-
padding: 24px 0;
|
|
42
|
-
}
|
|
43
|
-
.placeholder {
|
|
44
|
-
text-align: center;
|
|
45
|
-
color: #969799;
|
|
46
|
-
font-size: 14px;
|
|
47
|
-
padding-top: 120px;
|
|
48
|
-
}
|
|
49
|
-
</style>
|