af-mobile-client-vue3 1.6.24 → 1.6.26
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
CHANGED
|
@@ -94,7 +94,7 @@ export function isExternalUser(to: RouteLocationNormalized): ExternalUserResult
|
|
|
94
94
|
if (env.isWechat) {
|
|
95
95
|
console.log('[Platform Detection] 检测到微信环境,判定为外部用户(无授权参数)')
|
|
96
96
|
return {
|
|
97
|
-
isExternal:
|
|
97
|
+
isExternal: false,
|
|
98
98
|
authParams: Object.assign(to.query, {
|
|
99
99
|
platformType: PlatformType.WECHAT_OFFICIAL,
|
|
100
100
|
tenantName: to.query.state as string || '',
|
|
@@ -106,7 +106,7 @@ export function isExternalUser(to: RouteLocationNormalized): ExternalUserResult
|
|
|
106
106
|
if (env.isAlipayClient) {
|
|
107
107
|
// 暂未实现 后续需要增加登陆参数
|
|
108
108
|
return {
|
|
109
|
-
isExternal:
|
|
109
|
+
isExternal: false,
|
|
110
110
|
authParams: {
|
|
111
111
|
platformType: PlatformType.ALIPAY,
|
|
112
112
|
},
|
|
@@ -117,7 +117,7 @@ export function isExternalUser(to: RouteLocationNormalized): ExternalUserResult
|
|
|
117
117
|
if (env.isDingTalk) {
|
|
118
118
|
// 暂未实现 后续需要增加登陆参数
|
|
119
119
|
return {
|
|
120
|
-
isExternal:
|
|
120
|
+
isExternal: false,
|
|
121
121
|
authParams: {
|
|
122
122
|
platformType: PlatformType.DINGTALK,
|
|
123
123
|
},
|
|
@@ -131,7 +131,7 @@ export function isExternalUser(to: RouteLocationNormalized): ExternalUserResult
|
|
|
131
131
|
if (isExternalRoute) {
|
|
132
132
|
// 暂未实现 后续需要增加登陆参数
|
|
133
133
|
return {
|
|
134
|
-
isExternal:
|
|
134
|
+
isExternal: false,
|
|
135
135
|
authParams: Object.assign(to.query, {
|
|
136
136
|
platformType: PlatformType.WECHAT_OFFICIAL,
|
|
137
137
|
tenantName: to.query.state as string || '',
|
|
@@ -5,7 +5,10 @@ import useSettingStore from '@af-mobile-client-vue3/stores/modules/setting'
|
|
|
5
5
|
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
6
6
|
import { openDrivingConfigPopup } from '@af-mobile-client-vue3/utils/driving/drivingUtils'
|
|
7
7
|
import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
showConfirmDialog,
|
|
10
|
+
showToast,
|
|
11
|
+
Icon as VanIcon,
|
|
9
12
|
} from 'vant'
|
|
10
13
|
import { onMounted, onUnmounted, ref } from 'vue'
|
|
11
14
|
import { useRouter } from 'vue-router'
|
|
@@ -162,6 +165,49 @@ function syncAudioPlayEnabled() {
|
|
|
162
165
|
},
|
|
163
166
|
})
|
|
164
167
|
}
|
|
168
|
+
|
|
169
|
+
// 清除本地图片缓存
|
|
170
|
+
function deleteCacheImages() {
|
|
171
|
+
mobileUtil.execute({
|
|
172
|
+
param: {},
|
|
173
|
+
funcName: 'checkUploadQueue',
|
|
174
|
+
callbackFunc: (res?: any) => {
|
|
175
|
+
console.log('检查是否符合清除条件', res)
|
|
176
|
+
if (res?.data?.codeFlag === 200) {
|
|
177
|
+
showToast('清除成功!')
|
|
178
|
+
}
|
|
179
|
+
else if (res?.data?.codeFlag === 700) {
|
|
180
|
+
confirmDelete()
|
|
181
|
+
}
|
|
182
|
+
else { /* empty */ }
|
|
183
|
+
},
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 确认清除本地图片缓存
|
|
188
|
+
function confirmDelete() {
|
|
189
|
+
showConfirmDialog({
|
|
190
|
+
title: '清除本地图片缓存',
|
|
191
|
+
message:
|
|
192
|
+
'本地存在待上传/上传失败的数据,是否确认清除本地图片缓存',
|
|
193
|
+
})
|
|
194
|
+
.then(() => {
|
|
195
|
+
mobileUtil.execute({
|
|
196
|
+
param: {},
|
|
197
|
+
funcName: 'clearLocalImages',
|
|
198
|
+
callbackFunc: (res?: any) => {
|
|
199
|
+
console.log('清除本地缓存返回', res)
|
|
200
|
+
if (res?.data?.codeFlag === 200) {
|
|
201
|
+
showToast('清除成功!')
|
|
202
|
+
}
|
|
203
|
+
else { /* empty */ }
|
|
204
|
+
},
|
|
205
|
+
})
|
|
206
|
+
})
|
|
207
|
+
.catch(() => {
|
|
208
|
+
// on cancel
|
|
209
|
+
})
|
|
210
|
+
}
|
|
165
211
|
</script>
|
|
166
212
|
|
|
167
213
|
<template>
|
|
@@ -233,28 +279,28 @@ function syncAudioPlayEnabled() {
|
|
|
233
279
|
<div class="menu-list">
|
|
234
280
|
<div v-if="webMobileConfig?.isAttendance" class="menu-item" @click="goToAttendance">
|
|
235
281
|
<div class="menu-item-content">
|
|
236
|
-
<
|
|
282
|
+
<VanIcon name="user-o" class="menu-icon" />
|
|
237
283
|
<span class="menu-text">考勤管理</span>
|
|
238
284
|
</div>
|
|
239
|
-
<
|
|
285
|
+
<VanIcon name="arrow" class="menu-arrow" />
|
|
240
286
|
</div>
|
|
241
287
|
<div class="menu-item" @click="openModifyPassword">
|
|
242
288
|
<div class="menu-item-content">
|
|
243
|
-
<
|
|
289
|
+
<VanIcon name="lock" class="menu-icon" />
|
|
244
290
|
<span class="menu-text">修改密码</span>
|
|
245
291
|
</div>
|
|
246
|
-
<
|
|
292
|
+
<VanIcon name="arrow" class="menu-arrow" />
|
|
247
293
|
</div>
|
|
248
294
|
<div v-if="userInfo?.drivingInfo !== undefined && userInfo?.drivingInfo !== null" class="menu-item" @click="openDrivingConfigPopup">
|
|
249
295
|
<div class="menu-item-content">
|
|
250
|
-
<
|
|
296
|
+
<VanIcon name="logistics" class="menu-icon" />
|
|
251
297
|
<span class="menu-text">修改行驶方式</span>
|
|
252
298
|
</div>
|
|
253
|
-
<
|
|
299
|
+
<VanIcon name="arrow" class="menu-arrow" />
|
|
254
300
|
</div>
|
|
255
301
|
<div class="menu-item">
|
|
256
302
|
<div class="menu-item-content">
|
|
257
|
-
<
|
|
303
|
+
<VanIcon name="volume-o" class="menu-icon" />
|
|
258
304
|
<span class="menu-text">系统声音</span>
|
|
259
305
|
</div>
|
|
260
306
|
<VanSwitch
|
|
@@ -265,10 +311,17 @@ function syncAudioPlayEnabled() {
|
|
|
265
311
|
</div>
|
|
266
312
|
<div class="menu-item" @click="exit_login">
|
|
267
313
|
<div class="menu-item-content">
|
|
268
|
-
<
|
|
314
|
+
<VanIcon name="sign" class="menu-icon logout-icon" />
|
|
269
315
|
<span class="menu-text">退出登录</span>
|
|
270
316
|
</div>
|
|
271
|
-
<
|
|
317
|
+
<VanIcon name="arrow" class="menu-arrow" />
|
|
318
|
+
</div>
|
|
319
|
+
<div v-if="setting.getSetting()?.showDeleteCacheImages" class="menu-item" @click="deleteCacheImages">
|
|
320
|
+
<div class="menu-item-content">
|
|
321
|
+
<VanIcon name="delete" class="menu-icon logout-icon" />
|
|
322
|
+
<span class="menu-text">清除本地缓存图片</span>
|
|
323
|
+
</div>
|
|
324
|
+
<VanIcon name="arrow" class="menu-arrow" />
|
|
272
325
|
</div>
|
|
273
326
|
</div>
|
|
274
327
|
</div>
|