From 4f0f1243787c4a434b18c14375b91aa6e15200b6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-6C3NK6N\\WXS" <815034831@qq.com> Date: Fri, 6 Sep 2024 13:36:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E9=80=9F=E7=9B=91=E6=8E=A7=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/trials.js | 2 +- src/utils/multipartUpload/aws.js | 6 +++--- src/utils/multipartUpload/oss.js | 6 +++--- vue.config.js | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/store/modules/trials.js b/src/store/modules/trials.js index 0422295e..cb52300b 100644 --- a/src/store/modules/trials.js +++ b/src/store/modules/trials.js @@ -9,7 +9,7 @@ const getDefaultState = () => { studyListQuery: null, unlock: false, config: {}, - uploadTip: '0.00kb/s', + uploadTip: '0.00KB/s', timer: null, whiteList: [], checkTaskId: null diff --git a/src/utils/multipartUpload/aws.js b/src/utils/multipartUpload/aws.js index 3de55a21..0fdd1a90 100644 --- a/src/utils/multipartUpload/aws.js +++ b/src/utils/multipartUpload/aws.js @@ -14,7 +14,7 @@ export function AWSclose() { if (timer) { clearInterval(timer); timer = null; - store.state.trials.uploadTip = '0kb/s' + store.state.trials.uploadTip = '0KB/s' } bytesReceivedPerSecond = {}; } @@ -440,10 +440,10 @@ function setTimer() { let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b); if (timeList.length > 0) { let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024); - let unit = 'kb/s'; + let unit = 'KB/s'; if (totalBytes > 1024) { totalBytes = totalBytes / 1024; - unit = "mb/s"; + unit = "MB/s"; } store.state.trials.uploadTip = totalBytes.toFixed(2) + unit; } diff --git a/src/utils/multipartUpload/oss.js b/src/utils/multipartUpload/oss.js index 5ee667b4..16405723 100644 --- a/src/utils/multipartUpload/oss.js +++ b/src/utils/multipartUpload/oss.js @@ -8,7 +8,7 @@ export function OSSclose() { if (timer) { clearInterval(timer); timer = null; - store.state.trials.uploadTip = '0kb/s' + store.state.trials.uploadTip = '0KB/s' } bytesReceivedPerSecond = {}; savaData = {}; @@ -140,10 +140,10 @@ function setTimer() { let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b); if (timeList.length > 0) { let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024); - let unit = 'kb/s'; + let unit = 'KB/s'; if (totalBytes > 1024) { totalBytes = totalBytes / 1024; - unit = "mb/s"; + unit = "MB/s"; } store.state.trials.uploadTip = totalBytes.toFixed(2) + unit; } diff --git a/vue.config.js b/vue.config.js index ea3e8bf9..f7fb01e5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -24,10 +24,10 @@ module.exports = { productionSourceMap: false, devServer: { port: '8080', - headers: { - 'Cross-Origin-Opener-Policy': 'same-origin', - 'Cross-Origin-Embedder-Policy': 'require-corp' - }, + // headers: { + // 'Cross-Origin-Opener-Policy': 'same-origin', + // 'Cross-Origin-Embedder-Policy': 'require-corp' + // }, // open: true, overlay: { warnings: false,