From 89014e306ef9a2fa70b3baf231f4ec6e743cbbf0 Mon Sep 17 00:00:00 2001 From: pengxiaolong <15716207+pengxiaolong711@user.noreply.gitee.com> Date: Thu, 21 Aug 2025 21:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 36 +++--- src/api/account.js | 8 ++ src/components/Appaside.vue | 48 +++++--- src/components/chatMessage/PKMessage.vue | 12 +- src/components/chatMessage/miniPKMessage.vue | 12 +- .../mineSubComponent/AnchorLibrary.vue | 34 ++++-- src/components/mineSubComponent/PKRecord.vue | 22 +++- src/components/mineSubComponent/PKmessage.vue | 29 ++++- .../mineSubComponent/PointsList.vue | 110 ++++++++++-------- src/router/index.js | 19 ++- src/utils/axios.js | 4 + src/views/ActivateEmail.vue | 2 +- src/views/HomeView.vue | 4 +- src/views/activationSuccessful.vue | 36 +++++- src/views/emailRegistration.vue | 4 +- src/views/hosts/Forum.vue | 2 +- src/views/hosts/Message.vue | 18 +-- src/views/hosts/Mine.vue | 8 +- src/views/hosts/pk.vue | 20 ++-- src/views/resetPassword.vue | 9 +- src/views/verifyAccount.vue | 84 +++++++++++++ 21 files changed, 370 insertions(+), 151 deletions(-) create mode 100644 src/views/verifyAccount.vue diff --git a/src/App.vue b/src/App.vue index 909d0ca..8961d68 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,24 +6,24 @@ \ No newline at end of file +} + diff --git a/src/router/index.js b/src/router/index.js index 307cd54..b2fe07e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -5,6 +5,7 @@ import ActivateEmail from '../views/ActivateEmail.vue' import activationSuccessful from '../views/activationSuccessful.vue' import forgetPassword from '../views/forgetPassword.vue' import resetPassword from '../views/resetPassword.vue' +import verifyAccount from '../views/verifyAccount.vue' import { setStorage , getStorage } from '@/utils/storage.js'; const routes = [ { @@ -23,9 +24,16 @@ const routes = [ component: ActivateEmail }, { - path: '/activationSuccessful', + path: '/activationSuccessful/:token', name: 'activationSuccessful', - component: activationSuccessful + component: activationSuccessful, + props: true + }, + { + path: '/verifyAccount/:token', + name: 'verifyAccount', + component: verifyAccount, + props: true }, { path: '/forgetPassword', @@ -33,9 +41,10 @@ const routes = [ component: forgetPassword }, { - path: '/resetPassword', - name: 'resetPassword', - component: resetPassword + path: '/resetPassword/:token', + name: 'resetPassword', + component: resetPassword, + props: true }, { diff --git a/src/utils/axios.js b/src/utils/axios.js index 1742a16..4f68c9a 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -88,8 +88,10 @@ export function getAxios({ url, params }) { } else if (res.code == 40400) { router.push('/') ElMessage.error(res.code + '' + res.msg); + reject(); } else { ElMessage.error(res.code + '' + res.msg); + reject(); } }).catch(err => { reject(err) @@ -116,9 +118,11 @@ export function postAxios({ url, data }) { router.push('/') console.log(res.msg); ElMessage.error(res.code + '' + res.msg); + reject(); } else { console.log(res.msg); ElMessage.error(res.code + '' + res.msg); + reject(); } }).catch(err => { reject(err) diff --git a/src/views/ActivateEmail.vue b/src/views/ActivateEmail.vue index 4a9bdb0..e7af6b3 100644 --- a/src/views/ActivateEmail.vue +++ b/src/views/ActivateEmail.vue @@ -46,7 +46,7 @@ onMounted(() => { getPromiseStorage('user').then(res => { console.log(res); user.value = res; - }); + }).catch((err) => {}); }); onUpdated(() => { // 组件更新后执行 diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index ec1a0ed..0671f0c 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -157,7 +157,7 @@ function forgetPassword() { function fetchQrcode() { getVxQrcode().then((res) => { Qrcode.value = res; - }); + }).catch((err) => {}); } //查询微信扫码是否成功 function checkLogin() { @@ -170,7 +170,7 @@ function checkLogin() { pollstop(); router.push("/nav"); } - }); + }).catch((err) => {}); } function pollstop() { clearInterval(vxloginstatus); diff --git a/src/views/activationSuccessful.vue b/src/views/activationSuccessful.vue index 315b3b6..becf91d 100644 --- a/src/views/activationSuccessful.vue +++ b/src/views/activationSuccessful.vue @@ -3,13 +3,46 @@
- 验证成功 + {{Hinttext}}
diff --git a/src/views/emailRegistration.vue b/src/views/emailRegistration.vue index 5afdd7d..1cf628e 100644 --- a/src/views/emailRegistration.vue +++ b/src/views/emailRegistration.vue @@ -103,7 +103,7 @@ function userNameBlur() { ElMessage.success('用户名可用'); userNamebtn.value = true } - }) + }).catch((err) => {}); } //下一步 function nextStep() { @@ -157,7 +157,7 @@ function check(id) { pollstop() router.push('/nav') } - }) + }).catch((err) => {}); }, 2000); } function pollstop() { diff --git a/src/views/hosts/Forum.vue b/src/views/hosts/Forum.vue index 352ab86..8cd8c6a 100644 --- a/src/views/hosts/Forum.vue +++ b/src/views/hosts/Forum.vue @@ -44,7 +44,7 @@ watch(refname, async (newQuestion, oldQuestion) => { onMounted(() => { getNoticeList({page: 0, size: 10}).then((res) => { NoticeList.value = res; - }); + }).catch((err) => {}); }); onUpdated(() => { // 组件更新后执行 diff --git a/src/views/hosts/Message.vue b/src/views/hosts/Message.vue index 5e97aa1..946362d 100644 --- a/src/views/hosts/Message.vue +++ b/src/views/hosts/Message.vue @@ -581,7 +581,7 @@ function getAnchorList() { userId: handleClickdata.value.userId, }).then((res) => { getAnchorListdata.value = res; - }); + }).catch((err) => {}); } //查询我方已发布的未被邀请的主播列表 function getMyAnchorList() { @@ -589,7 +589,7 @@ function getMyAnchorList() { userId: user.value.id, }).then((res) => { getMyAnchorListdata.value = res; - }); + }).catch((err) => {}); } //确认邀请 @@ -626,8 +626,8 @@ function reminderDialogConfirm() { chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight; } }); - }); - }); + }).catch((err) => {}); + }).catch((err) => {}); } // PK邀请弹窗 function PKInvitationdialogclick() { @@ -683,7 +683,7 @@ const handleFileSelect = (event) => { chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight; } }); - }); + }).catch((err) => {}); } }; @@ -705,7 +705,7 @@ function sendMsg() { chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight; } }); - }); + }).catch((err) => {}); } // 加载更多消息 @@ -740,14 +740,14 @@ function handleClick(item) { } }); chatlistContainer.value.addEventListener("scroll", scrollHandler); - }); + }).catch((err) => {}); messageRead(); } //已读消息 function messageRead() { goEasyMessageRead({ id: handleClickdata.value.userId, - }).then((res) => {}); + }).then((res) => {}).catch((err) => {}); } //获取更多消息 @@ -818,7 +818,7 @@ function onPrivateMessageReceived(message) { function getChatList() { goEasyGetConversations().then((res) => { chatList.value = res.content.conversations; - }); + }).catch((err) => {}); } watch(counter, (newQuestion, oldQuestion) => { setTimeout(() => { diff --git a/src/views/hosts/Mine.vue b/src/views/hosts/Mine.vue index acea245..a68b879 100644 --- a/src/views/hosts/Mine.vue +++ b/src/views/hosts/Mine.vue @@ -61,14 +61,8 @@ const options = [ icon: require("@/assets/PointsList.png"), }, ] -import { throttle } from 'lodash-es'; - -const throttledUpdate = throttle((value) => { - segmentedvalue.value = value; -}, 500); - function SelectorClick(value) { - throttledUpdate(value); + segmentedvalue.value = value; } const segmentedvalue = ref(1); diff --git a/src/views/hosts/pk.vue b/src/views/hosts/pk.vue index f4c2a9d..987f7e0 100644 --- a/src/views/hosts/pk.vue +++ b/src/views/hosts/pk.vue @@ -757,7 +757,7 @@ function getAnchorList() { userId: info.value.id, }).then((res) => { getAnchorListdata.value = res; - }); + }).catch((err) => {}); } //查询我方已发布的未被邀请的主播列表 function getMyAnchorList() { @@ -765,7 +765,7 @@ function getMyAnchorList() { userId: user.value.id, }).then((res) => { getMyAnchorListdata.value = res; - }); + }).catch((err) => {}); } //确认邀请 @@ -801,8 +801,8 @@ function reminderDialogConfirm() { chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight; } }); - }); - }); + }).catch((err) => {}); + }).catch((err) => {}); } // PK邀请弹窗 function PKInvitationdialogclick() { @@ -859,7 +859,7 @@ const handleFileSelect = (event) => { chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight; } }); - }); + }).catch((err) => {}); } }; @@ -881,7 +881,7 @@ function sendMsg() { chatlistContainer.value.scrollTop = chatlistContainer.value.scrollHeight; } }); - }); + }).catch((err) => {}); } // 选中主播后获取聊天列表数据 function handleClick(time) { @@ -904,8 +904,8 @@ function handleClick(time) { } }); chatlistContainer.value.addEventListener("scroll", scrollHandler); - }); - }); + }).catch((err) => {}); + }).catch((err) => {}); } // 加载更多消息 @@ -920,7 +920,7 @@ function loadMore() { function messageRead() { goEasyMessageRead({ id: String(handleClickdata.value.senderId), - }).then((res) => {}); + }).then((res) => {}).catch((err) => {}); } //私聊消息接收 @@ -1012,7 +1012,7 @@ function PkList(body,type) { list.value = TodayList.value; } } - }); + }).catch((err) => {}); } // 加载更多 diff --git a/src/views/resetPassword.vue b/src/views/resetPassword.vue index d157847..4829d2b 100644 --- a/src/views/resetPassword.vue +++ b/src/views/resetPassword.vue @@ -45,7 +45,6 @@ const token = ref(""); const Password = ref("");// 密码 const ConfirmPassword = ref("");// 确认密码 import { ElMessage } from "element-plus"; - //确认 function nextStep() { // 密码验证 @@ -64,8 +63,8 @@ function nextStep() { password: Password.value, confirmPassword: ConfirmPassword.value }).then(() => { - active.value = active.value + 1; - }) + active.value = 1; + }).catch((err) => {}); } onMounted(() => { @@ -115,8 +114,8 @@ onUnmounted(() => { } .forms{ margin-top: 30px; - width: 900px; - height: 600px; + width: 80%; + height: 80%; background-image: linear-gradient(180deg, #dbf0f1, #ffffff); border-radius: 10px; border: 1px solid #4fcacd; diff --git a/src/views/verifyAccount.vue b/src/views/verifyAccount.vue new file mode 100644 index 0000000..a8191b3 --- /dev/null +++ b/src/views/verifyAccount.vue @@ -0,0 +1,84 @@ + + + +