# 新版爱达人官网 **Repository Path**: liudannoone/new_edas_official_website ## Basic Information - **Project Name**: 新版爱达人官网 - **Description**: 爱达人官网egg/node渲染 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-08-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # bcdaren ## 爱达人官网web电脑端 # clone project git clone git_liudan@git.bcdaren.com:/data/repos/web/web.git # install dependencies 1.版本要求4.0以上 2.配置镜像 npm install -g cnpm --registry=https://registry.npm.taobao.org 3.安装依赖 cnpm install # serve with hot reload at localhost:7001 npm run dev # 服务器启动 、、、 npm start npm stop 、、、 # build for production and view the bundle analyzer report npm run build --report # EsLint 1. 配置文件为./.editorconfig 2. websotrm插件安装:file-setting-plugin-EsLint安装后重启 3. 配置:https://www.jianshu.com/p/7933b3b5ad35 # 其他 1. 框架使用为egg 详细文档地址: https://eggjs.org/zh-cn/basics/structure.html 2. 服务端渲染框架为nunjucks 详细文档地址:https://mozilla.github.io/nunjucks/cn/templating.html#include 3. 前端页面主要使用jq,页面数据渲染使用template.js ``` # 文件结构 +-- app 开发中一般只关注这个文件夹 | +-- controller 解析用户的输入,处理后返回相应的结果 | +-- commonRouter.js 静态页面解析呈现(不做服务端渲染的页面) | +-- public 静态资源 | +-- css css文件 | +-- page 里面每一css对应一个或两个静态的页面 | +-- base 公用基础文件 重置 基础样式等等 | +-- *.css 全局公用css文件 | +-- js js文件 | +-- page 里面每一js对应一个或两个静态的页面 | +-- http 所有和请求相关的js文件,每个文件按模块分类(根据需求及对应接口文档模块) | +-- lib jq,template等js问价 | +-- plugin 所有的外部插件 | +-- *.js 公用或基础js文件 | +-- image 图片,临时静态页面所用 | +-- *.html 临时的静态页面 | +-- service 发送服务请求获取数据 | +-- view 页面文件 | +-- router.js 路由配置 注意路由配置名字需要以.html结尾利于SEO +-- config 框架项目配置 +-- logs 日志目录 +-- node_modules 依赖模块 +-- run +-- test 单元测试部分 ```