30
									
								
								packages/core/public/editor/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								packages/core/public/editor/index.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="zh">
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
	<meta charset="UTF-8">
 | 
			
		||||
	<title>编辑器</title>
 | 
			
		||||
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | 
			
		||||
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 | 
			
		||||
	<meta http-equiv="X-UA-Compatible" content="IE=Edge">
 | 
			
		||||
	<link rel="stylesheet" href="https://houtai.baidu.com/v2/csssdk">
 | 
			
		||||
	<style>
 | 
			
		||||
		html,
 | 
			
		||||
		body,
 | 
			
		||||
		.app-wrapper {
 | 
			
		||||
			position: relative;
 | 
			
		||||
			width: 100%;
 | 
			
		||||
			height: 100%;
 | 
			
		||||
			margin: 0;
 | 
			
		||||
			padding: 0;
 | 
			
		||||
		}
 | 
			
		||||
	</style>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
	<div id="root" class="app-wrapper"></div>
 | 
			
		||||
	<script src="https://houtai.baidu.com/v2/jssdk"></script>
 | 
			
		||||
	<script src="index.js"></script>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										51
									
								
								packages/core/public/editor/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								packages/core/public/editor/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
(async function() {
 | 
			
		||||
    var amis = amisRequire('amis/embed');
 | 
			
		||||
    amis.embed('#root', {
 | 
			
		||||
        definitions: {
 | 
			
		||||
            "editor-page": {
 | 
			
		||||
                "position": "right",
 | 
			
		||||
                "resizable": true,
 | 
			
		||||
                "title": `<% if (data.name) { print('页面 '+data.name+' 详情') } else { print ('新增页面') } %>`,
 | 
			
		||||
                "size": "lg",
 | 
			
		||||
                "body": {
 | 
			
		||||
                    "type": "form",
 | 
			
		||||
                    "submitText": '',
 | 
			
		||||
                    "title": "",
 | 
			
		||||
                    "controls": [
 | 
			
		||||
                        {
 | 
			
		||||
                            "name": "name",
 | 
			
		||||
                            "type": "text",
 | 
			
		||||
                        },
 | 
			
		||||
                        {
 | 
			
		||||
                            "name": "content",
 | 
			
		||||
                            "type": "editor",
 | 
			
		||||
                            "language": "json",
 | 
			
		||||
                            "editorTheme": "vs-dark",
 | 
			
		||||
                            "height": "800",
 | 
			
		||||
                            "label": false
 | 
			
		||||
                        },
 | 
			
		||||
                        {
 | 
			
		||||
                            "type": "button",
 | 
			
		||||
                            "label": "保存",
 | 
			
		||||
                            "actionType": "ajax",
 | 
			
		||||
                            "api": {
 | 
			
		||||
                                "url": "/page/manager/${_id}",
 | 
			
		||||
                                "data": {
 | 
			
		||||
                                    "name": "${name}",
 | 
			
		||||
                                    "content": "${content}"
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    ]
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        type: 'page',
 | 
			
		||||
        title: '页面管理',
 | 
			
		||||
        body: {
 | 
			
		||||
            name: "editor",
 | 
			
		||||
            type: "service",
 | 
			
		||||
            schemaApi: "get:/page/manager/editor"
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
})();
 | 
			
		||||
							
								
								
									
										28
									
								
								packages/core/public/event/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								packages/core/public/event/index.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<html>
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/socket.io-client@2.2.0/dist/socket.io.js"> </script>
 | 
			
		||||
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/xterm.css" />
 | 
			
		||||
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/fullscreen/fullscreen.css">
 | 
			
		||||
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/xterm.js"></script>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/fit/fit.js"></script>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/attach/attach.js"></script>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/fullscreen/fullscreen.js"></script>
 | 
			
		||||
	<style>
 | 
			
		||||
		#terminal-container .terminal.xterm {
 | 
			
		||||
			height: 100%;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		#terminal-container .xterm-viewport {
 | 
			
		||||
			height: 100% !important;
 | 
			
		||||
		}
 | 
			
		||||
	</style>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
	<div id="terminal" style="height: 100%;"></div>
 | 
			
		||||
	<script type="text/javascript" src="js/index.js"></script>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
@@ -1,28 +1,30 @@
 | 
			
		||||
<html>
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="zh">
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/socket.io-client@2.2.0/dist/socket.io.js"> </script>
 | 
			
		||||
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/xterm.css" />
 | 
			
		||||
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/fullscreen/fullscreen.css">
 | 
			
		||||
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/xterm.js"></script>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/fit/fit.js"></script>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/attach/attach.js"></script>
 | 
			
		||||
	<script src="https://cdn.jsdelivr.net/npm/xterm@3.12.2/dist/addons/fullscreen/fullscreen.js"></script>
 | 
			
		||||
	<meta charset="UTF-8">
 | 
			
		||||
	<title>四喜服务部署平台</title>
 | 
			
		||||
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | 
			
		||||
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 | 
			
		||||
	<meta http-equiv="X-UA-Compatible" content="IE=Edge">
 | 
			
		||||
	<link rel="stylesheet" href="https://houtai.baidu.com/v2/csssdk">
 | 
			
		||||
	<style>
 | 
			
		||||
		#terminal-container .terminal.xterm {
 | 
			
		||||
		html,
 | 
			
		||||
		body,
 | 
			
		||||
		.app-wrapper {
 | 
			
		||||
			position: relative;
 | 
			
		||||
			width: 100%;
 | 
			
		||||
			height: 100%;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		#terminal-container .xterm-viewport {
 | 
			
		||||
			height: 100% !important;
 | 
			
		||||
			margin: 0;
 | 
			
		||||
			padding: 0;
 | 
			
		||||
		}
 | 
			
		||||
	</style>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
	<div id="terminal" style="height: 100%;"></div>
 | 
			
		||||
	<script type="text/javascript" src="js/index.js"></script>
 | 
			
		||||
	<div id="root" class="app-wrapper"></div>
 | 
			
		||||
	<script src="https://houtai.baidu.com/v2/jssdk"></script>
 | 
			
		||||
	<script src="index.js"></script>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										8
									
								
								packages/core/public/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								packages/core/public/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
(async function() {
 | 
			
		||||
    var amis = amisRequire('amis/embed');
 | 
			
		||||
    let page = window.location.hash.substring(1);
 | 
			
		||||
    amis.embed('#root', {
 | 
			
		||||
        type: "service",
 | 
			
		||||
        schemaApi: "get:/page/manager/" + page
 | 
			
		||||
    });
 | 
			
		||||
})();
 | 
			
		||||
		Reference in New Issue
	
	Block a user