后台系统: 用户详情页面添加钱包余额显示、用户管理优化记录用户选择币种、 新增广播增加查看按钮内容、及对应跳转对应页面路径 增加帮助中心页面、公告中心页面 完成

This commit is contained in:
2025-07-11 16:33:34 +08:00
parent c6f765f858
commit a0ebd8254a
63 changed files with 5379 additions and 680 deletions

View File

@@ -175,6 +175,24 @@
<span class="line"></span>
</div>
</li>
<!-- 帮助中心 -->
<li
class="personalCenter"
:class="{
active: $route.path.includes(`/${$i18n.locale}/helpCenter`),
}"
@click="handelJump('helpCenter')"
>
{{ $t(`home.helpCenter`) }}
<div
class="horizontalLine"
:class="{ hidden: $route.path.includes(`helpCenter`) }"
>
<span class="circular"></span>
<span class="line"></span>
</div>
</li>
<!-- 工单管理 -->
<!-- <li
v-show="ManagementShow"
@@ -230,6 +248,25 @@
<li class="register" @click="handelRegister">
{{ $t(`user.register`) }}
</li>
<li
class="personalCenter"
style="margin-left: 20px;"
:class="{
active: $route.path.includes(`/${$i18n.locale}/helpCenter`),
}"
@click="handelJump('helpCenter')"
>
{{ $t(`home.helpCenter`) }}
<div
class="horizontalLine"
:class="{ hidden: $route.path.includes(`helpCenter`) }"
>
<span class="circular"></span>
<span class="line"></span>
</div>
</li>
<li class="langBox">
<div class="LangLine"></div>
<el-dropdown>
@@ -296,6 +333,8 @@ export default {
imgUrl:getImageUrl(`/img/nexa.png`) ,
},
customerIsOnline: false,
userEmail:"",
};
},
watch: {
@@ -352,6 +391,8 @@ export default {
this.jurisdiction = JSON.parse(jurisdiction);
let currencyList = localStorage.getItem("currencyList");
this.currencyList = JSON.parse(currencyList);
let userEmail = localStorage.getItem("userEmail");
this.userEmail = JSON.parse(userEmail);
window.addEventListener("setItem", () => {
let valueTaking = localStorage.getItem("token");
this.token = JSON.parse(valueTaking);
@@ -365,6 +406,8 @@ export default {
this.currencyList = JSON.parse(currencyList);
let active = localStorage.getItem(`activeItemCoin`)
this.activeItem = JSON.parse(active)
let userEmail = localStorage.getItem("userEmail");
this.userEmail = JSON.parse(userEmail);
if (this.jurisdiction && this.jurisdiction.roleKey == `admin`) {
this.ManagementShow = true;
@@ -447,13 +490,35 @@ export default {
// localStorage.setItem(`accountList`,JSON.stringify(this.accountList))
}
},
// 修改 fetchUserid 方法,添加 token 检查
async fetchUserid(params) {
try {
const res = await getUserid(params);
if (res && res.code == 200) {
this.customerIsOnline = res.data.customerIsOnline;
localStorage.setItem(`customerIsOnline`,JSON.stringify(this.customerIsOnline))
}
} catch (error) {
console.error("获取用户ID失败:", error);
throw error;
}
},
async fetchSignOut() {
const data = await getLogout();
if (data && data.code == 200) {
// 调用 Vuex 的 logout action 清除前端状态
await this.$store.dispatch('logout')
const lang = this.$i18n.locale;
this.fetchUserid({email:this.userEmail})
this.$router.push(`/${lang}`);
}
},
handleDropdownClick() {
@@ -564,9 +629,12 @@ export default {
}
},
handelSignOut() {
localStorage.setItem('cs_disconnect_all', Date.now().toString()); //告知客服页面断开连接
this.fetchSignOut();
localStorage.removeItem(`token`);
localStorage.removeItem("username");
localStorage.removeItem("userName");
localStorage.removeItem("userEmail");
localStorage.removeItem("jurisdiction");
this.$addStorageEvent(1, `miningAccountList`, JSON.stringify(""));
this.isLogin = false;