Commit e6e1408e authored by wuhao's avatar wuhao 🎯

asd

parent a7dd58a6
No preview for this file type
...@@ -2,9 +2,9 @@ node_modules ...@@ -2,9 +2,9 @@ node_modules
/.env.local /.env.local
/.umirc.local.ts /.umirc.local.ts
/config/config.local.ts /config/config.local.ts
/src/.umi /frontend/src/.umi
/src/.umi-production /frontend/src/.umi-production
/src/.umi-test */src/.umi-test
dist dist
.swc .swc
.history .history
...@@ -18,3 +18,4 @@ data/ ...@@ -18,3 +18,4 @@ data/
.vscode/launch.json .vscode/launch.json
public/electron/ public/electron/
pnpm-lock.yaml pnpm-lock.yaml
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
const path = require("path"); const path = require("path");
module.exports = { module.exports = {
"config": path.join(__dirname, "data/config.json"), "config": path.join(__dirname, "electron/database/config.json"),
"migrations-path": path.join(__dirname, "data/migrations"), "migrations-path": path.join(__dirname, "electron/database/migrations"),
"seeders-path": path.join(__dirname, "data/seeders"), "seeders-path": path.join(__dirname, "electron/database/seeders"),
"models-path": path.join(__dirname, "electron/model"), "models-path": path.join(__dirname, "electron/model"),
}; };
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"cache": { "cache": {
"config": { "config": {
"env": "local", "env": "local",
"name": "ee", "name": "standaloneframe",
"baseDir": "/Users/wuhao/Desktop/demos/standaloneframe/electron", "baseDir": "/Users/wuhao/Desktop/demos/standaloneframe/electron",
"HOME": "/Users/wuhao/Desktop/demos/standaloneframe", "HOME": "/Users/wuhao/Desktop/demos/standaloneframe",
"rundir": "/Users/wuhao/Desktop/demos/standaloneframe/electron/run", "rundir": "/Users/wuhao/Desktop/demos/standaloneframe/electron/run",
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
}, },
"homeDir": "/Users/wuhao/Desktop/demos/standaloneframe", "homeDir": "/Users/wuhao/Desktop/demos/standaloneframe",
"root": "/Users/wuhao/Desktop/demos/standaloneframe", "root": "/Users/wuhao/Desktop/demos/standaloneframe",
"appUserDataDir": "/Users/wuhao/Library/Application Support/ee", "appUserDataDir": "/Users/wuhao/Library/Application Support/standaloneframe",
"userHome": "/Users/wuhao", "userHome": "/Users/wuhao",
"appVersion": "3.4.0", "appVersion": "3.4.0",
"isPackaged": false, "isPackaged": false,
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
} }
}, },
"httpServer": { "httpServer": {
"enable": false, "enable": true,
"https": { "https": {
"enable": false, "enable": false,
"key": "/public/ssl/localhost+1.key", "key": "/public/ssl/localhost+1.key",
...@@ -103,7 +103,9 @@ ...@@ -103,7 +103,9 @@
"host": "localhost", "host": "localhost",
"port": 7071, "port": 7071,
"cors": { "cors": {
"origin": "*" "origin": false,
"allowMethods": "GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS",
"credentials": true
}, },
"body": { "body": {
"multipart": true, "multipart": true,
......
{ {
"productName": "ee", "productName": "standaloneframe",
"appId": "com.electron.ee", "appId": "com.electron.ee",
"copyright": "© 2023 哆啦好梦 Technology Co., Ltd.", "copyright": "© 2023 哆啦好梦 Technology Co., Ltd.",
"directories": { "directories": {
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"installerHeaderIcon": "build/icons/icon.ico", "installerHeaderIcon": "build/icons/icon.ico",
"createDesktopShortcut": true, "createDesktopShortcut": true,
"createStartMenuShortcut": true, "createStartMenuShortcut": true,
"shortcutName": "EE框架" "shortcutName": "制作器-单机版"
}, },
"mac": { "mac": {
"icon": "build/icons/icon.icns", "icon": "build/icons/icon.icns",
......
'use strict'; "use strict";
const path = require('path'); const path = require("path");
/** /**
* 默认配置 * 默认配置
*/ */
module.exports = (appInfo) => { module.exports = (appInfo) => {
const config = {}; const config = {};
/** /**
* 应用模式配置 * 应用模式配置
*/ */
config.developmentMode = { config.developmentMode = {
default: 'react', default: "react",
mode: { mode: {
vue: { vue: {
hostname: 'localhost', hostname: "localhost",
port: 4399 port: 4399,
}, },
react: { react: {
hostname: 'localhost', hostname: "localhost",
port: 8000 port: 8000,
}, },
html: { html: {
hostname: 'localhost', hostname: "localhost",
indexPage: 'index.html' indexPage: "index.html",
},
}, },
}
}; };
/** /**
...@@ -38,13 +37,13 @@ module.exports = (appInfo) => { ...@@ -38,13 +37,13 @@ module.exports = (appInfo) => {
/** /**
* 应用程序顶部菜单 * 应用程序顶部菜单
*/ */
config.openAppMenu = 'dev-show'; config.openAppMenu = "dev-show";
/** /**
* 主窗口 * 主窗口
*/ */
config.windowsOption = { config.windowsOption = {
title: 'EE框架', title: "EE框架",
width: 980, width: 980,
height: 650, height: 650,
minWidth: 800, minWidth: 800,
...@@ -57,30 +56,30 @@ module.exports = (appInfo) => { ...@@ -57,30 +56,30 @@ module.exports = (appInfo) => {
}, },
frame: true, frame: true,
show: false, show: false,
icon: path.join(appInfo.home, 'public', 'images', 'logo-32.png'), icon: path.join(appInfo.home, "public", "images", "logo-32.png"),
}; };
/** /**
* ee框架日志 * ee框架日志
*/ */
config.logger = { config.logger = {
encoding: 'utf8', encoding: "utf8",
level: 'INFO', level: "INFO",
outputJSON: false, outputJSON: false,
buffer: true, buffer: true,
enablePerformanceTimer: false, enablePerformanceTimer: false,
rotator: 'day', rotator: "day",
appLogName: 'ee.log', appLogName: "ee.log",
coreLogName: 'ee-core.log', coreLogName: "ee-core.log",
errorLogName: 'ee-error.log' errorLogName: "ee-error.log",
} };
/** /**
* 远程模式-web地址 * 远程模式-web地址
*/ */
config.remoteUrl = { config.remoteUrl = {
enable: false, enable: false,
url: 'http://electron-egg.kaka996.com/' url: "http://electron-egg.kaka996.com/",
}; };
/** /**
...@@ -97,7 +96,7 @@ module.exports = (appInfo) => { ...@@ -97,7 +96,7 @@ module.exports = (appInfo) => {
transports: ["polling", "websocket"], transports: ["polling", "websocket"],
cors: { cors: {
origin: true, origin: true,
} },
}; };
/** /**
...@@ -107,34 +106,34 @@ module.exports = (appInfo) => { ...@@ -107,34 +106,34 @@ module.exports = (appInfo) => {
enable: true, enable: true,
https: { https: {
enable: false, enable: false,
key: '/public/ssl/localhost+1.key', key: "/public/ssl/localhost+1.key",
cert: '/public/ssl/localhost+1.pem' cert: "/public/ssl/localhost+1.pem",
}, },
port: 7071, port: 7071,
cors: { cors: {
origin: "*" origin: false,
allowMethods: "GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS",
credentials: true,
}, },
body: { body: {
multipart: true, multipart: true,
formidable: { formidable: {
keepExtensions: true keepExtensions: true,
} },
}, },
filterRequest: { filterRequest: {
uris: [ uris: ["favicon.ico"],
'favicon.ico' returnData: "",
], },
returnData: ''
}
}; };
/** /**
* 主进程 * 主进程
*/ */
config.mainServer = { config.mainServer = {
protocol: 'http://', protocol: "http://",
indexPath: '/public/dist/index.html', indexPath: "/public/dist/index.html",
host: 'localhost', host: "localhost",
port: 7072, port: 7072,
}; };
...@@ -142,7 +141,7 @@ module.exports = (appInfo) => { ...@@ -142,7 +141,7 @@ module.exports = (appInfo) => {
* 硬件加速 * 硬件加速
*/ */
config.hardGpu = { config.hardGpu = {
enable: false enable: false,
}; };
/** /**
...@@ -163,16 +162,16 @@ module.exports = (appInfo) => { ...@@ -163,16 +162,16 @@ module.exports = (appInfo) => {
}, },
tray: { tray: {
enable: true, enable: true,
title: 'EE程序', title: "EE程序",
icon: '/public/images/tray_logo.png' icon: "/public/images/tray_logo.png",
}, },
security: { security: {
enable: true, enable: true,
}, },
awaken: { awaken: {
enable: true, enable: true,
protocol: 'ee', protocol: "ee",
args: [] args: [],
}, },
autoUpdater: { autoUpdater: {
enable: true, enable: true,
...@@ -180,21 +179,21 @@ module.exports = (appInfo) => { ...@@ -180,21 +179,21 @@ module.exports = (appInfo) => {
macOS: false, macOS: false,
linux: false, linux: false,
options: { options: {
provider: 'generic', provider: "generic",
url: 'http://kodo.qiniu.com/' url: "http://kodo.qiniu.com/",
}, },
force: false, force: false,
}, },
javaServer: { javaServer: {
enable: false, enable: false,
port: 18080, port: 18080,
jreVersion: 'jre1.8.0_201', jreVersion: "jre1.8.0_201",
opt: '-server -Xms512M -Xmx512M -Xss512k -Dspring.profiles.active=prod -Dserver.port=${port} -Dlogging.file.path="${path}" ', opt: '-server -Xms512M -Xmx512M -Xss512k -Dspring.profiles.active=prod -Dserver.port=${port} -Dlogging.file.path="${path}" ',
name: 'java-app.jar' name: "java-app.jar",
} },
}; };
return { return {
...config ...config,
}; };
} };
...@@ -3,18 +3,14 @@ ...@@ -3,18 +3,14 @@
* @param type - confusion | bytecode | strict * @param type - confusion | bytecode | strict
*/ */
module.exports = { module.exports = {
type: 'confusion', type: "bytecode",
directory: ["electron"],
files: [ files: [
'electron/**/*.(js|json)', "electron/**/*.(js|json)",
'!electron/config/encrypt.js', "!electron/config/encrypt.js",
'!electron/config/nodemon.json', "!electron/config/nodemon.json",
'!electron/config/builder.json', "!electron/config/builder.json",
], ],
fileExt: ['.js'], fileExt: [".js"],
confusionOptions: { confusionOptions: {},
compact: true,
stringArray: true,
stringArrayEncoding: ['none'],
deadCodeInjection: false,
}
}; };
'use strict'; "use strict";
const { Controller } = require('ee-core'); const { Controller } = require("ee-core");
const Log = require('ee-core/log'); const Log = require("ee-core/log");
const Services = require('ee-core/services'); const Services = require("ee-core/services");
const db = require("../model/index");
/** /**
* example * example
* @class * @class
*/ */
class ExampleController extends Controller { class ExampleController extends Controller {
constructor(ctx) { constructor(ctx) {
super(ctx); super(ctx);
} }
/** /**
* 所有方法接收两个参数 * 所有方法接收两个参数
* @param args 前端传的参数 * @param args 前端传的参数
...@@ -24,13 +23,21 @@ class ExampleController extends Controller { ...@@ -24,13 +23,21 @@ class ExampleController extends Controller {
/** /**
* test * test
*/ */
async test () { async test() {
const result = await Services.get('example').test('electron'); const result = await Services.get("example").test("electron");
Log.info('service result:', result); // Log.info("service result:", result, db );
return 'hello electron-egg'; let res = await db?.User.create({
username: "丁大炮",
email: "1148547900@qq.com",
});
return {
code: 0,
data: res,
};
} }
} }
ExampleController.toString = () => '[class ExampleController]'; ExampleController.toString = () => "[class ExampleController]";
module.exports = ExampleController; module.exports = ExampleController;
{
"development": {
"dialect": "sqlite",
"storage": "./data/database.sqlite"
},
"test": {
"dialect": "sqlite",
"storage": "database.sqlite"
},
"production": {
"dialect": "sqlite",
"storage": "database.sqlite"
}
}
\ No newline at end of file
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('Users', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
username: {
type: Sequelize.STRING
},
email: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('Users');
}
};
\ No newline at end of file
'use strict'; "use strict";
const fs = require("fs");
const fs = require('fs'); const path = require("path");
const path = require('path'); const Sequelize = require("sequelize");
const Sequelize = require('sequelize'); const process = require("process");
const process = require('process'); const basename = "index.js";
const basename = path.basename(__filename); const env = process.env.NODE_ENV || "development";
const env = process.env.NODE_ENV || 'development'; const config = require("../database/config.json")[env];
const config = require(__dirname + '/../../data/config.json')[env];
const db = {}; const db = {};
let sequelize; let sequelize;
if (config.use_env_variable) { if (config.use_env_variable) {
sequelize = new Sequelize(process.env[config.use_env_variable], config); sequelize = new Sequelize(process.env[config.use_env_variable], config);
} else { } else {
sequelize = new Sequelize(config.database, config.username, config.password, config); sequelize = new Sequelize(
config.database,
config.username,
config.password,
config
);
} }
fs fs.readdirSync(__dirname)
.readdirSync(__dirname) .filter((file) => {
.filter(file => {
return ( return (
file.indexOf('.') !== 0 && file.indexOf(".") !== 0 &&
file !== basename && file !== basename &&
file.slice(-3) === '.js' && file.slice(-3) === ".js" &&
file.indexOf('.test.js') === -1 file.indexOf(".test.js") === -1
); );
}) })
.forEach(file => { .forEach((file) => {
const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes); const model = require(path.join(__dirname, file))(
sequelize,
Sequelize.DataTypes
);
db[model.name] = model; db[model.name] = model;
}); });
Object.keys(db).forEach(modelName => { Object.keys(db).forEach((modelName) => {
if (db[modelName].associate) { if (db[modelName].associate) {
db[modelName].associate(db); db[modelName].associate(db);
} }
......
export default { export default {
dev:{ dev:{
"REACT_APP_URL":"http://118.89.86.27:7001" //"http://118.89.86.27:7001" "REACT_APP_URL":"http://localhost:7071" //"http://118.89.86.27:7001"
}, },
test:{ test:{
"REACT_APP_URL":"http://localhost:7001" "REACT_APP_URL":"http://localhost:7001"
}, },
prod:{ prod:{
"REACT_APP_URL":"http://118.89.86.27:7001" "REACT_APP_URL":"http://localhost:7071"
} }
} }
// @ts-nocheck // @ts-nocheck
// This file is generated by Umi automatically // This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import type { IRuntimeConfig as Plugin0 } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-antd/runtimeConfig.d' import type { IRuntimeConfig as Plugin0 } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-antd/runtimeConfig.d'
import type { IRuntimeConfig as Plugin1 } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-initialState/runtimeConfig.d' import type { IRuntimeConfig as Plugin1 } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-initialState/runtimeConfig.d'
interface IDefaultRuntimeConfig { interface IDefaultRuntimeConfig {
onRouteChange?: (props: { routes: any, clientRoutes: any, location: any, action: any, isFirst: boolean }) => void; onRouteChange?: (props: { routes: any, clientRoutes: any, location: any, action: any, isFirst: boolean }) => void;
patchRoutes?: (props: { routes: any }) => void; patchRoutes?: (props: { routes: any }) => void;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// This file is generated by Umi automatically // This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import React from 'react'; import React from 'react';
import { HelmetProvider } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/@umijs/renderer-react'; import { HelmetProvider } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/@umijs/renderer-react';
import { context } from './helmetContext'; import { context } from './helmetContext';
export const innerProvider = (container) => { export const innerProvider = (container) => {
......
// @ts-nocheck // @ts-nocheck
// This file is generated by Umi automatically // This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import { createHashHistory, createMemoryHistory, createBrowserHistory } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/@umijs/renderer-react'; import { createHashHistory, createMemoryHistory, createBrowserHistory } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/@umijs/renderer-react';
import type { UmiHistory } from './historyIntelli'; import type { UmiHistory } from './historyIntelli';
let history: UmiHistory; let history: UmiHistory;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// This file is generated by Umi automatically // This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import { getRoutes } from './route' import { getRoutes } from './route'
import type { History } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/@umijs/renderer-react' import type { History } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/@umijs/renderer-react'
type Routes = Awaited<ReturnType<typeof getRoutes>>['routes'] type Routes = Awaited<ReturnType<typeof getRoutes>>['routes']
type AllRoute = Routes[keyof Routes] type AllRoute = Routes[keyof Routes]
......
// @ts-nocheck // @ts-nocheck
// This file is generated by Umi automatically // This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import * as Plugin_0 from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/app.jsx'; import * as Plugin_0 from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/app.jsx';
import * as Plugin_1 from '@@/core/helmet.ts'; import * as Plugin_1 from '@@/core/helmet.ts';
import * as Plugin_2 from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-initialState/runtime.tsx'; import * as Plugin_2 from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-initialState/runtime.tsx';
import * as Plugin_3 from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-model/runtime.tsx'; import * as Plugin_3 from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-model/runtime.tsx';
import { PluginManager } from 'umi'; import { PluginManager } from 'umi';
function __defaultExport (obj) { function __defaultExport (obj) {
...@@ -17,7 +17,7 @@ export function getPlugins() { ...@@ -17,7 +17,7 @@ export function getPlugins() {
return [ return [
{ {
apply: __defaultExport(Plugin_0), apply: __defaultExport(Plugin_0),
path: process.env.NODE_ENV === 'production' ? void 0 : '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/app.jsx', path: process.env.NODE_ENV === 'production' ? void 0 : '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/app.jsx',
}, },
{ {
apply: Plugin_1, apply: Plugin_1,
...@@ -25,11 +25,11 @@ export function getPlugins() { ...@@ -25,11 +25,11 @@ export function getPlugins() {
}, },
{ {
apply: Plugin_2, apply: Plugin_2,
path: process.env.NODE_ENV === 'production' ? void 0 : '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-initialState/runtime.tsx', path: process.env.NODE_ENV === 'production' ? void 0 : '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-initialState/runtime.tsx',
}, },
{ {
apply: Plugin_3, apply: Plugin_3,
path: process.env.NODE_ENV === 'production' ? void 0 : '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-model/runtime.tsx', path: process.env.NODE_ENV === 'production' ? void 0 : '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-model/runtime.tsx',
}, },
]; ];
} }
......
...@@ -16,7 +16,7 @@ export async function getRoutes() { ...@@ -16,7 +16,7 @@ export async function getRoutes() {
'6': React.lazy(() => import(/* webpackChunkName: "p__port__index" */'@/pages/port/index.jsx')), '6': React.lazy(() => import(/* webpackChunkName: "p__port__index" */'@/pages/port/index.jsx')),
'7': React.lazy(() => import(/* webpackChunkName: "p__report__index" */'@/pages/report/index.jsx')), '7': React.lazy(() => import(/* webpackChunkName: "p__report__index" */'@/pages/report/index.jsx')),
'8': React.lazy(() => import(/* webpackChunkName: "p__mycenter__index" */'@/pages/mycenter/index.jsx')), '8': React.lazy(() => import(/* webpackChunkName: "p__mycenter__index" */'@/pages/mycenter/index.jsx')),
'@@/global-layout': React.lazy(() => import(/* webpackChunkName: "layouts__index" */'/Users/wuhao/Desktop/demos/electron-egg/frontend/src/layouts/index.jsx')), '@@/global-layout': React.lazy(() => import(/* webpackChunkName: "layouts__index" */'/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/layouts/index.jsx')),
}, },
}; };
} }
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
export { defineApp } from './core/defineApp' export { defineApp } from './core/defineApp'
export type { RuntimeConfig } from './core/defineApp' export type { RuntimeConfig } from './core/defineApp'
// @umijs/renderer-* // @umijs/renderer-*
export { createBrowserHistory, createHashHistory, createMemoryHistory, Helmet, HelmetProvider, createSearchParams, generatePath, matchPath, matchRoutes, Navigate, NavLink, Outlet, resolvePath, useLocation, useMatch, useNavigate, useOutlet, useOutletContext, useParams, useResolvedPath, useRoutes, useSearchParams, useAppData, useClientLoaderData, useRouteProps, useSelectedRoutes, useServerLoaderData, renderClient, __getRoot, Link, useRouteData, __useFetcher, withRouter } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/@umijs/renderer-react'; export { createBrowserHistory, createHashHistory, createMemoryHistory, Helmet, HelmetProvider, createSearchParams, generatePath, matchPath, matchRoutes, Navigate, NavLink, Outlet, resolvePath, useLocation, useMatch, useNavigate, useOutlet, useOutletContext, useParams, useResolvedPath, useRoutes, useSearchParams, useAppData, useClientLoaderData, useRouteProps, useSelectedRoutes, useServerLoaderData, renderClient, __getRoot, Link, useRouteData, __useFetcher, withRouter } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/@umijs/renderer-react';
export type { History } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/@umijs/renderer-react' export type { History } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/@umijs/renderer-react'
// umi/client/client/plugin // umi/client/client/plugin
export { ApplyPluginsType, PluginManager } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/umi/client/client/plugin.js'; export { ApplyPluginsType, PluginManager } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/umi/client/client/plugin.js';
export { history, createHistory } from './core/history'; export { history, createHistory } from './core/history';
export { terminal } from './core/terminal'; export { terminal } from './core/terminal';
// plugins // plugins
export { Provider, useModel } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-model'; export { Provider, useModel } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-model';
// plugins types.d.ts // plugins types.d.ts
export * from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-antd/types.d'; export * from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-antd/types.d';
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
// @ts-ignore // @ts-ignore
import type { models as rawModels } from '@@/plugin-model/model'; import type { models as rawModels } from '@@/plugin-model/model';
import isEqual from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/fast-deep-equal/index.js'; import isEqual from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/fast-deep-equal/index.js';
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react'; import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
type Models = typeof rawModels; type Models = typeof rawModels;
......
// @ts-nocheck // @ts-nocheck
// This file is generated by Umi automatically // This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import model_1 from '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/.umi-production/plugin-initialState/@@initialState'; import model_1 from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/.umi-production/plugin-initialState/@@initialState';
export const models = { export const models = {
model_1: { namespace: '@@initialState', model: model_1 }, model_1: { namespace: '@@initialState', model: model_1 },
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { ApplyPluginsType } from 'umi'; import { ApplyPluginsType } from 'umi';
import { renderClient, RenderClientOpts } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/@umijs/renderer-react'; import { renderClient, RenderClientOpts } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/@umijs/renderer-react';
import { createHistory } from './core/history'; import { createHistory } from './core/history';
import { createPluginManager } from './core/plugin'; import { createPluginManager } from './core/plugin';
import { getRoutes } from './core/route'; import { getRoutes } from './core/route';
import type { Location } from 'history'; import type { Location } from 'history';
import '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/global.less'; import '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/global.less';
import 'antd/dist/reset.css'; import 'antd/dist/reset.css';
const publicPath = '/'; const publicPath = '/';
const runtimePublicPath = false; const runtimePublicPath = false;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
"src/.umi/*" "src/.umi/*"
], ],
"umi": [ "umi": [
"/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/umi" "/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/umi"
], ],
"umi/typings": [ "umi/typings": [
"src/.umi/typings" "src/.umi/typings"
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// This file is generated by Umi automatically // This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY! // DO NOT CHANGE IT MANUALLY!
import './core/polyfill'; import './core/polyfill';
import '/Users/wuhao/Desktop/demos/electron-egg/frontend/src/global.less'; import '/Users/wuhao/Desktop/demos/standaloneframe/frontend/src/global.less';
import 'antd/dist/reset.css'; import 'antd/dist/reset.css';
import { renderClient } from '/Users/wuhao/Desktop/demos/electron-egg/frontend/node_modules/@umijs/renderer-react'; import { renderClient } from '/Users/wuhao/Desktop/demos/standaloneframe/frontend/node_modules/@umijs/renderer-react';
import { getRoutes } from './core/route'; import { getRoutes } from './core/route';
import { createPluginManager } from './core/plugin'; import { createPluginManager } from './core/plugin';
import { createHistory } from './core/history'; import { createHistory } from './core/history';
......
import Footer from "@/components/Footer"; import Footer from "@/components/Footer";
import { doFetch, postFetch } from "@/utils/doFetch"; import { doFetch, postFetch,getFetch } from "@/utils/doFetch";
import { LockOutlined, UserOutlined, RedoOutlined } from "@ant-design/icons"; import { LockOutlined, UserOutlined, RedoOutlined } from "@ant-design/icons";
import { import {
LoginForm, LoginForm,
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
} from "@ant-design/pro-components"; } from "@ant-design/pro-components";
import { history, useModel,useOutletContext } from "umi"; import { history, useModel,useOutletContext } from "umi";
import { Card, Dropdown, message, Tabs, QRCode } from "antd"; import { Card, Dropdown, message, Tabs, QRCode } from "antd";
import { useState } from "react"; import React, { useState, useEffect } from 'react';
import { ipc } from "@/utils/ipcRenderer"; import { ipc } from "@/utils/ipcRenderer";
...@@ -60,6 +60,13 @@ const Login = () => { ...@@ -60,6 +60,13 @@ const Login = () => {
const [loginType, setLoginType] = useState("account"); const [loginType, setLoginType] = useState("account");
useEffect(() => {
getFetch({url:"/controller/example/test",params:{}})
}, []);
return ( return (
<div <div
className="noline" className="noline"
......
{ {
"name": "ee", "name": "standaloneframe",
"version": "3.4.0", "version": "3.4.0",
"description": "A fast, desktop software development framework", "description": "A fast, desktop software development framework",
"main": "main.js", "main": "main.js",
......
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