chore(core): 使用path模块替代手动字符串拼接构造路径
This commit is contained in:
@@ -661,7 +661,7 @@ class App extends Component {
|
||||
if (goog.isElectron) {
|
||||
Loader.onbeforeunload();
|
||||
} else {
|
||||
let href = Env.srcDirPath + '/index.html?' + Url.jsonToUrl({ boardType: BOARD.boardType });
|
||||
let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType });
|
||||
window.location.replace(href);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1441,6 +1441,7 @@
|
||||
{
|
||||
"path": "/electron/loader.js",
|
||||
"require": [
|
||||
"path",
|
||||
"Mixly.Url",
|
||||
"Mixly.Config",
|
||||
"Mixly.Env",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
goog.loadJs('electron', () => {
|
||||
|
||||
goog.require('path');
|
||||
goog.require('Mixly.Url');
|
||||
goog.require('Mixly.Config');
|
||||
goog.require('Mixly.Env');
|
||||
@@ -32,7 +33,7 @@ Loader.onbeforeunload = function(reload = false) {
|
||||
window.location.reload(true);
|
||||
}
|
||||
}
|
||||
let href = Env.srcDirPath + '/index.html?' + Url.jsonToUrl({ boardType: BOARD.boardType ?? 'None' });
|
||||
let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType ?? 'None' });
|
||||
let endPromise = [];
|
||||
const { mainStatusBarTabs } = Mixly;
|
||||
Serial.getCurrentPortsName().map((name) => {
|
||||
|
||||
Reference in New Issue
Block a user