m2pool_web_frontend/mining-pool/test/js/app-42f9d7e6.8aa0cd9f.js

1 line
178 KiB
JavaScript
Raw Normal View History

2025-06-06 07:31:04 +00:00
"use strict";(self["webpackChunkmining_pool"]=self["webpackChunkmining_pool"]||[]).push([[282],{857:function(e,t,i){Object.defineProperty(t,"B",{value:!0}),t.A=void 0,i(44114);var o=i(47149),n=i(6803),s=i(82908);t.A={computed:{key(){return this.$route.path}},data(){return{isLogin:!1,bthText:"English",token:"",accountList:[],miningAccountList:[],isOrderKey:"",activeIndex2:"",isDropdownVisible:!1,activeIndex:"",jurisdiction:{roleKey:""},ManagementShow:!1,currencyList:[],activeItem:{value:"nexa",label:"nexa",imgUrl:(0,s.getImageUrl)("/img/nexa.png")}}},watch:{token:{handler(e){this.isLogin=!!e},immediate:!0,deep:!0},accountList:{handler(e){},immediate:!0,deep:!0},miningAccountList:{handler(e){},immediate:!0,deep:!0},$route(e,t){"/miningAccount"!==e.path&&(this.activeIndex="")},activeItemCoin:{handler(e){this.changeMenuName($event,this.activeItem)},deep:!0}},mounted(){this.$addStorageEvent(1,"activeItemCoin",JSON.stringify(this.activeItem));let e=localStorage.getItem("token");this.token=JSON.parse(e);let t=localStorage.getItem("accountList");this.accountList=JSON.parse(t);let i=localStorage.getItem("miningAccountList");this.miningAccountList=JSON.parse(i);let o=localStorage.getItem("jurisdiction");this.jurisdiction=JSON.parse(o);let n=localStorage.getItem("currencyList");this.currencyList=JSON.parse(n),window.addEventListener("setItem",(()=>{let e=localStorage.getItem("token");this.token=JSON.parse(e);let t=localStorage.getItem("accountList");this.accountList=JSON.parse(t);let i=localStorage.getItem("miningAccountList");this.miningAccountList=JSON.parse(i);let o=localStorage.getItem("jurisdiction");this.jurisdiction=JSON.parse(o);let n=localStorage.getItem("currencyList");this.currencyList=JSON.parse(n);let s=localStorage.getItem("activeItemCoin");this.activeItem=JSON.parse(s),this.jurisdiction&&"admin"==this.jurisdiction.roleKey?this.ManagementShow=!0:this.ManagementShow=!1})),this.jurisdiction&&"admin"==this.jurisdiction.roleKey?this.ManagementShow=!0:this.ManagementShow=!1,document.addEventListener("click",(function(){const e=document.querySelector(".dropdown"),t=document.querySelector(".arrow");try{e.classList.contains("show")&&(e.classList.remove("show"),t.classList.remove("up"))}catch(i){console.log(i)}}))},methods:{toggleDropdown(e){if(!e)return;const t=e.currentTarget,i=t.querySelector(".dropdown"),o=t.querySelector(".arrow");i&&(i.classList.toggle("show"),o?.classList.toggle("up"))},changeMenuName(e,t){if(!e)return;e.stopPropagation();const i=document.getElementById("menu1");if(!i)return;this.activeItem=t;const o=i.querySelector(".dropdown"),n=i.querySelector(".arrow");o?.classList.remove("show"),n?.classList.remove("up"),this.$addStorageEvent(1,"activeItemCoin",JSON.stringify(t))},handelDarkMode(){},async fetchAccountGradeList(){const e=await(0,o.getAccountGradeList)();this.miningAccountList=e.data,this.$addStorageEvent(1,"miningAccountList",JSON.stringify(this.miningAccountList))},async fetchAccountList(e){const t=await(0,n.getAccountList)(e);t&&200==t.code&&(this.accountList=t.data,this.$addStorageEvent(1,"accountList",JSON.stringify(this.accountList)))},async fetchSignOut(){const e=await(0,o.getLogout)();if(e&&200==e.code){await this.$store.dispatch("logout");const e=this.$i18n.locale;this.$router.push(`/${e}`)}},handleDropdownClick(){this.isDropdownVisible=!0},handleCommand(e){},handleSelect(){},handelLogin(){this.isLogin=!0;const e=this.$i18n.locale;this.$router.push(`/${e}/login`)},handelRegister(){const e=this.$i18n.locale;this.$router.push(`/${e}/register`)},handelLogin222(){this.isLogin=!this.isLogin},handelJump(e){try{const t=this.$i18n.locale;if("personalCenter"===e)return void this.$router.push(`/${t}/personalCenter/personalMining`).catch((e=>{"NavigationDuplicated"!==e.name&&console.error("Navigation failed:",e)}));const i=`/${t}${"/"===e?"":"/"+e}`;this.$router.push(i).catch((e=>{"NavigationDuplicated"!==e.name&&console.error("Navigation failed:",e)}))}catch(t){console.error("Navigation error:",t),this.$message.error(this.$t("common.navigationError"))}},handelJumpAccount(e,t,i){const o=this.$i18n.loc