From c39bea4a4a6c09671ac59d9672f8227dc625e217 Mon Sep 17 00:00:00 2001 From: Hawtim Zhang Date: Mon, 19 Oct 2020 13:57:25 +0800 Subject: [PATCH] add .editorconfig for better coding (#14) * feat: add config to resolve path alias. * feat: add .editorconfig for ide * fix: add no-referrer to avoid CROB * fix: setCookie and fix typo --- .editorconfig | 8 ++++++++ public/index.html | 1 + src/views/loginAccount.vue | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..db87e1f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false \ No newline at end of file diff --git a/public/index.html b/public/index.html index 025b89a..91e96b7 100644 --- a/public/index.html +++ b/public/index.html @@ -4,6 +4,7 @@ + <%= htmlWebpackPlugin.options.title %> diff --git a/src/views/loginAccount.vue b/src/views/loginAccount.vue index c335d67..8edfd64 100644 --- a/src/views/loginAccount.vue +++ b/src/views/loginAccount.vue @@ -112,6 +112,7 @@ export default { methods: { ...mapMutations(["updateUser", "updateUserInfo"]), afterLogin() { + Cookies.set("MUSIC_U", true, { expires: 3650 }); Cookies.set("loginMode", "account", { expires: 3650 }); userPlaylist({ uid: this.$store.state.settings.user.userId, @@ -128,7 +129,7 @@ export default { this.processing = true; if (this.mode === "phone") { if ( - this.countrycode === "" || + this.countryCode === "" || this.phone === "" || this.password === "" ) {