Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
StandaloneFrame
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
StandaloneFrame
Commits
f96ff24e
Commit
f96ff24e
authored
Jun 15, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adsr
parent
f5182a1c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
7 deletions
+62
-7
.gitignore
.gitignore
+11
-1
system.json
data/system.json
+3
-3
config.default.js
electron/config/config.default.js
+3
-3
login.jsx
frontend/src/pages/user/login.jsx
+3
-0
ipcRenderer.js
frontend/src/utils/ipcRenderer.js
+28
-0
ee-20230615.log
logs/ee-20230615.log
+8
-0
ee-core-20230615.log
logs/ee-core-20230615.log
+5
-0
ee-error-20230615.log
logs/ee-error-20230615.log
+1
-0
No files found.
.gitignore
View file @
f96ff24e
...
...
@@ -7,4 +7,14 @@ node_modules
/src/.umi-test
dist
.swc
.history
\ No newline at end of file
.history
out/
logs/
run/
.idea/
package-lock.json
data/
.vscode/launch.json
public/electron/
pnpm-lock.yaml
data/system.json
View file @
f96ff24e
...
...
@@ -57,17 +57,17 @@
}
},
"developmentMode"
:
{
"default"
:
"
vue
"
,
"default"
:
"
react
"
,
"mode"
:
{
"vue"
:
{
"protocol"
:
"http://"
,
"hostname"
:
"localhost"
,
"port"
:
8080
"port"
:
4399
},
"react"
:
{
"protocol"
:
"http://"
,
"hostname"
:
"localhost"
,
"port"
:
3
000
"port"
:
8
000
},
"html"
:
{
"protocol"
:
"http://"
,
...
...
electron/config/config.default.js
View file @
f96ff24e
...
...
@@ -13,15 +13,15 @@ module.exports = (appInfo) => {
* 应用模式配置
*/
config
.
developmentMode
=
{
default
:
'
vue
'
,
default
:
'
react
'
,
mode
:
{
vue
:
{
hostname
:
'localhost'
,
port
:
8080
port
:
4399
},
react
:
{
hostname
:
'localhost'
,
port
:
3
000
port
:
8
000
},
html
:
{
hostname
:
'localhost'
,
...
...
frontend/src/pages/user/login.jsx
View file @
f96ff24e
...
...
@@ -9,6 +9,8 @@ import {
import
{
history
,
useModel
,
useOutletContext
}
from
"umi"
;
import
{
Card
,
Dropdown
,
message
,
Tabs
,
QRCode
}
from
"antd"
;
import
{
useState
}
from
"react"
;
import
{
ipc
}
from
"@/utils/ipcRenderer"
;
const
Login
=
()
=>
{
const
{
...
...
@@ -16,6 +18,7 @@ const Login = () => {
setInitialState
,
}
=
useModel
(
"@@initialState"
);
const
{
mode
}
=
useOutletContext
();
console
.
log
(
ipc
);
const
handleSubmit
=
async
(
values
)
=>
{
if
(
loginType
===
"account"
)
{
...
...
frontend/src/utils/ipcRenderer.js
0 → 100644
View file @
f96ff24e
const
{
ipcRenderer
:
ipc
}
=
(
window
.
require
&&
window
.
require
(
'electron'
))
||
window
.
electron
||
{};
/**
* ipc
* 官方api说明:https://www.electronjs.org/zh/docs/latest/api/ipc-renderer
*
* 属性/方法
* ipc.invoke(channel, param) - 发送异步消息(invoke/handle 模型)
* ipc.sendSync(channel, param) - 发送同步消息(send/on 模型)
* ipc.on(channel, listener) - 监听 channel, 当新消息到达,调用 listener
* ipc.once(channel, listener) - 添加一次性 listener 函数
* ipc.removeListener(channel, listener) - 为特定的 channel 从监听队列中删除特定的 listener 监听者
* ipc.removeAllListeners(channel) - 移除所有的监听器,当指定 channel 时只移除与其相关的所有监听器
* ipc.send(channel, ...args) - 通过channel向主进程发送异步消息
* ipc.postMessage(channel, message, [transfer]) - 发送消息到主进程
* ipc.sendTo(webContentsId, channel, ...args) - 通过 channel 发送消息到带有 webContentsId 的窗口
* ipc.sendToHost(channel, ...args) - 消息会被发送到 host 页面上的 <webview> 元素
*/
/**
* 是否为EE环境
*/
const
isEE
=
ipc
?
true
:
false
;
export
{
ipc
,
isEE
}
logs/ee-20230615.log
View file @
f96ff24e
...
...
@@ -6,3 +6,11 @@
2023-06-15 13:35:39,867 INFO 9788 [addon:security] load
2023-06-15 13:35:39,868 INFO 9788 [addon:awaken] load
2023-06-15 13:35:39,870 INFO 9788 [addon:autoUpdater] load
2023-06-15 15:51:15,745 INFO 11081 [addon:tray] load
2023-06-15 15:51:15,758 INFO 11081 [addon:security] load
2023-06-15 15:51:15,758 INFO 11081 [addon:awaken] load
2023-06-15 15:51:15,761 INFO 11081 [addon:autoUpdater] load
2023-06-15 16:11:40,938 INFO 11439 [addon:tray] load
2023-06-15 16:11:40,950 INFO 11439 [addon:security] load
2023-06-15 16:11:40,950 INFO 11439 [addon:awaken] load
2023-06-15 16:11:40,952 INFO 11439 [addon:autoUpdater] load
logs/ee-core-20230615.log
View file @
f96ff24e
...
...
@@ -4,3 +4,8 @@
2023-06-15 13:35:39,873 INFO 9788 [ee-core] Env: local, Type: spa
2023-06-15 13:35:39,874 INFO 9788 [ee-core] App running at: http://localhost:8080
2023-06-15 13:35:39,950 ERROR 9788 [ee-core] Please check the http://localhost:8080 are running OR modify config file !
2023-06-15 15:51:15,765 INFO 11081 [ee-core] Env: local, Type: spa
2023-06-15 15:51:15,765 INFO 11081 [ee-core] App running at: http://localhost:8000
2023-06-15 15:51:15,878 ERROR 11081 [ee-core] Please check the http://localhost:8000 are running OR modify config file !
2023-06-15 16:11:40,956 INFO 11439 [ee-core] Env: local, Type: spa
2023-06-15 16:11:40,956 INFO 11439 [ee-core] App running at: http://localhost:8000
logs/ee-error-20230615.log
View file @
f96ff24e
2023-06-15 13:35:12,119 ERROR 9746 [ee-core] Please check the http://localhost:8080 are running OR modify config file !
2023-06-15 13:35:39,950 ERROR 9788 [ee-core] Please check the http://localhost:8080 are running OR modify config file !
2023-06-15 15:51:15,878 ERROR 11081 [ee-core] Please check the http://localhost:8000 are running OR modify config file !
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment