diff --git a/.gitignore b/.gitignore index 12af097..2ca16ba 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ logs/ run/ .idea/ package-lock.json -data/ -public/dist/ +data/ \ No newline at end of file diff --git a/electron/config/config.default.js b/electron/config/config.default.js index 605449e..46fb0a6 100644 --- a/electron/config/config.default.js +++ b/electron/config/config.default.js @@ -37,6 +37,9 @@ module.exports = (appInfo) => { /* 应用程序顶部菜单 */ config.openAppMenu = false; + /* 加载loading页 */ + config.loadingPage = true; + /* 主窗口 */ config.windowsOption = { width: 980, diff --git a/frontend/src/utils/request.js b/frontend/src/utils/request.js index ebdcd98..7cc3864 100644 --- a/frontend/src/utils/request.js +++ b/frontend/src/utils/request.js @@ -14,6 +14,12 @@ const request = axios.create({ const errorHandler = (error) => { if (error.response) { const data = error.response.data + if (error.response.status === 400) { + notification.error({ + message: '该功能需要egg服务', + description: data.message + }) + } if (error.response.status === 403) { notification.error({ message: 'Forbidden', diff --git a/package.json b/package.json index 32d7d74..2566e14 100755 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ "web-start": "egg-scripts start --daemon --title=ee --ignore-stderr --env=prod --workers=1", "web-stop": "egg-scripts stop --title=ee", "web-dev": "egg-bin dev", - "rd": "ee-cli rd --dist_dir=./frontend/dist", - "compress": "ee-cli compress", - "restore": "ee-cli restore" + "rd": "node ./node_modules/ee-core/bin/tools rd --dist_dir=./frontend/dist", + "compress": "node ./node_modules/ee-core/bin/tools compress", + "restore": "node ./node_modules/ee-core/bin/tools restore" }, "build": { "productName": "ee", @@ -105,7 +105,7 @@ "egg-cors": "^2.2.3", "egg-scripts": "^2.15.2", "egg-view-ejs": "^2.0.1", - "ee-core": "^1.0.0", + "ee-core": "^1.1.0", "electron-is": "^3.0.0", "lodash": "^4.17.21", "unzip-crx-3": "^0.2.0" diff --git a/public/dist/index.html b/public/dist/index.html new file mode 100644 index 0000000..5deb84d --- /dev/null +++ b/public/dist/index.html @@ -0,0 +1,22 @@ + + + + + + + +
+ hello ee +
+ + \ No newline at end of file