更新
This commit is contained in:
@@ -1546,7 +1546,7 @@ const formatCookieTime = (value) => {
|
||||
return date.toLocaleString('zh-CN')
|
||||
}
|
||||
|
||||
const applyCookieResponse = (data) => {
|
||||
const applyCookieResponse = (data, { preserveRuntimeCredential = false } = {}) => {
|
||||
editForm.value.cookie_updated_at = data.cookie_updated_at
|
||||
editForm.value.cookie_count = data.cookie_count
|
||||
editForm.value.cookie_valid = data.cookie_valid
|
||||
@@ -1556,10 +1556,12 @@ const applyCookieResponse = (data) => {
|
||||
editForm.value.has_sessionid = !!data.has_sessionid
|
||||
editForm.value.sessionid = data.sessionid || ''
|
||||
editForm.value.sessionid_ss = data.sessionid_ss || ''
|
||||
editForm.value.im_ready = !!data.im_ready
|
||||
editForm.value.im_status = data.im_status || ''
|
||||
editForm.value.can_skip_browser = !!data.can_skip_browser
|
||||
editForm.value.should_reset = !!data.should_reset
|
||||
if (!preserveRuntimeCredential) {
|
||||
editForm.value.im_ready = !!data.im_ready
|
||||
editForm.value.im_status = data.im_status || ''
|
||||
editForm.value.can_skip_browser = !!data.can_skip_browser
|
||||
editForm.value.should_reset = !!data.should_reset
|
||||
}
|
||||
}
|
||||
|
||||
const openEditModal = async (acc) => {
|
||||
@@ -1628,7 +1630,7 @@ const refreshCredential = async () => {
|
||||
}
|
||||
|
||||
const cookieRes = await api.get(`/accounts/${editForm.value.id}/cookie?purpose=management`)
|
||||
applyCookieResponse(cookieRes.data)
|
||||
applyCookieResponse(cookieRes.data, { preserveRuntimeCredential: true })
|
||||
message.success('凭证检测完成')
|
||||
} catch (error) {
|
||||
message.error(error.response?.data?.detail || '凭证检测失败')
|
||||
|
||||
Reference in New Issue
Block a user