🐛 修复gtk

This commit is contained in:
yeyang
2023-05-06 13:56:48 +08:00
parent de52334129
commit 689a4a4e8a

View File

@@ -317,11 +317,9 @@ export default new class newCommon {
*/
getck (data, bot = Bot, transformation) {
let cookie = bot.cookies[data]
let ck = {}
cookie.split('; ').forEach(keyValue => {
const [key, value] = keyValue.split('=')
ck[key] = value
})
let ck = cookie.replace(/=/g, '":"').replace(/;/g, '","').replace(/ /g, '').trim()
ck = ck.substring(0, ck.length - 2)
ck = JSON.parse('{"'.concat(ck).concat('}'))
if (transformation) {
let arr = []
for (let i in ck) {