H5-DooringH5H5react nodejs
H5-Dooring is a powerful, open source, free H5 visual page configuration solution dedicated to providing a simple, convenient, professional and reliable, unlimited set of H5 landing page best practices. The technology stack is mainly react, developed in the background using nodejs.
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Give a if this project helped you!
dooring, js-sdk, API. :
js-sdk, script, :
<script src="http://49.234.61.19/dooring-sdk.js"></script>
script, :
(function(){var b=document.createElement("iframe");var d=Date.now();var a="http://49.234.61.19";b.src=a+"/h5_plus/editor?tid="+d+"&"+c(dooringOpts)+"&isOpen=1";console.log(c(dooringOpts));b.style.border="none";b.style.width="100vw";b.style.height="100vh";if(dooringOpts&&dooringOpts.iframeStyle){b.style.border=dooringOpts.iframeStyle.border||"none";b.style.width=dooringOpts.iframeStyle.width||"100vw";b.style.height=dooringOpts.iframeStyle.height||"100vh"}document.querySelector(dooringOpts.container||"body").appendChild(b);function c(g){var e=Object.assign({gallery:false,template:false,saveTemplate:true,save:true,downCode:true,isPhoneTest:false,helpPage:true,uploadApi:"",formApi:"",screenshotsApi:""},g.controls||{});var h="";for(var f in e){h+=f+"="+encodeURI(e[f])+"&"}return h.slice(0,h.length-1)}})();
:
var dooringOpts = {
container: '', // dom
iframeStyle: { // iframe
width: '',
height: '',
border: ''
},
controls: {
gallery: false, //
template: false, //
saveTemplate: true, // true/false,, ,
save: true, // true/false,, ,
downCode: true, // true/false,, ,
isPhoneTest: false,
helpPage: true, // false/true/
uploadApi: '', // api
formApi: '', // api
screenshotsApi: '' // api
}
};
: , sdk, :
<script>
var dooringOpts = {
}
</script>
<script src="http://49.234.61.19/dooring-sdk.js"></script>
, jsonH5, . :
The preview function is relatively simple, we just need to throw the user-generated jason data into the H5 renderer, here we need to make a rendering page for the preview components separately. Let's take a look at a few previews:
, ,.
: file-saver, . :
var FileSaver = require('file-saver');
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
FileSaver.saveAs(blob, "hello world.txt");
txt, Blob, , html? , .
, , , , PHP, Java, Python****Egg. koa. :
.
git clone https://github.com/MrXujiang/h5-Dooring.git
cd ./h5-Dooring
yarn install
or
cnpm install
| Launch the app locally
yarn start
or
cnpm run start
vscode
Live Server, , vscode
, Live Server, index.html
, /
, bug, :
If you find that the local start-up component drag encountered strange errors, is a bug that should be a third-party component in the development environment, can be resolved in a way:
yarn dev
or
cnpm run dev
http-server.
1.5...
, , ~
beautifulFront