Commit f96ff24e authored by wuhao's avatar wuhao 🎯

adsr

parent f5182a1c
......@@ -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
......@@ -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": 3000
"port": 8000
},
"html": {
"protocol": "http://",
......
......@@ -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: 3000
port: 8000
},
html: {
hostname: 'localhost',
......
......@@ -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") {
......
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
}
......@@ -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
......@@ -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
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 !
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment