diff --git a/src/store/actions.js b/src/store/actions.js index 05da768..753fb5f 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -1,4 +1,3 @@ -// import { getMP3 } from "@/api/track"; import { updateMediaSessionMetaData } from "@/utils/mediaSession"; import { getTrackDetail, scrobble } from "@/api/track"; diff --git a/src/store/mutations.js b/src/store/mutations.js index 7953f81..a682155 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -1,5 +1,4 @@ import { Howl, Howler } from "howler"; -import state from "./state"; import { shuffleAList } from "@/utils/common"; export default { @@ -85,7 +84,7 @@ export default { updateUser(state, user) { state.settings.user = user; }, - updateUserInfo(sate, { key, value }) { + updateUserInfo(state, { key, value }) { state.settings.user[key] = value; }, updateLikedSongs(state, trackIDs) { diff --git a/src/utils/request.js b/src/utils/request.js index 795d218..7c4ae44 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -15,9 +15,9 @@ service.interceptors.response.use( } else if (res.code === 502) { alert(res.msg); } else if (res.code === 301) { - alert("required login"); + alert("login required"); } else { - alert("unknow error"); + alert("unknown error"); } } else { return res; diff --git a/src/views/loginAccount.vue b/src/views/loginAccount.vue index 7a652cf..c335d67 100644 --- a/src/views/loginAccount.vue +++ b/src/views/loginAccount.vue @@ -137,8 +137,8 @@ export default { return; } loginWithPhone({ - countrycode: this.countryCode.replace("+", "").replaceAll(" ", ""), - phone: this.phoneNumber.replaceAll(" ", ""), + countrycode: this.countryCode.replace("+", "").replace(/\s/g, ''), + phone: this.phoneNumber.replace(/\s/g, ''), password: "fakePassword", md5_password: md5(this.password).toString(), }) @@ -156,7 +156,7 @@ export default { return; } loginWithEmail({ - email: this.email.replaceAll(" ", ""), + email: this.email.replace(/\s/g, ''), password: "fakePassword", md5_password: md5(this.password).toString(), })