From 0c62ad8685b3b80e8e7e90026eaf5b7b93c15134 Mon Sep 17 00:00:00 2001 From: Megghy Date: Fri, 22 Dec 2023 15:00:44 +0800 Subject: [PATCH] add reset username --- .yarnclean | 45 ---- .yarnrc.yml | 2 - package.json | 1 - src/views/manage/DashboardView.vue | 12 +- tsconfig.json | 2 +- yarn.lock | 390 +++++++++-------------------- 6 files changed, 124 insertions(+), 328 deletions(-) delete mode 100644 .yarnclean diff --git a/.yarnclean b/.yarnclean deleted file mode 100644 index b591611..0000000 --- a/.yarnclean +++ /dev/null @@ -1,45 +0,0 @@ -# test directories -__tests__ -test -tests -powered-test - -# asset directories -docs -doc -website -images -assets - -# examples -example -examples - -# code coverage directories -coverage -.nyc_output - -# build scripts -Makefile -Gulpfile.js -Gruntfile.js - -# configs -appveyor.yml -circle.yml -codeship-services.yml -codeship-steps.yml -wercker.yml -.tern-project -.gitattributes -.editorconfig -.*ignore -.eslintrc -.jshintrc -.flowconfig -.documentup.json -.yarn-metadata.json -.travis.yml - -# misc -*.md diff --git a/.yarnrc.yml b/.yarnrc.yml index f03163f..3186f3f 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,3 +1 @@ nodeLinker: node-modules - -yarnPath: .yarn/releases/yarn-4.0.2.cjs diff --git a/package.json b/package.json index 63c0399..5a948f5 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "worker-timers": "^7.0.80" }, "devDependencies": { - "@babel/eslint-parser": "^7.23.3", "@typescript-eslint/parser": "^6.15.0", "@vicons/ionicons5": "^0.12.0", "@vitejs/plugin-vue-jsx": "^3.1.0", diff --git a/src/views/manage/DashboardView.vue b/src/views/manage/DashboardView.vue index a36b253..8a4f32a 100644 --- a/src/views/manage/DashboardView.vue +++ b/src/views/manage/DashboardView.vue @@ -29,7 +29,6 @@ const canSendEmailVerifyCode = ref(true) const newName = ref('') -const oldPassword = ref('') const newPassword = ref('') const newPassword2 = ref('') const biliCode = ref('') @@ -115,7 +114,8 @@ async function resetName() { message.error('新用户名与旧用户名一致') return } - await QueryGetAPI(ACCOUNT_API_URL + 'verify/reset-name', { name: newName.value }) + isLoading.value = true + await QueryGetAPI(ACCOUNT_API_URL + 'change-name', { name: newName.value }) .then(async (data) => { if (data.code == 200) { message.success('用户名已修改') @@ -129,6 +129,9 @@ async function resetName() { .catch((err) => { message.error('发生错误') }) + .finally(() => { + isLoading.value = false + }) } async function BindBili() { if (!biliCode.value) { @@ -262,6 +265,7 @@ async function ChangeBili() { 修改密码 + 修改用户名