mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
refactor: organize codes
This commit is contained in:
parent
df799cbf84
commit
bc0de620c1
23 changed files with 415 additions and 398 deletions
|
|
@ -89,7 +89,7 @@ import { loginWithPhone, loginWithEmail } from "@/api/auth";
|
|||
import md5 from "crypto-js/md5";
|
||||
import { mapMutations } from "vuex";
|
||||
import { userPlaylist } from "@/api/user";
|
||||
import { getMusicU, setMusicU } from '@/utils/auth';
|
||||
import { getMusicU, setMusicU } from "@/utils/auth";
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
|
|
@ -180,8 +180,8 @@ export default {
|
|||
.then((data) => {
|
||||
// 获取接口返回的 MUSIC_U 写进本地 cookie 解决登录时跳转的问题
|
||||
// 但是仍然无法完全模拟登录状态,像喜欢歌曲和喜欢列表都会遇到 301 需要登录问题
|
||||
const MUSIC_U = getMusicU(data.cookie)
|
||||
setMusicU('MUSIC_U', MUSIC_U)
|
||||
const MUSIC_U = getMusicU(data.cookie);
|
||||
setMusicU("MUSIC_U", MUSIC_U);
|
||||
if (data.code !== 502) {
|
||||
this.updateData({ key: "user", value: data.profile });
|
||||
this.afterLogin();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue