|
|
@@ -122,6 +122,7 @@
|
|
|
const isDownload = ref<boolean>(false)
|
|
|
const downloadProgress = ref<number>(0)
|
|
|
const showPasswordPicker = ref<boolean>(false)
|
|
|
+ const isAutoLogin = ref<boolean>(false) // 添加自动登录标志
|
|
|
|
|
|
// 版本号
|
|
|
const manifestVersion = manifest?.versionName as string | null
|
|
|
@@ -415,29 +416,29 @@
|
|
|
}
|
|
|
|
|
|
onLoad((options: UTSJSONObject | null) => {
|
|
|
- console.log('URL参数:', options)
|
|
|
- // 延迟一点执行,确保App.vue已保存到缓存
|
|
|
- setTimeout(() => {
|
|
|
- // 2. 从页面参数获取
|
|
|
- if (options != null) {
|
|
|
- const ticketValue = options['ticket']
|
|
|
- const nextUrl = options['next']
|
|
|
- if (ticketValue != null) {
|
|
|
- if (typeof ticketValue == 'string') {
|
|
|
- if(ticketValue.length > 0){
|
|
|
- const ticket = ticketValue as string
|
|
|
- console.log('获取到自动登录ticket:', ticket)
|
|
|
- handleLoginSSO(ticket, nextUrl);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }, 500)
|
|
|
- })
|
|
|
+ console.log('URL参数:', options)
|
|
|
+ // 直接检查是否有ticket参数,立即执行自动登录
|
|
|
+ if (options != null) {
|
|
|
+ const ticketValue = options['ticket']
|
|
|
+ const nextUrl = options['next']
|
|
|
+ if (ticketValue != null && typeof ticketValue == 'string' && ticketValue.length > 0) {
|
|
|
+ const ticket = ticketValue as string
|
|
|
+ console.log('获取到自动登录ticket:', ticket)
|
|
|
+ isAutoLogin.value = true // 设置自动登录标志
|
|
|
+ handleLoginSSO(ticket, nextUrl);
|
|
|
+ return; // 立即返回,不显示登录页
|
|
|
+ }
|
|
|
+ }
|
|
|
+})
|
|
|
|
|
|
// 初始化:加载记住的账号密码
|
|
|
onMounted(() => {
|
|
|
- checkVersion()
|
|
|
+ // 如果正在进行自动登录,跳过记住密码的逻辑
|
|
|
+ if (isAutoLogin.value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ checkVersion()
|
|
|
const remembered = getRememberedAccount()
|
|
|
if (remembered != null) {
|
|
|
username.value = remembered['username'] as string
|