mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
feat: 支持二维码登录 (#1443)
* fix: 使用replaceAll和正则来替换HTTPOnly * feat: 支持二维码登录 * fix: 不使用replaceAll * refactor: 使用react-query重写二维码登录 * refactor: 用useMemo来计算 qrCodeUrl * update * update * update * update
This commit is contained in:
parent
9f890072d3
commit
4d7bc14827
2 changed files with 86 additions and 27 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import Cookies from 'js-cookie'
|
||||
|
||||
export function setCookies(string: string) {
|
||||
const cookies = string.replace('HTTPOnly', '').split(';;')
|
||||
const cookies = string.replace(/;.*?HTTPOnly.*?;/g, ';;').split(';;')
|
||||
cookies.map(cookie => {
|
||||
const cookieKeyValue = cookie.split(';')[0].split('=')
|
||||
const [key, value] = cookieKeyValue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue