diff --git a/mining-pool/dist.zip b/mining-pool/dist.zip index 5529ef2..19d640b 100644 Binary files a/mining-pool/dist.zip and b/mining-pool/dist.zip differ diff --git a/mining-pool/src/App.vue b/mining-pool/src/App.vue index 71f99e8..805b156 100644 --- a/mining-pool/src/App.vue +++ b/mining-pool/src/App.vue @@ -1,7 +1,7 @@ @@ -1928,6 +3484,16 @@ export default { } } + &.disconnected { + i { + color: #f39c12; + } + + p { + color: #f39c12; + } + } + .retry-button { margin-top: 16px; padding: 8px 16px; @@ -2341,6 +3907,7 @@ export default { .refresh-button { background-color: #f0f0f0; color: #666; + padding: 0px 16px; &:hover { background-color: #e0e0e0; @@ -2348,14 +3915,6 @@ export default { } } - - - - - - - - .chat-time-divider { text-align: center; margin: 16px 0; @@ -2365,9 +3924,16 @@ export default { display: inline-block; padding: 2px 12px; border-radius: 10px; - box-shadow: 0 1px 2px rgba(0,0,0,0.04); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); left: 50%; transform: translateX(-50%); position: relative; } + +/* === 移除本地消息的视觉反馈(小黄点) === */ +/* .chat-message-local { + // 不再显示任何特殊样式 +} */ + + \ No newline at end of file diff --git a/mining-pool/src/i18n/ChatWidget.js b/mining-pool/src/i18n/ChatWidget.js index df703eb..0b65a38 100644 --- a/mining-pool/src/i18n/ChatWidget.js +++ b/mining-pool/src/i18n/ChatWidget.js @@ -89,6 +89,8 @@ export const ChatWidget_zh = { serverLimitError:"服务器连接数已达上限,请稍后刷新重试", identityError:"用户身份设置失败,请刷新页面重试", emailError:"用户信息获取失败,请刷新页面重试", + refreshPage:"刷新页面", + reconnectSuccess:"重新连接成功", }, @@ -186,6 +188,8 @@ export const ChatWidget_en = { serverLimitError:"Connection limit reached, please try again later", identityError:"Failed to set user identity, please refresh page", emailError:"Failed to get user information, please refresh page", + refreshPage:"Refresh page", + reconnectSuccess:"Reconnect successfully", } diff --git a/mining-pool/src/i18n/ServiceTerms.js b/mining-pool/src/i18n/ServiceTerms.js index 1728d2b..f797b31 100644 --- a/mining-pool/src/i18n/ServiceTerms.js +++ b/mining-pool/src/i18n/ServiceTerms.js @@ -9,7 +9,7 @@ export const serviceTerms_zh = { title2:"二、服务说明", clauseService1:"1.我们的服务旨在为用户提供数字货币挖矿相关的资源和支持,但不保证挖矿的收益或成功。", clauseService2:"2.服务可能会因维护、升级或其他原因而暂时中断,我们将尽力提前通知用户,但不对此类中断造成的损失负责。", - clauseService3:"3.M2Pool 不向以下司法管辖区的个人或实体提供服务:阿富汗、白俄罗斯、中非共和国、刚果民主共和国、几内亚比绍、古巴、伊朗、伊拉克、朝鲜、利比亚、黎巴嫩、马里、叙利亚、委内瑞拉和津巴布韦。受限制的司法管辖区还包括M2pool选择不运营的任何国家/地区,包括但不限于阿尔及利亚、安哥拉、孟加拉国、中国、埃及、海地、科索沃、科威特、摩洛哥、俄罗斯、尼泊尔、索马里、南苏丹、苏丹和也门。", + clauseService3:"3.M2Pool 不向以下司法管辖区的个人或实体提供服务:阿富汗、白俄罗斯、中非共和国、刚果民主共和国、几内亚比绍、古巴、伊朗、伊拉克、朝鲜、利比亚、黎巴嫩、马里、叙利亚、委内瑞拉和津巴布韦。受限制的司法管辖区还包括M2pool选择不运营的任何国家/地区,包括但不限于阿尔及利亚、安哥拉、孟加拉国、中国、埃及、海地、科索沃、科威特、摩洛哥、俄罗斯、尼泊尔、索马里、南苏丹、苏丹、也门和新加坡。", clauseService4:" 通过访问和使用 M2Pool 服务,您声明并保证您不位于、不在上述任何国家/地区设立或不是上述任何国家的居民。M2Pool 保留自行决定限制或拒绝某些国家/地区提供服务的权利。如果 M2Pool 确定(自行决定)用户是指定国家/地区的居民,M2Pool 可能会冻结或终止这些帐户。", title3:"三、用户资格", clauseUser1:"1.您必须达到法定年龄并具备完全民事行为能力才能使用本服务。", @@ -53,7 +53,7 @@ export const serviceTerms_en = { "title1": "1、 General Provisions", "clauseTotal1": "Welcome to the M2pool mining pool website (hereinafter referred to as \"this website\"). By using the services of this website (hereinafter referred to as the \"Services\"), you agree to comply with the following terms of service (hereinafter referred to as the \"Terms\").", "clauseTotal2": "2. Please carefully read the following terms. If you click the \"Register\" button or view or use these services, it is deemed that you have read and agreed to these terms of service and all its additional terms. If you do not accept the limitations of the terms of service, please do not view or use the service.", "clauseTotal3": "3. We reserve the right to modify these terms at any time, and the modified terms will be published on the website. By continuing to use the service, you accept the revised terms.", "clauseTotal4": "4. We hope that you can regularly review these terms to ensure that you have confirmed the terms and conditions applicable to your viewing and use. These terms and additional terms are available for your review and can be used to use any services we provide, including but not limited to the following websites: https://www.m2pool.com/ (hereinafter referred to as \"this website\").", "title2": "2、 Service Description", "clauseService1": "Our service aims to provide users with resources and support related to cryptocurrency mining, but we do not guarantee the profits or success of mining.", "clauseService2": "2. The service may be temporarily interrupted due to maintenance, upgrades, or other reasons. We will do our best to notify users in advance, but we are not responsible for any losses caused by such interruptions.", - "clauseService3": "3.M2Pool does not provide services to individuals or entities in the following jurisdictions: Afghanistan, Belarus, Central African Republic, Democratic Republic of the Congo, Guinea Bissau, Cuba, Iran, Iraq, North Korea, Libya, Lebanon, Mali, Syria, Venezuela and Zimbabwe. Restricted jurisdictions also include any country/territory in which M2pool chooses not to operate, including but not limited to Algeria, Angola, Bangladesh, China, Egypt, Haiti, Kosovo, Kuwait, Morocco, Russia, Nepal, Somalia, South Sudan, Sudan and Yemen.", + "clauseService3": "3.M2Pool does not provide services to individuals or entities in the following jurisdictions: Afghanistan, Belarus, Central African Republic, Democratic Republic of the Congo, Guinea Bissau, Cuba, Iran, Iraq, North Korea, Libya, Lebanon, Mali, Syria, Venezuela and Zimbabwe. Restricted jurisdictions also include any country/territory in which M2pool chooses not to operate, including but not limited to Algeria, Angola, Bangladesh, China, Egypt, Haiti, Kosovo, Kuwait, Morocco, Russia, Nepal, Somalia, South Sudan, Sudan, Yemen and Singapore.", "title3": "3、 User Qualification", "clauseUser1": "1. You must be of legal age and have full capacity for civil conduct to use this service.", "clauseUser2": "2. You guarantee that the registration information provided is true, accurate, complete, and updated in a timely manner. You can log in to M2Pool using other methods allowed by our email address. If the registration information you provide is incorrect, we will not be held responsible. You will suffer any direct or indirect losses and adverse consequences.", "clauseUser3": "3. You should be a legal person, company, or other organization with full capacity for conduct and civil rights. Otherwise, you or your guardian shall bear all consequences. We have the right to cancel or permanently suspend your account and demand compensation from you.", "title4": "4、 User Responsibility", "clauseResponsibility1": "1. You shall comply with all applicable national laws, regulations and normative documents, as well as the provisions and requirements of these rules, including but not limited to laws related to digital currency mining. Not violating the public interest or public morality, not harming the legitimate rights and interests of others, not evading taxes, and not violating these regulations and related rules. If you violate the above commitments and incur any legal consequences, you shall bear all legal responsibilities on your own and ensure that we are free from any losses.", "clauseResponsibility2": "2. You are not allowed to engage in any illegal, fraudulent, harmful, or infringing activities using this service.", "clauseResponsibility3": "3. You are responsible for your mining equipment and network connection, ensuring that it meets relevant requirements and operates normally.", "clauseResponsibility4": "4. You are responsible for the confidentiality of your M2Pool username and password, as well as all activities that occur under your username and M2Pool password (including but not limited to information disclosure and publication, online click to agree or submit various rules and agreements, online agreement renewal or purchase of services, account settings, etc.).", "clauseResponsibility5": "5. If anyone uses your M2pool email, account, etc. to log in to this website without authentication, we will not be responsible for any losses caused by your violation of these terms.", "title5": "5、 Fees and Payment", "clausePayment1": "We may charge a certain fee based on the service content, and the specific fee standard will be announced on the website.", "clausePayment2": "2. You agree to pay the fees according to the prescribed payment method and time. Failure to pay on time may result in the suspension or termination of the service.", "clausePayment3": "3. The taxable amount and all hardware, software, service or other expenses incurred by you when using this service shall be borne by you.", "title6": "6、 Income and distribution", "clauseProfit1": "1. Mining profits will be distributed according to our distribution mechanism, but we do not guarantee the stability and stability of the profits.", "clauseProfit2": "2. We have the right to adjust the allocation mechanism according to the actual situation, but we will notify users in advance.", "title7": "7、 Data and Privacy", "clausePrivacy1": "1. We will collect and use relevant data generated during your use of the service, but we will strictly comply with the privacy policy to protect your privacy.", "clausePrivacy2": "2. You agree to our collection, use, and processing of data to provide and improve services.", "title8": "8、 Intellectual Property", "clausePropertyRight1": "All content on this website, including but not limited to trademarks, copyrights, patents, etc., belongs to our company or relevant rights holders.", "clausePropertyRight2": "2. Without authorization, you are not allowed to copy, modify, disseminate or use any intellectual property of this website.", "title9": "9、 Disclaimer", "clauseDisclaimer1": "We are not responsible for service interruptions or data loss caused by force majeure, system failures, network issues, etc.", "clauseDisclaimer2": "2. We are not liable for any direct, indirect, incidental, special or consequential losses incurred by you as a result of using this service, including but not limited to mining revenue loss, equipment damage, etc.", "title10": "10、 Termination of Service", "clauseTermination1": "We have the right to terminate your service in the following circumstances: violation of these terms, laws and regulations, or damage to the interests of our company or other users.", "clauseTermination2": "After the termination of the service, your relevant data may be deleted or retained, and the specific processing method will be implemented in accordance with laws, regulations, and company policies.", "title11": "11、 Application of Law and Dispute Resolution", "clauseLaw1": "1. This clause is governed by the laws of Singapore.", "clauseLaw2": "2. In the event of a dispute, both parties shall resolve it through friendly consultation; If the negotiation fails, a lawsuit may be filed with a court with jurisdiction." diff --git a/mining-pool/src/utils/request.js b/mining-pool/src/utils/request.js index 8a4cc8a..4568da6 100644 --- a/mining-pool/src/utils/request.js +++ b/mining-pool/src/utils/request.js @@ -4,6 +4,13 @@ import { Notification, MessageBox, Message } from 'element-ui' import loadingManager from './loadingManager'; import errorNotificationManager from './errorNotificationManager'; + +const pendingRequestMap = new Map(); //处理Request aborted 错误 + +function getRequestKey(config) { //处理Request aborted 错误 生成唯一 key 的函数 + const { url, method, params, data } = config; + return [url, method, JSON.stringify(params), JSON.stringify(data)].join('&'); +} // 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 @@ -143,9 +150,6 @@ window.addEventListener('online', () => { }); }); - - - // 使用错误提示管理器控制网络断开提示 window.addEventListener('offline', () => { if (window.vm && window.vm.$message && errorNotificationManager.canShowError('networkOffline')) { @@ -215,6 +219,22 @@ service.interceptors.request.use(config => { config.params = {}; config.url = url; } + + // 生成请求唯一key 处理Request aborted 错误 + const requestKey = getRequestKey(config); + + // 如果有相同请求,先取消 处理Request aborted 错误 + if (pendingRequestMap.has(requestKey)) { + const cancel = pendingRequestMap.get(requestKey); + cancel(); // 取消上一次请求 + pendingRequestMap.delete(requestKey); + } + + // 创建新的CancelToken 处理Request aborted 错误 + config.cancelToken = new axios.CancelToken(cancel => { + pendingRequestMap.set(requestKey, cancel); + }); + return config }, error => { Promise.reject(error) @@ -222,6 +242,10 @@ service.interceptors.request.use(config => { // 响应拦截器 service.interceptors.response.use(res => { + + // 请求完成后移除 + const requestKey = getRequestKey(res.config); + pendingRequestMap.delete(requestKey); // 未设置状态码则默认成功状态 const code = res.data.code || 200; // 获取错误信息 @@ -284,8 +308,15 @@ service.interceptors.response.use(res => { }, error => { - - + if (error.message && error.message.includes('canceled') || error.message.includes('Request aborted')) { + // 主动取消的请求,直接忽略,不提示 + return Promise.reject(error); + } + // 请求异常也要移除 处理Request aborted 错误 + if (error.config) { + const requestKey = getRequestKey(error.config); + pendingRequestMap.delete(requestKey); + } let { message } = error; diff --git a/mining-pool/src/views/ServiceTerms/index.vue b/mining-pool/src/views/ServiceTerms/index.vue index 71d18f3..909d698 100644 --- a/mining-pool/src/views/ServiceTerms/index.vue +++ b/mining-pool/src/views/ServiceTerms/index.vue @@ -89,13 +89,13 @@

{{ $t(`ServiceTerms.clauseTermination2`) }}

-
+
@@ -189,13 +189,13 @@

{{ $t(`ServiceTerms.clauseTermination2`) }}

-
+
diff --git a/mining-pool/src/views/customerService/index.vue b/mining-pool/src/views/customerService/index.vue index ee52689..0c8ee97 100644 --- a/mining-pool/src/views/customerService/index.vue +++ b/mining-pool/src/views/customerService/index.vue @@ -1,3 +1,44 @@ +