af-mobile-client-vue3 1.3.52 → 1.3.53
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/certs/127.0.0.1+2-key.pem +28 -0
- package/certs/127.0.0.1+2.pem +27 -0
- package/package.json +115 -115
- package/src/api/user/index.ts +45 -40
- package/src/router/external-routes.ts +69 -60
- package/src/router/guards.ts +131 -131
- package/src/router/routes.ts +421 -421
- package/src/services/api/Login.ts +6 -6
- package/src/stores/modules/user.ts +1 -1
- package/src/styles/login.less +109 -109
- package/src/types/platform.ts +194 -194
- package/src/utils/environment.ts +10 -10
- package/src/utils/platform-auth.ts +150 -150
- package/src/utils/wechat.ts +297 -297
- package/src/views/component/XFormView/index.vue +2 -6
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +118 -118
- package/src/views/loading/AuthLoading.vue +378 -360
- package/src/views/user/register/index.vue +1 -1
- package/vite.config.ts +114 -114
|
@@ -1,360 +1,378 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { getUserPermissions } from '@af-mobile-client-vue3/services/api/search'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
errorMessage.value = '
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
//
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
window.open('', '_self')
|
|
107
|
-
window.close()
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
result.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
])
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
//
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/*
|
|
259
|
-
.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
font-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
.
|
|
357
|
-
-
|
|
358
|
-
-
|
|
359
|
-
|
|
360
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { getUserPermissions } from '@af-mobile-client-vue3/services/api/search'
|
|
3
|
+
import { useSettingStore } from '@af-mobile-client-vue3/stores/modules/setting'
|
|
4
|
+
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
5
|
+
import { UserType } from '@af-mobile-client-vue3/types/auth'
|
|
6
|
+
import { PLATFORM_ROUTE_MAP, PlatformType } from '@af-mobile-client-vue3/types/platform'
|
|
7
|
+
import { isWechat } from '@af-mobile-client-vue3/utils/platform-auth'
|
|
8
|
+
import { funcToRouter, loadRoutes } from '@af-mobile-client-vue3/utils/routerUtil'
|
|
9
|
+
import { secureStorageBatchWrite } from '@af-mobile-client-vue3/utils/secureStorage'
|
|
10
|
+
import { Loading as VanLoading } from 'vant'
|
|
11
|
+
import { onMounted, ref } from 'vue'
|
|
12
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
13
|
+
import { getUserInfo } from '~root/src/api/user'
|
|
14
|
+
|
|
15
|
+
const route = useRoute()
|
|
16
|
+
const router = useRouter()
|
|
17
|
+
const userStore = useUserStore()
|
|
18
|
+
const setting = useSettingStore()
|
|
19
|
+
// 响应式状态
|
|
20
|
+
const isLoading = ref(true)
|
|
21
|
+
const errorMessage = ref('')
|
|
22
|
+
const hasError = ref(false)
|
|
23
|
+
|
|
24
|
+
// 主要认证处理逻辑
|
|
25
|
+
async function handleAuth() {
|
|
26
|
+
try {
|
|
27
|
+
const authParam = route.query as Record<string, string>
|
|
28
|
+
|
|
29
|
+
if (authParam.platformType) {
|
|
30
|
+
switch (authParam.platformType) {
|
|
31
|
+
case PlatformType.WECHAT_OFFICIAL:
|
|
32
|
+
case PlatformType.WECHAT_MINI:
|
|
33
|
+
// 微信公众号,微信小程序授权登录参数
|
|
34
|
+
await handleExternalLogin(authParam)
|
|
35
|
+
break
|
|
36
|
+
default:
|
|
37
|
+
// 其他环境使用原生扫码(需要页面跳转或调用原生API)
|
|
38
|
+
throw new Error('当前环境不支持授权登录')
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
// 无授权参数,检查是否已登录或等待授权
|
|
43
|
+
await handleWaitingForAuth()
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.error('[AuthLoading] 认证处理失败:', error)
|
|
48
|
+
|
|
49
|
+
isLoading.value = false
|
|
50
|
+
hasError.value = true
|
|
51
|
+
|
|
52
|
+
if (error instanceof Error) {
|
|
53
|
+
errorMessage.value = '授权失败,请尝试重新进入此页面'
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
errorMessage.value = '认证失败'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 处理外部用户登录
|
|
62
|
+
async function handleExternalLogin(loginParams: any) {
|
|
63
|
+
let data: any
|
|
64
|
+
if (loginParams.platformType === PlatformType.WECHAT_OFFICIAL) {
|
|
65
|
+
data = await userStore.loginExternal(Object.assign(loginParams, {
|
|
66
|
+
isMobile: true,
|
|
67
|
+
}))
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
data = await userStore.loginExternalMini(Object.assign(JSON.parse(loginParams.appData), {
|
|
71
|
+
isMobile: true,
|
|
72
|
+
}))
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const loginInfo = {
|
|
76
|
+
f: data,
|
|
77
|
+
jwt: data.id,
|
|
78
|
+
r: data.r,
|
|
79
|
+
}
|
|
80
|
+
userStore.setLogin(loginInfo)
|
|
81
|
+
// 设置用户信息
|
|
82
|
+
userStore.setUserType(data.resources.userType || UserType.SYSTEM)
|
|
83
|
+
userStore.setPlatformType(loginParams.platformType || PlatformType.WECHAT_OFFICIAL)
|
|
84
|
+
await afterGeneral(data.resources, data.access_token, UserType.EXTERNAL)
|
|
85
|
+
|
|
86
|
+
// 获取重定向地址并跳转
|
|
87
|
+
let targetPath = route.query.redirect as string
|
|
88
|
+
if (data.resources.userType === UserType.EXTERNAL) {
|
|
89
|
+
// 外部用户没有重定向地址,直接跳转到外部用户首页
|
|
90
|
+
// 对应的外部用户只能跳转到对应的页面
|
|
91
|
+
const platformPrefixes = PLATFORM_ROUTE_MAP[data.resources.platformType]
|
|
92
|
+
if (!targetPath.startsWith(platformPrefixes)) {
|
|
93
|
+
targetPath = platformPrefixes
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
router.replace(targetPath)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function closeWindows() {
|
|
100
|
+
if (isWechat()) {
|
|
101
|
+
(window as any).WeixinJSBridge.call('closeWindow')
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
// 关闭页面
|
|
105
|
+
if (navigator.userAgent.includes('Firefox') || navigator.userAgent.includes('Chrome')) {
|
|
106
|
+
window.open('about:blank', '_self')
|
|
107
|
+
window.close()
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
window.opener = null
|
|
111
|
+
window.open('', '_self')
|
|
112
|
+
window.close()
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async function afterGeneral(result, token = '', userType = UserType.SYSTEM) {
|
|
118
|
+
if (userType === UserType.EXTERNAL && result.functions && result.functions.length === 0 && result.ename) {
|
|
119
|
+
const res = await getUserInfo({
|
|
120
|
+
username: result.ename,
|
|
121
|
+
resourceName: setting.getSetting()?.routerName || '智慧手机',
|
|
122
|
+
})
|
|
123
|
+
console.log('获取用户信息', res)
|
|
124
|
+
if (res.resources.functions && res.resources.functions.length > 0) {
|
|
125
|
+
result.functions = res.resources.functions
|
|
126
|
+
}
|
|
127
|
+
if (res.resources.permissions && res.resources.permissions.length > 0) {
|
|
128
|
+
result.permissions = res.resources.permissions
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// 排序 functions 及其嵌套的 children
|
|
132
|
+
if (result.functions && Array.isArray(result.functions)) {
|
|
133
|
+
// 对顶层菜单进行排序
|
|
134
|
+
result.functions.sort((a, b) => (a.position || 0) - (b.position || 0))
|
|
135
|
+
|
|
136
|
+
// 对每个菜单的子项进行排序
|
|
137
|
+
for (const item of result.functions) {
|
|
138
|
+
if (item.children && Array.isArray(item.children)) {
|
|
139
|
+
item.children.sort((a, b) => (a.position || 0) - (b.position || 0))
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const user: any = {
|
|
145
|
+
...result,
|
|
146
|
+
username: result.ename,
|
|
147
|
+
avatar: result.avatar,
|
|
148
|
+
}
|
|
149
|
+
userStore.setUserInfo(user)
|
|
150
|
+
// 如果result中没有返回 权限 需要主动获取权限列表
|
|
151
|
+
if (!result.permissions && userType !== UserType.EXTERNAL) {
|
|
152
|
+
result.permissions = await getUserPermissions(result.id)
|
|
153
|
+
}
|
|
154
|
+
userStore.setPermissions(result.permissions)
|
|
155
|
+
userStore.setRoles([{ id: userType, operation: ['add', 'edit', 'delete'] }])
|
|
156
|
+
// 加载路由
|
|
157
|
+
if (user.functions) {
|
|
158
|
+
loadRoutes(funcToRouter(user.functions))
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 存储登录数据到本地缓存
|
|
162
|
+
secureStorageBatchWrite([
|
|
163
|
+
{
|
|
164
|
+
key: 'loginData',
|
|
165
|
+
value: {
|
|
166
|
+
token,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
key: 'userData',
|
|
171
|
+
value: result,
|
|
172
|
+
},
|
|
173
|
+
])
|
|
174
|
+
|
|
175
|
+
// 每次重新登录时,清除indexedDB缓存
|
|
176
|
+
// indexedDB.clear()
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// TODO 处理等待授权的情况 暂未实现目前不确定三方对接方式
|
|
180
|
+
async function handleWaitingForAuth() {
|
|
181
|
+
console.log('[AuthLoading] 处理等待授权情况')
|
|
182
|
+
|
|
183
|
+
// 检查是否已登录
|
|
184
|
+
const token = userStore.getToken()
|
|
185
|
+
const userType = userStore.getUserType()
|
|
186
|
+
|
|
187
|
+
if (token) {
|
|
188
|
+
const targetPath = userType === 'EXTERNAL' ? '/ex' : '/'
|
|
189
|
+
router.replace(targetPath)
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
// 根据来源决定处理方式
|
|
193
|
+
const source = route.query.source as string
|
|
194
|
+
closeWindows()
|
|
195
|
+
|
|
196
|
+
if (source === 'external') {
|
|
197
|
+
// 外部用户需要重新获取授权
|
|
198
|
+
throw new Error('第三方授权已过期,请重新尝试')
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
// 其他情况
|
|
202
|
+
throw new Error('需要重新获取授权')
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
onMounted(() => {
|
|
208
|
+
handleAuth()
|
|
209
|
+
})
|
|
210
|
+
</script>
|
|
211
|
+
|
|
212
|
+
<template>
|
|
213
|
+
<div class="auth-loading">
|
|
214
|
+
<!-- Logo区域 -->
|
|
215
|
+
<div class="logo-section">
|
|
216
|
+
<div class="company-logo">
|
|
217
|
+
<div class="logo-text">
|
|
218
|
+
智慧燃气
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<!-- Loading区域 -->
|
|
224
|
+
<div v-if="isLoading && !hasError" class="loading-section">
|
|
225
|
+
<div class="loading-spinner">
|
|
226
|
+
<VanLoading type="spinner" size="48px" color="#007BFF" />
|
|
227
|
+
</div>
|
|
228
|
+
<div class="loading-text">
|
|
229
|
+
稍等,这就好
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<!-- 错误处理区域 -->
|
|
234
|
+
<div v-if="hasError" class="error-section">
|
|
235
|
+
<div class="error-icon">
|
|
236
|
+
⚠️
|
|
237
|
+
</div>
|
|
238
|
+
<div class="error-message">
|
|
239
|
+
{{ errorMessage }}
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</template>
|
|
244
|
+
|
|
245
|
+
<style scoped>
|
|
246
|
+
/* 主容器 */
|
|
247
|
+
.auth-loading {
|
|
248
|
+
min-height: 100vh;
|
|
249
|
+
background: #ffffff;
|
|
250
|
+
display: flex;
|
|
251
|
+
flex-direction: column;
|
|
252
|
+
justify-content: center;
|
|
253
|
+
align-items: center;
|
|
254
|
+
padding: 32px 20px;
|
|
255
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* Logo区域 */
|
|
259
|
+
.logo-section {
|
|
260
|
+
margin-bottom: 64px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.company-logo {
|
|
264
|
+
display: flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
justify-content: center;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.logo-text {
|
|
270
|
+
font-size: 28px;
|
|
271
|
+
font-weight: 600;
|
|
272
|
+
color: #007bff;
|
|
273
|
+
letter-spacing: 2px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Loading区域 */
|
|
277
|
+
.loading-section {
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
align-items: center;
|
|
281
|
+
text-align: center;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.loading-spinner {
|
|
285
|
+
margin-bottom: 24px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.loading-text {
|
|
289
|
+
font-size: 18px;
|
|
290
|
+
font-weight: 500;
|
|
291
|
+
color: #2c3e50;
|
|
292
|
+
margin-bottom: 12px;
|
|
293
|
+
line-height: 1.4;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.platform-text {
|
|
297
|
+
font-size: 14px;
|
|
298
|
+
color: #6c757d;
|
|
299
|
+
line-height: 1.4;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* 错误处理区域 */
|
|
303
|
+
.error-section {
|
|
304
|
+
display: flex;
|
|
305
|
+
flex-direction: column;
|
|
306
|
+
align-items: center;
|
|
307
|
+
text-align: center;
|
|
308
|
+
max-width: 300px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.error-icon {
|
|
312
|
+
font-size: 48px;
|
|
313
|
+
margin-bottom: 20px;
|
|
314
|
+
opacity: 0.8;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.error-message {
|
|
318
|
+
font-size: 16px;
|
|
319
|
+
color: #dc3545;
|
|
320
|
+
margin-bottom: 24px;
|
|
321
|
+
line-height: 1.5;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* 响应式设计 */
|
|
325
|
+
@media (max-width: 480px) {
|
|
326
|
+
.auth-loading {
|
|
327
|
+
padding: 24px 16px;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.logo-text {
|
|
331
|
+
font-size: 24px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.loading-text {
|
|
335
|
+
font-size: 16px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.platform-text {
|
|
339
|
+
font-size: 13px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.error-message {
|
|
343
|
+
font-size: 15px;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* 大屏适配 */
|
|
348
|
+
@media (min-width: 768px) {
|
|
349
|
+
.auth-loading {
|
|
350
|
+
max-width: 400px;
|
|
351
|
+
margin: 0 auto;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* 兼容性优化 - 避免使用可能有问题的CSS特性 */
|
|
356
|
+
.loading-spinner :deep(.van-loading__spinner) {
|
|
357
|
+
animation-duration: 1s;
|
|
358
|
+
animation-timing-function: linear;
|
|
359
|
+
animation-iteration-count: infinite;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* 禁用选择,提升用户体验 */
|
|
363
|
+
.auth-loading {
|
|
364
|
+
-webkit-user-select: none;
|
|
365
|
+
-moz-user-select: none;
|
|
366
|
+
-ms-user-select: none;
|
|
367
|
+
user-select: none;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* 确保文字在各种设备上清晰显示 */
|
|
371
|
+
.logo-text,
|
|
372
|
+
.loading-text,
|
|
373
|
+
.platform-text,
|
|
374
|
+
.error-message {
|
|
375
|
+
-webkit-font-smoothing: antialiased;
|
|
376
|
+
-moz-osx-font-smoothing: grayscale;
|
|
377
|
+
}
|
|
378
|
+
</style>
|