diff --git a/src/renderer/store/modules/chat.js b/src/renderer/store/modules/chat.js index 32c9355..78d79ee 100644 --- a/src/renderer/store/modules/chat.js +++ b/src/renderer/store/modules/chat.js @@ -1,5 +1,4 @@ // import { getAllList, getChatList, bindId, chatBegin } from '@/api/message' -import { getCurrentOSDiscTypes } from '@/utils/fileSize' let timeouter = null let websock = null @@ -130,7 +129,8 @@ const CDTypes = { 6: 'BD_TL', 7: 'BD_QL' } -// 使用跨平台文件大小计算 +// 使用跨平台文件大小计算(相对路径) +const { getCurrentOSDiscTypes } = require('../../utils/fileSize') const cd_types = getCurrentOSDiscTypes() const defaultData = { diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue index 1cc05ed..c246338 100644 --- a/src/renderer/views/dashboard/index.vue +++ b/src/renderer/views/dashboard/index.vue @@ -341,7 +341,6 @@ import { mapGetters } from 'vuex' const { app, dialog } = require('@electron/remote') import UserInfo from '@/components/userInfo/userInfo.vue' import WorkAdd from '@/components/workAdd/workAdd.vue' -import { getCurrentOSDiscTypes } from '@/utils/fileSize' const exePath = !app.isPackaged ? process.cwd() : path.dirname(process.execPath) const shPath = path.join(exePath, 'CardsoonServer', 'control.sh') const activePath = path.join(exePath, 'CardsoonServer', 'regist.sh') @@ -972,6 +971,7 @@ export default { that.currentRunVal = 0 // 使用跨平台文件大小计算(相对路径) + const { getCurrentOSDiscTypes } = require('../../utils/fileSize') let typeLists = getCurrentOSDiscTypes() let isBD = that.changeCD.req_info.strong_list.findIndex(item => parseInt(item.strong_type) > 3) if (isBD === -1) {