From 24d7d89b53fbed7463d7223c2e124d24e01c21d7 Mon Sep 17 00:00:00 2001 From: jqtmviyu Date: Mon, 27 Mar 2023 19:21:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=B7=BB=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=8F=82=E6=95=B0remember=5Fme:on=202.=20cookie=E6=94=B9?= =?UTF-8?q?=E6=88=90=E5=AE=8C=E6=95=B4=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/login.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/js/login.js b/js/login.js index 0bb2ab8..7a6a1d9 100644 --- a/js/login.js +++ b/js/login.js @@ -9,7 +9,7 @@ const toml = require('@iarna/toml') const login = async oldConfig => { console.log('登录过期, 重新登录中...') const { loginUrl, email, password } = oldConfig - const data = qs.stringify({ email, passwd: password }) + const data = qs.stringify({ email, passwd: password, remember_me: 'on' }) const headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'sec-ch-ua': oldConfig.headers['sec-ch-ua'], @@ -34,14 +34,7 @@ const login = async oldConfig => { cookieObj = Object.assign(cookieObj, cookie.parse(item)) }) const cookieStr = qs.stringify( - { - lang: 'zh-cn', - udi: cookieObj.uid, - email: cookieObj.email, - key: cookieObj.key, - ip: cookieObj.ip, - expire_in: cookieObj['expire_in'], - }, + cookieObj, { delimiter: '; ' } ) const newConfig = JSON.parse(JSON.stringify(oldConfig))