liang_acp_0
v1.0.0
Published
//创建config.js文件,用于初始项目构建 const acp = require('lzz_acp_1');
Downloads
5
Readme
//创建config.js文件,用于初始项目构建 const acp = require('lzz_acp_1');
const fileObj = { src: { public: { image: {}, video: { a_html: 0 }, audio: {} }, component: { head: { head_html: 0, head_css: 0, head_js: 0 }, home: { home_html: 0, home_css: 0, home_js: 0 } }, index_html: 0, index_css: 0, index_js: 0, lib_js: 1 } }; acp.init(fileObj);
//创建index.js文件应用模板,用于项目搭建 import { routerFun,initFun,proxyFun,getProxy } from './lib.js'; /****** import { head, bind_head } from './component/head/head.js'; import { home, bind_home } from './component/home/home.js'; import { anime, bind_anime } from './component/anime/anime.js'; import { comic, bind_comic} from './component/comic/comic.js'; import { game, bind_game } from './component/game/game.js'; import { novel, bind_novel } from './component/novel/novel.js'; ******/
window.onload = function() { /****** //创建初始化对象 const initObj = { '.index-header': ['head', head], '.index-mainer': ['home', home] } //创建路由对象 const routerObj = { '.home_link': { 'home': ['.index-mainer', home, bind_home] }, '.anime_link': { 'anime': ['.index-mainer', anime, bind_anime] }, '.comic_link': { 'comic': ['.index-mainer', comic, bind_comic] }, '.novel_link': { 'novel': ['.index-mainer', novel, bind_novel] }, '.game_link': { 'game': ['.index-mainer', game, bind_game] } } //创建响应数据对象 const dataObj = { a: '123', b: '456', c: '789' }
//配置初始页面
initFun(initObj).then(function() {
//配置路由页面
routerFun(routerObj);
}).then(function() {
proxyFun(dataObj).then(function() {
bind_head();
bind_home();
});
});
******/} export {
}
