├── test └── test.js ├── introImg ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── views ├── partials │ ├── common │ │ ├── footer.hbs │ │ ├── header.hbs │ │ └── nav.hbs │ └── about │ │ ├── part_one.hbs │ │ └── part_two.hbs ├── pages │ ├── error │ │ └── error.html │ ├── test.hbs │ ├── details.hbs │ ├── home.hbs │ ├── introduction.hbs │ └── about.hbs └── layouts │ ├── intr.hbs │ └── index.hbs ├── config.js ├── public ├── images │ ├── list │ │ ├── list1.jpg │ │ ├── sh8LIST.jpg │ │ ├── SH10LIST.jpg │ │ ├── sh9LIST2.jpg │ │ ├── shop4LIST.jpg │ │ ├── shop6LIST.jpg │ │ ├── shop7LIST.jpg │ │ ├── shop3-LIST.jpg │ │ └── shop5LIST .jpg │ └── details │ │ ├── list1.jpg │ │ ├── SH10LIST.jpg │ │ ├── SH6zhekou.jpg │ │ ├── SH7zhekou.jpg │ │ ├── sh8LIST.jpg │ │ ├── sh9LIST2.jpg │ │ ├── shop4LIST.jpg │ │ ├── shop6LIST.jpg │ │ ├── shop7LIST.jpg │ │ ├── zhekou1.jpg │ │ ├── SH10ZHEKOU.jpg │ │ ├── shop3-LIST.jpg │ │ └── shop5LIST .jpg ├── css │ ├── css_module │ │ ├── common │ │ │ ├── header.css │ │ │ ├── footer.css │ │ │ └── common.css │ │ ├── home │ │ │ └── home.css │ │ ├── details │ │ │ └── details.css │ │ ├── about │ │ │ └── about.css │ │ ├── test │ │ │ └── test.css │ │ └── introduction │ │ │ └── introduction.css │ ├── sass_module │ │ ├── common │ │ │ ├── header.scss │ │ │ ├── footer.scss │ │ │ └── common.scss │ │ ├── details │ │ │ └── details.scss │ │ ├── about │ │ │ └── about.scss │ │ ├── home │ │ │ └── home.scss │ │ ├── test │ │ │ └── test.scss │ │ └── introduction │ │ │ └── introduction.scss │ └── outerPlugin │ │ └── sweetalert.min.css └── js │ ├── sea_module │ ├── details │ │ └── details.js │ ├── about │ │ └── about.js │ ├── home │ │ └── home.js │ └── introduction │ │ └── introduction.js │ ├── util.js │ └── outerPlugin │ ├── sea.js │ ├── sweetalert.min.js │ └── bootstrap.min.js ├── .idea ├── dictionaries │ ├── jiafan.xml │ └── Tonyjiafan.xml ├── vcs.xml ├── fileColors.xml ├── encodings.xml ├── modules.xml ├── nodeJs.iml ├── misc.xml └── workspace.xml ├── controller ├── test.js ├── introduction.js ├── Dao │ └── database.js ├── details.js ├── util │ ├── cookie.js │ └── secret.js ├── home.js └── about.js ├── package.json ├── app.js ├── gulpfile.js ├── README.md ├── SeaJS模块化.md ├── routes.js └── yoho.sql /test/test.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /introImg/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/introImg/1.png -------------------------------------------------------------------------------- /introImg/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/introImg/2.png -------------------------------------------------------------------------------- /introImg/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/introImg/3.png -------------------------------------------------------------------------------- /introImg/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/introImg/4.png -------------------------------------------------------------------------------- /views/partials/common/footer.hbs: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | // 数据接口定义的文件 2 | 'use strict' 3 | 4 | //cookie用户名字的存储名字 5 | exports.userCookie = 'U' 6 | -------------------------------------------------------------------------------- /views/partials/common/header.hbs: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /public/images/list/list1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/list1.jpg -------------------------------------------------------------------------------- /public/images/list/sh8LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/sh8LIST.jpg -------------------------------------------------------------------------------- /public/images/details/list1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/list1.jpg -------------------------------------------------------------------------------- /public/images/list/SH10LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/SH10LIST.jpg -------------------------------------------------------------------------------- /public/images/list/sh9LIST2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/sh9LIST2.jpg -------------------------------------------------------------------------------- /public/images/list/shop4LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/shop4LIST.jpg -------------------------------------------------------------------------------- /public/images/list/shop6LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/shop6LIST.jpg -------------------------------------------------------------------------------- /public/images/list/shop7LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/shop7LIST.jpg -------------------------------------------------------------------------------- /.idea/dictionaries/jiafan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /public/images/details/SH10LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/SH10LIST.jpg -------------------------------------------------------------------------------- /public/images/details/SH6zhekou.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/SH6zhekou.jpg -------------------------------------------------------------------------------- /public/images/details/SH7zhekou.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/SH7zhekou.jpg -------------------------------------------------------------------------------- /public/images/details/sh8LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/sh8LIST.jpg -------------------------------------------------------------------------------- /public/images/details/sh9LIST2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/sh9LIST2.jpg -------------------------------------------------------------------------------- /public/images/details/shop4LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/shop4LIST.jpg -------------------------------------------------------------------------------- /public/images/details/shop6LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/shop6LIST.jpg -------------------------------------------------------------------------------- /public/images/details/shop7LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/shop7LIST.jpg -------------------------------------------------------------------------------- /public/images/details/zhekou1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/zhekou1.jpg -------------------------------------------------------------------------------- /public/images/list/shop3-LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/shop3-LIST.jpg -------------------------------------------------------------------------------- /public/images/list/shop5LIST .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/list/shop5LIST .jpg -------------------------------------------------------------------------------- /public/images/details/SH10ZHEKOU.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/SH10ZHEKOU.jpg -------------------------------------------------------------------------------- /public/images/details/shop3-LIST.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/shop3-LIST.jpg -------------------------------------------------------------------------------- /public/images/details/shop5LIST .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyjiafan/nodeJs/HEAD/public/images/details/shop5LIST .jpg -------------------------------------------------------------------------------- /.idea/dictionaries/Tonyjiafan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /public/css/css_module/common/header.css: -------------------------------------------------------------------------------- 1 | header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto} 2 | -------------------------------------------------------------------------------- /views/partials/about/part_one.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /public/css/css_module/common/footer.css: -------------------------------------------------------------------------------- 1 | footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c} 2 | -------------------------------------------------------------------------------- /public/css/sass_module/common/header.scss: -------------------------------------------------------------------------------- 1 | header{ 2 | width: 100%; 3 | border-bottom: 4px solid #005f3c; 4 | } 5 | .nav-warp{ 6 | width: 1000px; 7 | margin: 0 auto; 8 | } 9 | -------------------------------------------------------------------------------- /views/partials/about/part_two.hbs: -------------------------------------------------------------------------------- 1 |
2 |
Item 1
3 |
Item 2
4 |
Item 3
5 |
6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/fileColors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/css/sass_module/common/footer.scss: -------------------------------------------------------------------------------- 1 | footer{ 2 | width: 100%; 3 | height: 80px; 4 | border-top: 5px solid #005f3c; 5 | } 6 | .footer{ 7 | width: 1000px; 8 | margin: 0 auto; 9 | border-bottom: 4px solid #005f3c; 10 | } 11 | -------------------------------------------------------------------------------- /public/js/sea_module/details/details.js: -------------------------------------------------------------------------------- 1 | define(function(require,exports,module){ 2 | //引入模块 3 | var $ = require('../../outerPlugin/jquery.min'), 4 | util = require('../../util'), 5 | reqAjax = util.reqAjax; 6 | 7 | 8 | }) 9 | -------------------------------------------------------------------------------- /views/pages/error/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 错误! 6 | 7 | 8 |

Err Page

9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /controller/test.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // const config = require('../config'); //接口文件 3 | 4 | 5 | //渲染About 页面 6 | exports.renderTestPage = (req,res)=>{ 7 | res.render('pages/test',{ 8 | layout:'index', 9 | title:'test', 10 | seaModule:'/static/js/sea_module/test/test.js' , //没有使用模块化必须要配置完整的路劲和文件名 11 | cssModule:'/static/css/css_module/test/test.css' //没有使用模块化必须要配置完整的路劲和文件名 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /views/pages/test.hbs: -------------------------------------------------------------------------------- 1 |

SS-only shadow-scrolling effect

2 | 3 |
4 | 21 |
22 | -------------------------------------------------------------------------------- /public/css/sass_module/details/details.scss: -------------------------------------------------------------------------------- 1 | /* 引入sass模块 */ 2 | @import "../common/common.scss"; 3 | @import "../home/home.scss"; 4 | /*---------------------------------------------------------------------- 5 | 商品详情页面的样式 6 | -----------------------------------------------------------------------*/ 7 | .p-price{ 8 | padding: 20px 0; 9 | color: #fc5144; 10 | font-size: 40px; 11 | font-weight: 700; 12 | } 13 | ul li{ 14 | list-style: none; 15 | margin: 30px 0; 16 | } 17 | -------------------------------------------------------------------------------- /controller/introduction.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // const config = require('../config'); //接口文件 3 | const database = require('./Dao/database'); //数据库模块 4 | 5 | //渲染 我的介绍 6 | exports.introductionPage = (req,res)=>{ 7 | res.render('pages/introduction',{ 8 | layout:'intr', 9 | title:'DetailsPage', 10 | data:'', 11 | seaModule:'/static/js/sea_module/introduction/introduction.js', 12 | cssModule:'/static/css/css_module/introduction/introduction.css' 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /.idea/nodeJs.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /views/pages/details.hbs: -------------------------------------------------------------------------------- 1 |

{{title}}

2 | 17 | -------------------------------------------------------------------------------- /views/partials/common/nav.hbs: -------------------------------------------------------------------------------- 1 | 2 | 19 | -------------------------------------------------------------------------------- /public/css/css_module/common/common.css: -------------------------------------------------------------------------------- 1 | header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px} 2 | -------------------------------------------------------------------------------- /controller/Dao/database.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var mysql = require("mysql"); 4 | 5 | //连接本地数据库 6 | function getConn(){ 7 | return mysql.createConnection({ 8 | host:"localhost", 9 | port:"3306", 10 | user:"root", 11 | password:"111111", //你的mysql root密码 12 | database:"yohobuy" //你的额数据库名称 13 | }) 14 | } 15 | //查询mysql数据库的方法 16 | exports.query = function (sql,params,callback) { 17 | var conn = getConn(); 18 | conn.query(sql,params, function (err,data) { 19 | if(err){ 20 | console.log(err); 21 | }else{ 22 | callback(data); 23 | } 24 | }); 25 | conn.end(); 26 | }; 27 | -------------------------------------------------------------------------------- /views/pages/home.hbs: -------------------------------------------------------------------------------- 1 |

{{infoData.title}}

2 |
3 |

4 | {{infoData.info}} 5 |
6 | 7 |

8 |
9 |

10 | 复制此账号: 13333333333 11 |

12 |

13 |

输入正确的用户名会把对应的密码显示到下面的输入框内

14 |
15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /controller/details.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // const config = require('../config'); //接口文件 3 | const database = require('./Dao/database'); //数据库模块 4 | 5 | //渲染 商品详情页面 6 | exports.renderDetailsPage = (req,res)=>{ 7 | let param = {}; 8 | param.p_id = Number(req.query.p_id) 9 | database.query("select * from t_product where p_id=?",[param.p_id],function (data) { 10 | let detailsData = data[0]; 11 | res.render('pages/details',{ 12 | layout:'index', 13 | title:'DetailsPage', 14 | data:detailsData, 15 | seaModule:'/static/js/sea_module/details/details.js', //没有使用模块化必须要配置完整的路劲和文件名 16 | cssModule:'/static/css/css_module/details/details.css' //没有使用模块化必须要配置完整的路劲和文件名 17 | }) 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /public/css/sass_module/common/common.scss: -------------------------------------------------------------------------------- 1 | /* 引入sass模块 */ 2 | @import "./header.scss"; 3 | @import "./footer.scss"; 4 | /*---------------------------------------------------------------------- 5 | 公共的scss 6 | -----------------------------------------------------------------------*/ 7 | body{ 8 | margin: 0; 9 | padding: 0; 10 | } 11 | h1,h2,h3,h4,h5,h6,ul{ 12 | margin: 0; 13 | padding: 0; 14 | text-align:center; 15 | } 16 | .clear{ 17 | clear: both; 18 | } 19 | .content-warp{ 20 | outline:1px solid #999; 21 | margin: 10px auto; 22 | width: 1000px; 23 | height: auto; 24 | padding: 20px 0; 25 | background: white; 26 | } 27 | .main-a{ 28 | display: inline-block; 29 | background: #ff4000; 30 | border: 1px solid #fc7144; 31 | border-radius: 3px; 32 | outline: none; 33 | color: white; 34 | margin: 10px 100px; 35 | } 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test_hbs", 3 | "description": "nodeJs hbs Sass gulp seaJs", 4 | "version": "1.0.0", 5 | "main": "app.js", 6 | "scripts": { 7 | "dev": "sudo nodemon app.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [ 11 | "node" 12 | ], 13 | "author": "jqs", 14 | "license": "ISC", 15 | "dependencies": { 16 | "async": "^1.5.0", 17 | "body-parser": "^1.15.1", 18 | "cookie-parser": "^1.4.3", 19 | "express": "^4.13.3", 20 | "express-handlebars": "^3.0.0", 21 | "mysql": "^2.10.0", 22 | "nodemon": "^1.9.2", 23 | "set-cookie": "0.0.4", 24 | "sha1": "^1.1.1" 25 | }, 26 | "devDependencies": { 27 | "gulp": "^3.9.1", 28 | "gulp-plumber": "^1.1.0", 29 | "gulp-sass": "^2.3.1", 30 | "gulp-livereload": "^3.8.1", 31 | "gulp-webserver": "^0.9.1" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /views/layouts/intr.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{title}} 6 | 7 | 8 | 9 | 10 | 11 |
12 | {{{body}}} 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | 30 | -------------------------------------------------------------------------------- /public/css/sass_module/about/about.scss: -------------------------------------------------------------------------------- 1 | /* 引入sass模块 */ 2 | @import "../common/common.scss"; 3 | @import "../home/home.scss"; 4 | /*---------------------------------------------------------------------- 5 | About页面的样式 6 | -----------------------------------------------------------------------*/ 7 | 8 | .about-box{ 9 | padding: 20px 0; 10 | height: auto; 11 | table { 12 | margin-top: 30px; 13 | font-family: verdana,arial,sans-serif; 14 | font-size:11px; 15 | color:#333333; 16 | border-width: 1px; 17 | border-color: #a9c6c9; 18 | border-collapse: collapse; 19 | } 20 | table thead{ 21 | background: #f9f9f9; 22 | } 23 | table tr { 24 | border-width: 1px; 25 | padding: 10px 20px; 26 | border-style: solid; 27 | border-color: rgba(173, 175, 175, 0.52); 28 | border-left: none; 29 | border-right: none; 30 | } 31 | table td { 32 | width: 280px; 33 | height: 50px; 34 | padding-left: 10px; 35 | color:#666; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /views/layouts/index.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{title}} 6 | 7 | 8 | 9 | 10 |
11 | {{>common/header}} 12 |
13 | 14 |
15 | {{{body}}} 16 |
17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 35 | 36 | -------------------------------------------------------------------------------- /public/css/css_module/home/home.css: -------------------------------------------------------------------------------- 1 | header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}.nav-ul{padding:10px 0}.nav-ul li{list-style:none;display:inline-block;vertical-align:middle}.nav-ul li a{display:block;float:left;padding:5px 15px;text-decoration:none;color:#666}.nav-ul li a:hover{background:rgba(0,0,0,0.1);border-radius:3px}p{text-align:center}button{width:150px;height:34px;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 0}.login{margin-top:100px;border:1px solid #fc5144;padding:20px;text-align:center}input{width:200px;height:34px;text-indent:1em;color:blue;border:2px solid #999;border-radius:5px}h3{color:#ff6000;padding:5px} 2 | -------------------------------------------------------------------------------- /public/css/sass_module/home/home.scss: -------------------------------------------------------------------------------- 1 | /* 引入sass模块 */ 2 | @import "../common/common.scss"; 3 | /*---------------------------------------------------------------------- 4 | home页面的样式 5 | -----------------------------------------------------------------------*/ 6 | /* 导航样式 */ 7 | .nav-ul{ 8 | padding: 10px 0; 9 | } 10 | .nav-ul li{ 11 | list-style: none; 12 | display: inline-block; 13 | vertical-align: middle; 14 | } 15 | .nav-ul li a{ 16 | display: block; 17 | float: left; 18 | padding: 5px 15px; 19 | text-decoration: none; 20 | color: #666; 21 | } 22 | .nav-ul li a:hover{ 23 | background: rgba(0,0,0,0.1); 24 | border-radius: 3px; 25 | } 26 | p{ 27 | text-align: center; 28 | } 29 | button{ 30 | width: 150px; 31 | height: 34px; 32 | background: #ff4000; 33 | border: 1px solid #fc7144; 34 | border-radius: 3px; 35 | outline: none; 36 | color: white; 37 | margin: 10px 0; 38 | } 39 | .login{ 40 | margin-top: 100px; 41 | border: 1px solid #fc5144; 42 | padding: 20px; 43 | text-align: center; 44 | } 45 | input{ 46 | width: 200px; 47 | height: 34px; 48 | text-indent: 1em; 49 | color:blue; 50 | border: 2px solid #999; 51 | border-radius: 5px; 52 | } 53 | h3{ 54 | color: #ff6000; 55 | padding: 5px; 56 | } 57 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | /*+++++++++++++++++++++++++++++++++++++++++++++ 2 | + 应用程序的配置的文件 + 3 | +++++++++++++++++++++++++++++++++++++++++++++*/ 4 | 5 | 'use strict' 6 | const express = require('express'), 7 | exphbs = require('express-handlebars'), 8 | bodyParser = require('body-parser'), 9 | cookieParser = require('cookie-parser'), 10 | router = require('./routes'), //配置 路由文件 11 | app = express(); 12 | 13 | //请求主体解析 14 | app.use(bodyParser.json()); 15 | app.use(bodyParser.urlencoded({ extended: false })); 16 | 17 | //cookie解析 18 | app.use(cookieParser()); 19 | 20 | 21 | //使用static中间件 制定public目录为静态资源目录,其中资源不会经过任何处理 22 | app.use('/static',express.static(__dirname + '/public')); 23 | 24 | //集请求Url 配置路由文件的使用 25 | router.setRequestUrl(app); 26 | 27 | //引用express-handlebars模板引擎 28 | app.engine('.hbs',exphbs({ 29 | defaultLayout: 'index', //默认布局模板为mindex.hbs 30 | extname:'.hbs' 31 | }) 32 | ); 33 | app.set('view engine','.hbs'); 34 | 35 | 36 | //异常处理 37 | let handleStatusError = (status) => { 38 | app.use((req,res,next) => { 39 | res.status(status) 40 | res.sendfile('views/pages/error/error.html') 41 | }) 42 | } 43 | handleStatusError(404) 44 | handleStatusError(500) 45 | 46 | 47 | app.listen(5000,function(){ 48 | console.log('服务启动了 =====> http://localhost:5000') 49 | }); 50 | -------------------------------------------------------------------------------- /views/pages/introduction.hbs: -------------------------------------------------------------------------------- 1 |

2 |
3 | 53 | 54 | {{>about/part_two}} 55 |
56 | -------------------------------------------------------------------------------- /public/css/sass_module/test/test.scss: -------------------------------------------------------------------------------- 1 | 2 | /* 引入sass模块 */ 3 | @import "../common/common.scss"; 4 | @import "../home/home.scss"; 5 | /*---------------------------------------------------------------------- 6 | Test页面的样式 7 | -----------------------------------------------------------------------*/ 8 | 9 | .scrollbox { 10 | overflow: auto; 11 | width: 200px; 12 | max-height: 200px; 13 | margin: 50px auto; 14 | position: relative; 15 | 16 | background: 17 | /* Shadow covers */ 18 | linear-gradient(white 30%, rgba(255,255,255,0)), 19 | linear-gradient(rgba(255,255,255,0), white 70%) 0 100%, 20 | 21 | /* Shadows */ 22 | radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)), 23 | radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; 24 | background: 25 | /* Shadow covers */ 26 | linear-gradient(white 30%, rgba(255,255,255,0)), 27 | linear-gradient(rgba(255,255,255,0), white 70%) 0 100%, 28 | 29 | /* Shadows */ 30 | radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)), 31 | radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; 32 | background-repeat: no-repeat; 33 | background-color: white; 34 | background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px; 35 | 36 | /* Opera doesn't support this in the shorthand */ 37 | background-attachment: local, local, scroll, scroll; 38 | } 39 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | DOM issuesJavaScript 12 | 13 | 14 | GeneralJavaScript 15 | 16 | 17 | HTML 18 | 19 | 20 | JavaScript 21 | 22 | 23 | JavaScript validity issuesJavaScript 24 | 25 | 26 | XML 27 | 28 | 29 | 30 | 31 | RequiredAttributes 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var gulp = require('gulp'), 3 | sass = require('gulp-sass'), //sass 4 | plumber = require('gulp-plumber'), //禁止sass报错 5 | livereload = require('gulp-livereload'), // 网页自动刷新(服务器控制客户端同步刷新) 6 | webserver = require('gulp-webserver'); // 本地服务器 gulp-webserver 7 | 8 | // 注册任务 9 | gulp.task('sass', function () { 10 | return gulp.src(['public/css/sass_module/*.scss','public/css/sass_module/**/*.scss']) 11 | .pipe(plumber()) 12 | .pipe(sass({outputStyle:'compressed'}).on('error',sass.logError)) 13 | .pipe(gulp.dest('public/css/css_module')); 14 | }) 15 | 16 | // 注册任务 17 | gulp.task('webserver', function () { 18 | gulp.src('./') // 服务器目录(./代表根目录) 19 | .pipe(webserver({ // 运行gulp-webserver 20 | port:8000, //默认端口号是8080 21 | livereload: true, // 启用LiveReload 22 | // open: 'http://localhost:5000/' // 服务器启动时自动打开网页 23 | // open: true // 服务器启动时自动打开网页 24 | })); 25 | }); 26 | // 监听任务 27 | gulp.task('watch', function () { 28 | gulp.watch('./**', function (file) { //要监听的文件目录 29 | let date = new Date(); 30 | livereload.changed(file.path); 31 | console.log(date + "=>监听变化成功" ); 32 | }); 33 | 34 | }); 35 | 36 | //编译sass 37 | gulp.task('sass:watch', function () { 38 | gulp.watch(['public/css/sass_module/*.scss','public/css/sass_module/**/*.scss'],['sass']); 39 | }) 40 | 41 | //执行任务 42 | gulp.task('start', ['webserver', 'watch','sass:watch']); 43 | -------------------------------------------------------------------------------- /controller/util/cookie.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const secret = require('./secret'); 3 | //服务器 - cookie操作 4 | 5 | class nodeCookie { 6 | //添加cookie 7 | addCookie(res,name,data){ 8 | let baseStr = secret.encryptAes(data,'jiafan') //nodejs加密cookie 9 | res.cookie(name,baseStr,{maxAge:7*24*60*60*1000, path:'/'}); 10 | } 11 | //添加cookie(未加密) 12 | addCookieUnencrypted(res,name,data){ 13 | let type = typeof(data),baseStr; 14 | type == 'object' ? baseStr = JSON.stringify(data) : baseStr = data.toString(); 15 | res.cookie(name,baseStr,{maxAge:7*24*60*60*1000, path:'/'}); 16 | } 17 | //获取cookie(未加密) 18 | getCookieUnencrypted(req,name){ 19 | let data = req.cookies[name]; 20 | if(data==undefined){ 21 | return data 22 | } else { 23 | return data = JSON.parse(unescape(data)) 24 | } 25 | } 26 | //获取cookie(加了密的) 27 | getCookie(req,name){ 28 | let data = req.cookies[name]; 29 | if(data == undefined){ 30 | return data 31 | } else { 32 | data = JSON.parse(secret.decryptAes(data,'jiafan')) //nodejs解密cookie 33 | return data 34 | } 35 | } 36 | //修改cookie 37 | updateCookie(req,res,name,obj){ //obj代表要修改的内容 38 | let data = this.getCookie(req,name); 39 | for(let key in obj) { 40 | data[key] = obj[key] 41 | } 42 | data = JSON.stringify(data) //字符串化 43 | this.addCookie(res,name,data) 44 | } 45 | //删除单个cookie 46 | delCookie(res,name){ 47 | res.clearCookie(name,{path: '/'}); 48 | } 49 | //删除多个cookie 50 | delAllCookie(res,obj){ 51 | for(let key in obj){ 52 | this.delCookie(res,obj[key]) 53 | } 54 | } 55 | } 56 | 57 | module.exports = nodeCookie; 58 | -------------------------------------------------------------------------------- /views/pages/about.hbs: -------------------------------------------------------------------------------- 1 | 2 |

{{ title }}

3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
城市辖区详细地址
{{address.name}}{{address.addres}}{{address.infor}}
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | {{#each product}} 35 | 36 | 37 | 38 | 39 | 40 | 46 | 47 | {{/each}} 48 | 49 | 50 | 51 | 52 |
品牌名称价格照片操作
{{p_brand}}{{p_name}}{{p_price}}元查看详情
53 |
54 | -------------------------------------------------------------------------------- /public/css/css_module/details/details.css: -------------------------------------------------------------------------------- 1 | header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}.nav-ul{padding:10px 0}.nav-ul li{list-style:none;display:inline-block;vertical-align:middle}.nav-ul li a{display:block;float:left;padding:5px 15px;text-decoration:none;color:#666}.nav-ul li a:hover{background:rgba(0,0,0,0.1);border-radius:3px}p{text-align:center}button{width:150px;height:34px;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 0}.login{margin-top:100px;border:1px solid #fc5144;padding:20px;text-align:center}input{width:200px;height:34px;text-indent:1em;color:blue;border:2px solid #999;border-radius:5px}h3{color:#ff6000;padding:5px}.p-price{padding:20px 0;color:#fc5144;font-size:40px;font-weight:700}ul li{list-style:none;margin:30px 0} 2 | -------------------------------------------------------------------------------- /public/js/sea_module/about/about.js: -------------------------------------------------------------------------------- 1 | define(function(require,exports,module){ 2 | //引入模块 3 | var $ = require('../../outerPlugin/jquery.min'), 4 | util = require('../../util'), 5 | reqAjax = util.reqAjax; 6 | 7 | $('#get_data').on('click',function(){ 8 | var successFn = function(data){ 9 | $('#tb_body').append(data.html) 10 | } 11 | reqAjax('POST','/about/getData','',true,function(data){ 12 | if(data.success){ 13 | swal({title:'Success', 14 | text:"请求数据成功!", 15 | type:"success", 16 | // confirmButtonText:'确认', 17 | showConfirmButton:false, 18 | confirmButtonColor:'#fc5144', 19 | timer:1000}),successFn(data); 20 | }else { 21 | 22 | } 23 | }) 24 | }) 25 | 26 | // 获取商品 27 | $('#get_list').on('click',function(){ 28 | var obj; 29 | var successFn = function(data){ 30 | $('#tb_body2').append(data.html) 31 | } 32 | reqAjax('GET','/about/getListData',null,true,function(data){ 33 | if(data.success){ 34 | swal({title:'下滑查看商品', 35 | text:"Success", 36 | type:"success", 37 | // confirmButtonText:'确认', 38 | showConfirmButton:false, 39 | confirmButtonColor:'#fc5144', 40 | timer:1000}),successFn(data); 41 | }else { 42 | swal({title:'Err', 43 | text:"出错了!", 44 | type:"warning", 45 | confirmButtonText:'确认', 46 | showConfirmButton:false, 47 | confirmButtonColor:'#fc5144', 48 | timer:1000}) 49 | } 50 | }) 51 | }) 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | }) 60 | -------------------------------------------------------------------------------- /public/js/util.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | define(function(require,exports,module){ 3 | var $ = require('./outerPlugin/jquery.min'); 4 | //ajax提交 5 | exports.reqAjax = function(type,url,data,async,callback1,callback2){ //callback2为失败回调 6 | $.ajax({ 7 | type:type, 8 | url:url, 9 | data:{param:data}, 10 | datatype:'json', 11 | async:async 12 | }).done(function(data){ 13 | if(data.success){ 14 | callback1(data) 15 | } else { 16 | swal({title:'失败',text:data.errMsg,type:"warning",confirmButtonText:'确认', 17 | confirmButtonColor:'#10aef2'}); 18 | } 19 | }).fail(function(){ 20 | swal({title:'请重试',text:"服务器正在维护中...",type:"warning",confirmButtonText:'确认', 21 | confirmButtonColor:'#10aef2'}); 22 | setTimeout(function(){ 23 | location.reload(); 24 | },10000); 25 | }) 26 | } 27 | 28 | //cookie操作 29 | //设置cookie 30 | exports.setCookie = function(name,value) { 31 | var exp = new Date(); 32 | exp.setTime(exp.getTime() + 12*60*60*1000); 33 | document.cookie = name + "="+ escape(value) + ";expires=" + exp.toGMTString()+";path=/"; 34 | } 35 | //获取cookie 36 | exports.getCookie = function(name) { 37 | var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); 38 | 39 | if(arr=document.cookie.match(reg)) 40 | return unescape(arr[2]); 41 | else 42 | return null; 43 | } 44 | //删除cookie 45 | exports.delCookie = function(name){ 46 | var exp = new Date(); 47 | exp.setTime(exp.getTime() - 1); 48 | var cval=exports.getCookie(name); 49 | if(cval!=null) 50 | document.cookie= name + "="+cval+";expires="+exp.toGMTString()+";path=/"; 51 | } 52 | 53 | }) 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NodeJs 2 | 3 | 4 | 5 | #### 主要技术 6 | 7 | * express 8 | 9 | * nodemon 10 | 11 | * sass 12 | 13 | * seaJs 14 | 15 | * gulp 16 | 17 | * handlebars 18 | 19 | * express-mysql 20 | 21 | ``` 22 | 数据库,控制层下的Dao中的database.js,操作数据库查询获取数据需要掌握一些基础的sql的查询语句。 23 | ``` 24 | 25 | * 项目文件夹中yoho.sql的文件,需要导入到mysql中具体的配置请进入database.js中进行 26 | 27 | 28 | 29 | #### gulp-livereload 实时刷新web页面,不用手动刷新你懂得! 30 | 31 | * 全局安装 gulp: 32 | 33 | ``` 34 | npm install --global gulp 35 | ``` 36 | 37 | * 作为项目的开发依赖(devDependencies)安装: 38 | 39 | ``` 40 | npm install gulp gulp-livereload --save-dev  41 | ``` 42 | 43 | * 使用命令来查看你已经安装的npm包 44 | 45 | ``` 46 |  npm list -g -depth 0 47 | ``` 48 | 49 | * [google浏览器livereload的插件地址](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei) 50 | 51 | 52 | * 安装后会出现一个圆圈图标点击后可将圆心变为实心这个代表已经开始实时监听刷新 53 | 54 | 55 | 56 | * 具体配置进入gulpfile.js中查看 要注意引入gulp-webserver这个模块 57 | 58 | ​ 59 | 60 | 这个项目结构的搭建还有很多不足之处,还需要不断地改进! 61 | 62 | 63 | #### 启动方式 64 | 65 | * 安装依赖 66 | 67 | ``` 68 | npm install // 热启动需要全局安装nodemon 另外nodeJS最好安装稳定版本 69 | ``` 70 | 71 | 72 | * 启动sass监听 73 | 74 | ``` 75 | gulp sass:watch // 修改任意scss文件并保存,即可进行编译 76 | ``` 77 | 78 | * 启动项目 79 | 80 | ``` 81 | npm run dev // mac上不能运行请加上sudo 82 | ``` 83 | 84 | * 通过gulp来启动项目 85 | 86 | ``` 87 | gulp start // gulp start 已经配置好监听所有文件,前提是需要开启webserver的服务 88 | 89 | gulp webserver // 需要先执行这个命令启动 livereload 90 | ``` 91 | 92 | ​ 93 | 94 | #### 项目截图 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /public/css/css_module/about/about.css: -------------------------------------------------------------------------------- 1 | header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}.nav-ul{padding:10px 0}.nav-ul li{list-style:none;display:inline-block;vertical-align:middle}.nav-ul li a{display:block;float:left;padding:5px 15px;text-decoration:none;color:#666}.nav-ul li a:hover{background:rgba(0,0,0,0.1);border-radius:3px}p{text-align:center}button{width:150px;height:34px;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 0}.login{margin-top:100px;border:1px solid #fc5144;padding:20px;text-align:center}input{width:200px;height:34px;text-indent:1em;color:blue;border:2px solid #999;border-radius:5px}h3{color:#ff6000;padding:5px}.about-box{padding:20px 0;height:auto}.about-box table{margin-top:30px;font-family:verdana,arial,sans-serif;font-size:11px;color:#333333;border-width:1px;border-color:#a9c6c9;border-collapse:collapse}.about-box table thead{background:#f9f9f9}.about-box table tr{border-width:1px;padding:10px 20px;border-style:solid;border-color:rgba(173,175,175,0.52);border-left:none;border-right:none}.about-box table td{width:280px;height:50px;padding-left:10px;color:#666} 2 | -------------------------------------------------------------------------------- /SeaJS模块化.md: -------------------------------------------------------------------------------- 1 | ##前言## 2 | SeaJS是一个遵循CommonJS规范的JavaScript模块加载框架,可以实现JavaScript的模块化开发及加载机制。 3 | 4 | SeaJS的主要目的是令JavaScript开发模块化并可以轻松愉悦进行加载,将前端工程师从繁重的JavaScript文件及对象依赖处理中解放出来,可以专注于代码本身的逻辑。 5 | 6 | SeaJS的作者是淘宝前端工程师玉伯。 7 | 8 | SeaJS本身遵循KISS(Keep It Simple, Stupid)理念进行开发,其本身仅有个位数的API,因此学习起来毫无压力。在学习SeaJS的过程中,处处能感受到KISS原则的精髓——仅做一件事,做好一件事。 9 | 10 | ##使用SeaJS## 11 | 12 | SeaJS项目目前托管在GitHub上,主页为 https://github.com/seajs/seajs/ 。 13 | 14 | 下载完成后,通过``` 18 | ``` 19 | 20 | 使用SeaJS开发JavaScript的基本原则就是:一切皆为模块。引入SeaJS后,编写JavaScript代码就变成了编写一个又一个模块,SeaJS中模块的概念有点类似于面向对象中的类——模块可以拥有数据和方法,数据和方法可以定义为公共或私有,公共数据和方法可以供别的模块调用。 21 | 22 | 另外,每个模块应该都定义在一个单独js文件中,即一个对应一个模块。 23 | 24 | **模块的定义** 25 | 26 | **define** 27 | SeaJS中使用"define"函数定义一个模块 28 | 29 | ``` 30 | define(function(require, exports, module) { 31 | require("./module1"); 32 | exports.add = function(x, y) { 33 | return x + y; 34 | }; 35 | }); 36 | ``` 37 | 里面的这个函数是模块的主体和重点: 38 | - require: 模块加载函数,用于加载依赖的模块 39 | - exports: 接口对象,将变量或方法定义其上并暴露给外部调用 40 | - module: 模块的元数据 41 | 42 | **require** 43 | require是SeaJS主要的模块加载方法, 当在一个模块中需要用到其他模块时一般用require加载: 44 | ``` 45 | var module1 = require("../module1"); 46 | ``` 47 | 加载流程: 48 | SeaJS会首先下载入口模块,然后顺着入口模块使用正则表达式匹配代码中所有的require,在根据require中的文件路径标识下载相应的JS文件,对下载来的js文件进行类似操作.传给require的路径标识必须是字符串字面量,不能是表达式,如下面使用require的方法是错误的: 49 | 50 | ``` 51 | require("module" + 1); 52 | require("MODULE".toLowerCase()); 53 | ``` 54 | 55 | **seajs.config** 56 | SeaJS提供了一个config方法可以设置全局配置,接收一个表示全局配置的配置对象: 57 | ``` 58 | seajs.config({ 59 | base: 'path/to/jslib/', 60 | alias: { 61 | 'app': 'path/to/app/' 62 | }, 63 | charset: 'utf-8', 64 | timeout: 20000, 65 | debug: false 66 | }); 67 | ``` 68 | 69 | - base: 表示基址寻址时的基址路径 70 | - alias: 常用路径设置缩写 71 | - charset: 表示下载js时script标签的charset属性 72 | - timeout: 表示下载文件的最大时长, 以毫秒为单位 73 | - debug: 表示是否工作在调试模式下 74 | 75 | **seajs.use** 76 | 该方法主要用于载入入口模块,入口模块表示是一个程序的入口 77 | 78 | ``` 79 | seajs.use("./main", function(main) { 80 | //some code here 81 | }) 82 | ``` 83 | 84 | 第一个参数为需要载入的文件的路径,可以不加后缀,默认为.js文件.第二个参数为加载成功之后的回调函数. 85 | 86 | **Seajs如何与现有JS库配合使用** 87 | 88 | 要将现有JS库如jQuery与SeaJS一起使用,只需根据SeaJS的的模块定义规则对现有库进行一个封装。例如,下面是对jQuery的封装方法: 89 | 90 | ``` 91 | define(function() { 92 | //jquery原有代码 93 | return $.noConflict(); 94 | }); 95 | ``` -------------------------------------------------------------------------------- /public/css/css_module/test/test.css: -------------------------------------------------------------------------------- 1 | header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}.nav-ul{padding:10px 0}.nav-ul li{list-style:none;display:inline-block;vertical-align:middle}.nav-ul li a{display:block;float:left;padding:5px 15px;text-decoration:none;color:#666}.nav-ul li a:hover{background:rgba(0,0,0,0.1);border-radius:3px}p{text-align:center}button{width:150px;height:34px;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 0}.login{margin-top:100px;border:1px solid #fc5144;padding:20px;text-align:center}input{width:200px;height:34px;text-indent:1em;color:blue;border:2px solid #999;border-radius:5px}h3{color:#ff6000;padding:5px}.scrollbox{overflow:auto;width:200px;max-height:200px;margin:50px auto;position:relative;background:linear-gradient(#fff 30%, rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,0), #fff 70%) 0 100%,radial-gradient(50% 0, farthest-side, rgba(0,0,0,0.2), transparent),radial-gradient(50% 100%, farthest-side, rgba(0,0,0,0.2), transparent) 0 100%;background:linear-gradient(#fff 30%, rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,0), #fff 70%) 0 100%,radial-gradient(farthest-side at 50% 0, rgba(0,0,0,0.2), transparent),radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,0.2), transparent) 0 100%;background-repeat:no-repeat;background-color:white;background-size:100% 40px, 100% 40px, 100% 14px, 100% 14px;background-attachment:local, local, scroll, scroll} 2 | -------------------------------------------------------------------------------- /controller/home.js: -------------------------------------------------------------------------------- 1 | /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | + 通过服务层渲染页面发送数据【在此层请求接口数据】 + 3 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 4 | 'use strict' 5 | const config = require('../config'), //接口文件 6 | database = require('./Dao/database'), //数据库模块 7 | cookie = require('./util/cookie'); //引入cookie模块 8 | let nodeCookie = new cookie(); //实例化 9 | 10 | 11 | //渲染home页面 12 | exports.renderHomePage = (req,res) =>{ 13 | let obj = {}; 14 | obj.title = 'Home'; 15 | obj.info = '我是从服务层传送过来的'; 16 | res.render('pages/home',{ 17 | layout:'index', 18 | title:obj.title, 19 | infoData:obj, 20 | seaModule:'/static/js/sea_module/home/home.js', //没有使用模块化必须要配置完整的路劲和文件名 21 | cssModule:'/static/css/css_module/home/home.css' //没有使用模块化必须要配置完整的路劲和文件名 22 | }) 23 | } 24 | 25 | exports.postInforData = (req,res) =>{ 26 | let data = {}; 27 | data.success = true; 28 | data.errMsg = '请将controller文件夹下的home.js文件的postInforData方法的 data.success = false改为true'; 29 | data.name = 'tonyjiafan'; 30 | data.job = 'web前端'; 31 | data.age = '18'; 32 | data.sex = 'man'; 33 | 34 | console.log(data) 35 | res.send(data) 36 | } 37 | 38 | // 请求持久层 数据库 39 | exports.postDataBase = (req,res) =>{ 40 | let jsonData = req.body.param, 41 | paramObj = JSON.parse(jsonData); 42 | database.query("select * from t_user t where t. u_name = ?",[paramObj.username],function(data) { 43 | var msg = {}; 44 | msg.success = true; 45 | msg.data = data; 46 | res.send(msg); 47 | }) 48 | } 49 | // 登录验证 50 | exports.postLogin = (req,res) =>{ 51 | let jsonData = req.body.param, 52 | paramObj = JSON.parse(jsonData); 53 | database.query("select * from t_user t where t. u_name = ? and t.u_pwd = ?",[paramObj.username,paramObj.password], function (data) { 54 | if(data.length == 1){ 55 | let saveCookie = {}; 56 | saveCookie.u_id = data[0].u_id; 57 | saveCookie.u_name = data[0].u_name; 58 | saveCookie.u_pwd = data[0].u_pwd; 59 | let saveCookieData = JSON.stringify(saveCookie); 60 | console.log('我是存储在cookie中的' + saveCookieData) 61 | //将返回的数据存入cookie 62 | nodeCookie.addCookie(res,config.userCookie,saveCookieData) 63 | let msg = {}; 64 | msg.success = true; 65 | msg.data = data; 66 | msg.cookieData = saveCookieData; 67 | res.send(msg); 68 | 69 | } else { 70 | let data = {}; 71 | data.errMsg = '用户名或密码错误!'; 72 | res.send(data) 73 | } 74 | }) 75 | } 76 | -------------------------------------------------------------------------------- /routes.js: -------------------------------------------------------------------------------- 1 | /*+++++++++++++++++++++++++++++++++++++++++++++ 2 | + 路由定义应用程序应该响应的页面 + 3 | +++++++++++++++++++++++++++++++++++++++++++++*/ 4 | 'use strict' 5 | const express = require('express'), 6 | home = require('./controller/home'), //服务层(控制器) 7 | about = require('./controller/about'), 8 | details = require('./controller/details'), 9 | introduction = require('./controller/introduction'), 10 | test = require('./controller/test'); 11 | 12 | 13 | exports.setRequestUrl = (app) =>{ 14 | //首次加载的页面 15 | app.get('/',function(req,res){ 16 | if (req.cookies.isVisit) { 17 | console.log(req.cookies); 18 | res.send('

Express欢迎再次访问

Express'); 19 | } else { 20 | res.cookie('isVisit', 1, {maxAge: 60 * 1000}); 21 | res.send('

Express

欢迎第一次来到nodeJs的世界刷新一下看看

Express'); 22 | } 23 | }); 24 | 25 | //home页路由 通过服务器渲染 26 | app.get('/home',(req, res)=>{ 27 | home.renderHomePage(req,res) 28 | }); 29 | //Introduction页路由 通过服务器渲染 30 | app.get('/introduction',(req, res)=>{ 31 | introduction.introductionPage(req,res) 32 | }); 33 | //about页路由 通过服务器渲染 34 | app.get('/about',(req,res)=>{ 35 | about.renderAboutPage(req,res) 36 | }); 37 | //details页路由 通过服务器渲染 38 | app.get('/details',(req,res)=>{ 39 | details.renderDetailsPage(req,res) 40 | }); 41 | //test测试 通过服务器渲染 42 | app.get('/test',(req,res)=>{ 43 | test.renderTestPage(req,res) 44 | }); 45 | 46 | 47 | /*++++++++++++++++++++++++++++++++++++++++++++++++++ 48 | * 数据类路由 * 49 | ++++++++++++++++++++++++++++++++++++++++++++++++++*/ 50 | // home页面的数据请求 数据类 51 | app.post('/home/inforData',(req,res)=>{ 52 | home.postInforData(req,res) 53 | }) 54 | // about页面的数据请求 数据类 55 | app.post('/about/getData',(req,res)=>{ 56 | about.postData(req,res) 57 | }) 58 | //实验从-数据库-拿数据的路由 59 | app.post('/home/postDataBase',(req,res)=>{ 60 | home.postDataBase(req,res) 61 | }) 62 | //home页实验从-login 63 | app.post('/home/login',(req,res)=>{ 64 | home.postLogin(req,res) 65 | }) 66 | // about页面 获取列表 67 | app.get('/about/getListData',(req,res)=>{ 68 | about.getListData(req,res) 69 | }) 70 | 71 | 72 | 73 | } 74 | -------------------------------------------------------------------------------- /public/js/sea_module/home/home.js: -------------------------------------------------------------------------------- 1 | define(function(require,exports,module){ 2 | //引入模块 3 | var $ = require('../../outerPlugin/jquery.min'), 4 | util = require('../../util'), 5 | reqAjax = util.reqAjax; 6 | 7 | $('#btn').on('click',function(){ 8 | var successFn = function(data){ 9 | $('#text_box').append('我是' + data.name + '我的职业是' + data.job + '我今年' + data.age + '岁') 10 | } 11 | reqAjax('POST','/home/inforData','',true,function(data){ 12 | if(data.success){ 13 | swal({ 14 | title:'Success', 15 | text:"请求数据成功!", 16 | type:"success", 17 | // confirmButtonText:'确认', 18 | showConfirmButton:false, 19 | confirmButtonColor:'#fc5144', 20 | timer:1000}),successFn(data); 21 | } else { 22 | 23 | } 24 | }) 25 | })//click函数的闭合标签 26 | 27 | //实验连接数据库 28 | $('input[name=username]').on('blur',function(){ 29 | if($(this).val() == ''){ 30 | swal({ 31 | title:'错误', 32 | text:"用户名不能为空!", 33 | type:"warning", 34 | confirmButtonText:'确认', 35 | // showConfirmButton:false, 36 | confirmButtonColor:'#fc5144'}) 37 | } else { 38 | var successFn = function(data){ 39 | var data = data.data[0], 40 | pwd = data.u_pwd; 41 | $('input[name=password]').val(pwd); 42 | } 43 | 44 | var username = $(this).val(),param = {}; 45 | param.username = username; 46 | var jsonData = JSON.stringify(param); 47 | 48 | reqAjax('POST','/home/postDataBase',jsonData,true,function(data){ 49 | if(data.success){ 50 | successFn(data); 51 | } else { 52 | 53 | } 54 | }) 55 | } //else 闭合标记 56 | }) 57 | 58 | //登录验证 59 | $('#go_about').on('click',function(){ 60 | if($('input[name=username]').val() == '' || $('input[name=password]').val() == ''){ 61 | swal({ 62 | title:'错误', 63 | text:"用户名或密码不能为空!", 64 | type:"warning", 65 | confirmButtonText:'确认', 66 | // showConfirmButton:false, 67 | confirmButtonColor:'#fc5144'}) 68 | } else { 69 | var successFn = function(data){ 70 | console.log(data) 71 | location.href = '/about'; 72 | } 73 | 74 | var password = $('input[name=password]').val(), 75 | username = $('input[name=username]').val(), 76 | param = {}; 77 | param.username = username; 78 | param.password = password; 79 | var jsonData = JSON.stringify(param); 80 | 81 | reqAjax('POST','/home/login',jsonData,true,function(data){ 82 | if(data.success){ 83 | successFn(data); 84 | } else { 85 | } 86 | }) 87 | } //else 闭合标记 88 | 89 | }) 90 | 91 | 92 | 93 | 94 | 95 | 96 | }) //define闭合标记 97 | -------------------------------------------------------------------------------- /controller/about.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // const config = require('../config'); //接口文件 3 | const database = require('./Dao/database'); //数据库模块 4 | 5 | 6 | //渲染About 页面 7 | exports.renderAboutPage = (req,res)=>{ 8 | database.query("select * from t_product",[],function (data) { 9 | let productObj = data,addressObj = {}; 10 | addressObj.name = '成都'; 11 | addressObj.addres = '高新区'; 12 | addressObj.infor = '天府三街****广场'; 13 | res.render('pages/about',{ 14 | layout:'index', 15 | title:'About', 16 | product:productObj, 17 | address:addressObj, 18 | seaModule:'/static/js/sea_module/about/about.js' , //没有使用模块化必须要配置完整的路劲和文件名 19 | cssModule:'/static/css/css_module/about/about.css' //没有使用模块化必须要配置完整的路劲和文件名 20 | }) 21 | }) 22 | } 23 | 24 | exports.postData = (req,res)=>{ 25 | let arry = [],obj = {}; 26 | obj.name = '成都'; 27 | obj.addres = '高新区'; 28 | obj.infor = '天府三街****广场'; 29 | arry.push(obj) 30 | 31 | let htmlData = arry,html = '',data = {}; 32 | htmlData.forEach(function(element,index){ 33 | html += ` 34 | ${element.name} 35 | ${element.addres} 36 | ${element.infor} 37 | 38 | ` 39 | }) 40 | data.html = html; 41 | data.success = true; 42 | data.errMsg = '请将controller文件夹下的about.js文件的postData方法的 data.success = false改为true'; 43 | res.send(data) 44 | } 45 | 46 | // 获取about列表 47 | exports.getListData = (req,res) =>{ 48 | database.query("select * from t_product",[],function (data) { 49 | console.log(data) 50 | if(data.length > 0){ 51 | var msg = {},html=''; 52 | data.forEach(function(element,index){ 53 | html += ` 54 | ${element.p_brand} 55 | ${element.p_name} 56 | ${element.p_price}元 57 | 58 | 查看详情 64 | ` 65 | }) 66 | msg.success = true; 67 | msg.html = html; 68 | res.send(msg); 69 | } else { 70 | var data = {}; 71 | data.errMsg = '没有商品信息!'; 72 | res.send(data) 73 | } 74 | }) 75 | } 76 | -------------------------------------------------------------------------------- /controller/util/secret.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | // 加密模块 3 | const crypto = require('crypto'); 4 | 5 | exports.md5 = (str) => { 6 | let md5sum = crypto.createHash('md5'); 7 | md5sum.update(str); 8 | str = md5sum.digest('hex'); 9 | return str; 10 | } 11 | 12 | //数据加密 13 | exports.encryptAes = (str,secret) => { 14 | let cipher = crypto.createCipher('rc4', secret); 15 | let enc = cipher.update(str,'utf8','hex'); 16 | enc += cipher.final('hex'); 17 | return enc; 18 | } 19 | 20 | //数据解密 21 | exports.decryptAes = (str,secret) => { 22 | let decipher = crypto.createDecipher('rc4', secret); 23 | let dec = decipher.update(str,'hex','utf8'); 24 | dec += decipher.final('utf8'); 25 | return dec; 26 | } 27 | 28 | 29 | 30 | //=>base64加密开始 31 | let keyStr = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/" + "="; 32 | exports.encode64 = (input) => { 33 | input = "" + input; 34 | let output = ""; 35 | let chr1, chr2, chr3 = ""; 36 | let enc1, enc2, enc3, enc4 = ""; 37 | let i = 0; 38 | do 39 | { 40 | chr1 = input.charCodeAt(i++); 41 | chr2 = input.charCodeAt(i++); 42 | chr3 = input.charCodeAt(i++); 43 | enc1 = chr1 >> 2; 44 | enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); 45 | enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); 46 | enc4 = chr3 & 63; 47 | if (isNaN(chr2)) { 48 | enc3 = enc4 = 64; 49 | } else if (isNaN(chr3)) { 50 | enc4 = 64; 51 | } 52 | output = output + 53 | keyStr.charAt(enc1) + 54 | keyStr.charAt(enc2) + 55 | keyStr.charAt(enc3) + 56 | keyStr.charAt(enc4); 57 | chr1 = chr2 = chr3 = ""; 58 | enc1 = enc2 = enc3 = enc4 = ""; 59 | } while (i < input.length); 60 | return output; 61 | } 62 | 63 | 64 | //将参数先排序然后进行拼接字符串 65 | exports.sortPrams = (paramObj) => { 66 | let paramArr = []; 67 | let paramStr = ''; 68 | let appSignature = '^_~'; //参数分隔符 69 | for(let objName in paramObj){ 70 | paramArr.push(objName); 71 | } 72 | paramArr.sort(); 73 | for(let i=0; i { 101 | //console.log('old=='+old); 102 | //拷贝一份 返回去掉零的新串 103 | let newstr=old; 104 | //循环变量 小数部分长度 105 | let leng = old.length-old.indexOf(".")-1 106 | //判断是否有效数 107 | if(old.indexOf(".")>-1){ 108 | //循环小数部分 109 | for(var i=leng;i>0;i--){ 110 | //如果newstr末尾有0 111 | if(newstr.lastIndexOf("0")>-1 && newstr.substr(newstr.length-1,1)==0){ 112 | let k = newstr.lastIndexOf("0"); 113 | //如果小数点后只有一个0 去掉小数点 114 | if(newstr.charAt(k-1)=="."){ 115 | return newstr.substring(0,k-1); 116 | }else{ 117 | //否则 去掉一个0 118 | newstr=newstr.substring(0,k); 119 | } 120 | }else{ 121 | //如果末尾没有0 122 | return newstr; 123 | } 124 | } 125 | } 126 | return old; 127 | } 128 | -------------------------------------------------------------------------------- /public/js/sea_module/introduction/introduction.js: -------------------------------------------------------------------------------- 1 | 2 | define(function(require,exports,module){ 3 | //引入模块 4 | var $ = require('../../outerPlugin/jquery.min'), 5 | util = require('../../util'), 6 | reqAjax = util.reqAjax; 7 | 8 | var nodes = document.querySelectorAll('li'), 9 | _nodes = [].slice.call(nodes, 0); 10 | 11 | var getDirection = function (ev, obj) { 12 | var w = obj.offsetWidth, 13 | h = obj.offsetHeight, 14 | x = (ev.pageX - obj.offsetLeft - (w / 2) * (w > h ? (h / w) : 1)), 15 | y = (ev.pageY - obj.offsetTop - (h / 2) * (h > w ? (w / h) : 1)), 16 | d = Math.round( Math.atan2(y, x) / 1.57079633 + 5 ) % 4; 17 | 18 | return d; 19 | }; 20 | 21 | var addClass = function ( ev, obj, state ) { 22 | var direction = getDirection( ev, obj ), 23 | class_suffix = ""; 24 | 25 | obj.className = ""; 26 | 27 | switch ( direction ) { 28 | case 0 : class_suffix = '-top'; break; 29 | case 1 : class_suffix = '-right'; break; 30 | case 2 : class_suffix = '-bottom'; break; 31 | case 3 : class_suffix = '-left'; break; 32 | } 33 | 34 | obj.classList.add( state + class_suffix ); 35 | }; 36 | 37 | // bind events 38 | _nodes.forEach(function (el) { 39 | el.addEventListener('mouseover', function (ev) { 40 | addClass( ev, this, 'in' ); 41 | }, false); 42 | 43 | el.addEventListener('mouseout', function (ev) { 44 | addClass( ev, this, 'out' ); 45 | }, false); 46 | }); 47 | 48 | //打字机 49 | var typewriterArr = [],//打字的数据库队列 50 | typewritering = false,//打字机的线程是否开启 51 | typewriterID = -1,//打字机的线程ID 52 | typewriterTime = 200,//定时调用的时间 53 | 54 | typewriterEffect = function(e,str,color){//增加显示的元素 55 | typewriterArr.push({ 56 | "context":e,//目标元素上下文 57 | "str":str,//显示的元素 58 | "lening":0,//截取的进度 59 | "maxLength":str.length//最大进度 60 | }); 61 | e.style.color = color||"#000000";//设置元素颜色 62 | }, 63 | closeTypewriter = function(){//关闭定时调用 64 | clearTimeout(typewriterID);//清除线程 65 | typewritering = false;//改变状态 66 | }, 67 | typewriterUi = function(){//定时调用显示UI 68 | var i = 0, 69 | l = typewriterArr.length, 70 | eing = null; 71 | for(;i<1;i++){ 72 | eing = typewriterArr[i]; 73 | /*判断中英文进行+2或+1操作 74 | 递增,获取最新截取的长度*/ 75 | eing.lening++; 76 | //如果截取的长度超过最大长度,泽截取的长度设置为1 77 | if(eing.lening>eing.maxLength)eing.lening = 0; 78 | //显示截取的字符 79 | eing.context.innerHTML = eing.str.substring(0,eing.lening)+"_"; 80 | } 81 | typewriterID = setTimeout(typewriterUi,typewriterTime); 82 | }; 83 | //隔时间调用一次定时器,生成一个随机颜色 84 | function time(){ 85 | setInterval(ran,1000); 86 | function ran() { 87 | var x = Math.floor(Math.random() * (255 - 0 + 1) + 0); 88 | var y = Math.floor(Math.random() * (255 - 0 + 1) + 0); 89 | var z = Math.floor(Math.random() * (255 - 0 + 1) + 0); 90 | var color = "rgb(" + x + "," + y + "," + z + ")"; 91 | typewriterEffect2.style.color=color; 92 | } 93 | }; 94 | //开启定时调用,参数为设置定时器调用的时间 95 | startTypewriter = function(){ 96 | if (!typewritering) {//如果没有开启,则开启 97 | typewriterTime = typewriterTime||typewriterTime; 98 | typewriterUi();//开始定时调用 99 | } 100 | }; 101 | typewriterEffect( 102 | document.getElementById("typewriterEffect2"),"nvm ls列出所有安装的版本nvm ls-remote列出所以远程服务器的版本(官方node version list)nvm current显示当前的版本nvm alias ",time() 103 | ); 104 | startTypewriter(100); 105 | 106 | //计数1 107 | $.fn.extend({ 108 | wordCount: function (maxLength, wordWrapper) { 109 | var self = this; 110 | $(self).attr("maxlength", maxLength); 111 | showWordCount(); 112 | $(this).on("input propertychange", showWordCount); 113 | function showWordCount() { 114 | curLength = $(self).val().length; 115 | var leaveCount = maxLength - curLength; 116 | wordWrapper.text(leaveCount + "/" + maxLength); 117 | } 118 | } 119 | }) 120 | $(function () { 121 | $("#abc").wordCount(10, $("#wordCountShow")); 122 | }) 123 | 124 | 125 | }) //define闭合标记 126 | -------------------------------------------------------------------------------- /public/css/css_module/introduction/introduction.css: -------------------------------------------------------------------------------- 1 | header{width:100%;border-bottom:4px solid #005f3c}.nav-warp{width:1000px;margin:0 auto}footer{width:100%;height:80px;border-top:5px solid #005f3c}.footer{width:1000px;margin:0 auto;border-bottom:4px solid #005f3c}body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,ul{margin:0;padding:0;text-align:center}.clear{clear:both}.content-warp{outline:1px solid #999;margin:10px auto;width:1000px;height:auto;padding:20px 0;background:white}.main-a{display:inline-block;background:#ff4000;border:1px solid #fc7144;border-radius:3px;outline:none;color:white;margin:10px 100px}li{-webkit-perspective:400px;perspective:400px}.info{-webkit-transform:rotate3d(1, 0, 0, 90deg);transform:rotate3d(1, 0, 0, 90deg);width:100%;height:100%;padding:20px;position:absolute;top:0;left:0;border-radius:4px;pointer-events:none;background-color:#6fb974}.in-top .info{-webkit-transform-origin:50% 0%;transform-origin:50% 0%;-webkit-animation:in-top 300ms ease 0ms 1 forwards;animation:in-top 300ms ease 0ms 1 forwards}.in-right .info{-webkit-transform-origin:100% 0%;transform-origin:100% 0%;-webkit-animation:in-right 300ms ease 0ms 1 forwards;animation:in-right 300ms ease 0ms 1 forwards}.in-bottom .info{-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-animation:in-bottom 300ms ease 0ms 1 forwards;animation:in-bottom 300ms ease 0ms 1 forwards}.in-left .info{-webkit-transform-origin:0% 0%;transform-origin:0% 0%;-webkit-animation:in-left 300ms ease 0ms 1 forwards;animation:in-left 300ms ease 0ms 1 forwards}.out-top .info{-webkit-transform-origin:50% 0%;transform-origin:50% 0%;-webkit-animation:out-top 300ms ease 0ms 1 forwards;animation:out-top 300ms ease 0ms 1 forwards}.out-right .info{-webkit-transform-origin:100% 50%;transform-origin:100% 50%;-webkit-animation:out-right 300ms ease 0ms 1 forwards;animation:out-right 300ms ease 0ms 1 forwards}.out-bottom .info{-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-animation:out-bottom 300ms ease 0ms 1 forwards;animation:out-bottom 300ms ease 0ms 1 forwards}.out-left .info{-webkit-transform-origin:0% 0%;transform-origin:0% 0%;-webkit-animation:out-left 300ms ease 0ms 1 forwards;animation:out-left 300ms ease 0ms 1 forwards}@-webkit-keyframes in-top{from{-webkit-transform:rotate3d(-1, 0, 0, 90deg);transform:rotate3d(-1, 0, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@keyframes in-top{from{-webkit-transform:rotate3d(-1, 0, 0, 90deg);transform:rotate3d(-1, 0, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@-webkit-keyframes in-right{from{-webkit-transform:rotate3d(0, -1, 0, 90deg);transform:rotate3d(0, -1, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@keyframes in-right{from{-webkit-transform:rotate3d(0, -1, 0, 90deg);transform:rotate3d(0, -1, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@-webkit-keyframes in-bottom{from{-webkit-transform:rotate3d(1, 0, 0, 90deg);transform:rotate3d(1, 0, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@keyframes in-bottom{from{-webkit-transform:rotate3d(1, 0, 0, 90deg);transform:rotate3d(1, 0, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@-webkit-keyframes in-left{from{-webkit-transform:rotate3d(0, 1, 0, 90deg);transform:rotate3d(0, 1, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@keyframes in-left{from{-webkit-transform:rotate3d(0, 1, 0, 90deg);transform:rotate3d(0, 1, 0, 90deg)}to{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}}@-webkit-keyframes out-top{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(-1, 0, 0, 104deg);transform:rotate3d(-1, 0, 0, 104deg)}}@keyframes out-top{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(-1, 0, 0, 104deg);transform:rotate3d(-1, 0, 0, 104deg)}}@-webkit-keyframes out-right{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(0, -1, 0, 104deg);transform:rotate3d(0, -1, 0, 104deg)}}@keyframes out-right{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(0, -1, 0, 104deg);transform:rotate3d(0, -1, 0, 104deg)}}@-webkit-keyframes out-bottom{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(1, 0, 0, 104deg);transform:rotate3d(1, 0, 0, 104deg)}}@keyframes out-bottom{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(1, 0, 0, 104deg);transform:rotate3d(1, 0, 0, 104deg)}}@-webkit-keyframes out-left{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(0, 1, 0, 104deg);transform:rotate3d(0, 1, 0, 104deg)}}@keyframes out-left{from{-webkit-transform:rotate3d(0, 0, 0, 0deg);transform:rotate3d(0, 0, 0, 0deg)}to{-webkit-transform:rotate3d(0, 1, 0, 104deg);transform:rotate3d(0, 1, 0, 104deg)}}ul{padding:0;margin:0 0 50px}ul:after{content:"";display:table;clear:both}li{position:relative;float:left;width:200px;height:200px;margin:5px;padding:0;list-style:none}li a{display:inline-block;vertical-align:top;text-decoration:none;border-radius:4px}li h3{margin:0;font-size:16px;color:rgba(255,255,255,0.9)}li p{font-size:12px;line-height:1.5;color:rgba(255,255,255,0.8)}li .normal{width:100%;height:100%;background-color:#fff;color:#fff;box-shadow:inset 0 2px 20px #e6ebed;text-align:center;font-size:50px;line-height:200px;border:1px solid #d1bfbf}li .normal svg{pointer-events:none;width:50px}li .normal svg path{fill:rgba(52,73,94,0.2)}*{box-sizing:border-box}body{background-color:#fff}h1{margin:0 auto 5px;text-align:center}h3{font-family:'Bree Serif', serif}.container{width:840px;margin:0 auto}header{font-family:'Bree Serif', serif;text-align:center;margin:50px 0 25px;color:#34495E}header p{margin:0;color:rgba(52,73,94,0.4)}#typewriterEffect2{text-indent:2rem;text-shodow:0 0 2px gray;padding:5px;transition:all 0.3s linear;font-weight:bold;font-size:25px;width:100%}.flex-list{background:#f6f6f6;display:-webkit-flex;display:flex;flex-direction:row;justify-content:space-between}.flex-list .item{text-align:center;border:1px solid #fc5144;display:block}.flex-list .item:nth-child(1),.flex-list .item:nth-child(3){background:#01aef2}.flex-list .item:nth-child(2){background:#edf23f} 2 | -------------------------------------------------------------------------------- /public/js/outerPlugin/sea.js: -------------------------------------------------------------------------------- 1 | /*! Sea.js 3.0.1 | seajs.org/LICENSE.md */ 2 | !function(a,b){function c(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function d(){return B++}function e(a){return a.match(E)[0]}function f(a){for(a=a.replace(F,"/"),a=a.replace(H,"$1/");a.match(G);)a=a.replace(G,"/");return a}function g(a){var b=a.length-1,c=a.charCodeAt(b);return 35===c?a.substring(0,b):".js"===a.substring(b-2)||a.indexOf("?")>0||47===c?a:a+".js"}function h(a){var b=v.alias;return b&&x(b[a])?b[a]:a}function i(a){var b=v.paths,c;return b&&(c=a.match(I))&&x(b[c[1]])&&(a=b[c[1]]+c[2]),a}function j(a){var b=v.vars;return b&&a.indexOf("{")>-1&&(a=a.replace(J,function(a,c){return x(b[c])?b[c]:a})),a}function k(a){var b=v.map,c=a;if(b)for(var d=0,e=b.length;e>d;d++){var f=b[d];if(c=z(f)?f(a)||a:a.replace(f[0],f[1]),c!==a)break}return c}function l(a,b){var c,d=a.charCodeAt(0);if(K.test(a))c=a;else if(46===d)c=(b?e(b):v.cwd)+a;else if(47===d){var g=v.cwd.match(L);c=g?g[0]+a.substring(1):a}else c=v.base+a;return 0===c.indexOf("//")&&(c=location.protocol+c),f(c)}function m(a,b){if(!a)return"";a=h(a),a=i(a),a=h(a),a=j(a),a=h(a),a=g(a),a=h(a);var c=l(a,b);return c=h(c),c=k(c)}function n(a){return a.hasAttribute?a.src:a.getAttribute("src",4)}function o(a,b,c,d){var e;try{importScripts(a)}catch(f){e=f}b(e)}function p(a,b,c,d){var e=Z.createElement("script");c&&(e.charset=c),A(d)||e.setAttribute("crossorigin",d),q(e,b,a),e.async=!0,e.src=a,ca=e,ba?aa.insertBefore(e,ba):aa.appendChild(e),ca=null}function q(a,b,c){function d(c){a.onload=a.onerror=a.onreadystatechange=null,v.debug||aa.removeChild(a),a=null,b(c)}var e="onload"in a;e?(a.onload=d,a.onerror=function(){D("error",{uri:c,node:a}),d(!0)}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&d()}}function r(){if(ca)return ca;if(da&&"interactive"===da.readyState)return da;for(var a=aa.getElementsByTagName("script"),b=a.length-1;b>=0;b--){var c=a[b];if("interactive"===c.readyState)return da=c}}function s(a){function b(){l=a.charAt(k++)}function c(){return/\s/.test(l)}function d(){return'"'==l||"'"==l}function e(){var c=k,d=l,e=a.indexOf(d,c);if(-1==e)k=m;else if("\\"!=a.charAt(e-1))k=e+1;else for(;m>k;)if(b(),"\\"==l)k++;else if(l==d)break;o&&(p.push(a.substring(c,k-1)),o=0)}function f(){for(k--;m>k;)if(b(),"\\"==l)k++;else{if("/"==l)break;if("["==l)for(;m>k;)if(b(),"\\"==l)k++;else if("]"==l)break}}function g(){return/[a-z_$]/i.test(l)}function h(){var b=a.slice(k-1),c=/^[\w$]+/.exec(b)[0];q={"if":1,"for":1,"while":1,"with":1}[c],n={"break":1,"case":1,"continue":1,"debugger":1,"delete":1,"do":1,"else":1,"false":1,"if":1,"in":1,"instanceof":1,"return":1,"typeof":1,"void":1}[c],u="return"==c,s={"instanceof":1,"delete":1,"void":1,"typeof":1,"return":1}.hasOwnProperty(c),o=/^require\s*\(\s*(['"]).+?\1\s*\)/.test(b),o?(c=/^require\s*\(\s*['"]/.exec(b)[0],k+=c.length-2):k+=/^[\w$]+(?:\s*\.\s*[\w$]+)*/.exec(b)[0].length-1}function i(){return/\d/.test(l)||"."==l&&/\d/.test(a.charAt(k))}function j(){var b=a.slice(k-1),c;c="."==l?/^\.\d+(?:E[+-]?\d*)?\s*/i.exec(b)[0]:/^0x[\da-f]*/i.test(b)?/^0x[\da-f]*\s*/i.exec(b)[0]:/^\d+\.?\d*(?:E[+-]?\d*)?\s*/i.exec(b)[0],k+=c.length-1,n=0}if(-1==a.indexOf("require"))return[];for(var k=0,l,m=a.length,n=1,o=0,p=[],q=0,r=[],s,t=[],u;m>k;)if(b(),c())!u||"\n"!=l&&"\r"!=l||(s=0,u=0);else if(d())e(),n=1,u=0,s=0;else if("/"==l)if(b(),"/"==l)k=a.indexOf("\n",k),-1==k&&(k=a.length);else if("*"==l){var v=a.indexOf("\n",k);k=a.indexOf("*/",k),-1==k?k=m:k+=2,u&&-1!=v&&k>v&&(s=0,u=0)}else n?(f(),n=0,u=0,s=0):(k--,n=1,u=0,s=1);else if(g())h();else if(i())j(),u=0,s=0;else if("("==l)r.push(q),n=1,u=0,s=1;else if(")"==l)n=r.pop(),u=0,s=0;else if("{"==l)u&&(s=1),t.push(s),u=0,n=1;else if("}"==l)s=t.pop(),n=!s,u=0;else{var w=a.charAt(k);";"==l?s=0:"-"==l&&"-"==w||"+"==l&&"+"==w||"="==l&&">"==w?(s=0,k++):s=1,n="]"!=l,u=0}return p}function t(a,b){this.uri=a,this.dependencies=b||[],this.deps={},this.status=0,this._entry=[]}if(!a.seajs){var u=a.seajs={version:"3.0.1"},v=u.data={},w=c("Object"),x=c("String"),y=Array.isArray||c("Array"),z=c("Function"),A=c("Undefined"),B=0,C=v.events={};u.on=function(a,b){var c=C[a]||(C[a]=[]);return c.push(b),u},u.off=function(a,b){if(!a&&!b)return C=v.events={},u;var c=C[a];if(c)if(b)for(var d=c.length-1;d>=0;d--)c[d]===b&&c.splice(d,1);else delete C[a];return u};var D=u.emit=function(a,b){var c=C[a];if(c){c=c.slice();for(var d=0,e=c.length;e>d;d++)c[d](b)}return u},E=/[^?#]*\//,F=/\/\.\//g,G=/\/[^/]+\/\.\.\//,H=/([^:/])\/+\//g,I=/^([^/:]+)(\/.+)$/,J=/{([^{]+)}/g,K=/^\/\/.|:\//,L=/^.*?\/\/.*?\//;u.resolve=m;var M="undefined"==typeof window&&"undefined"!=typeof importScripts&&z(importScripts),N=/^(about|blob):/,O,P,Q=!location.href||N.test(location.href)?"":e(location.href);if(M){var R;try{var S=Error();throw S}catch(T){R=T.stack.split("\n")}R.shift();for(var U,V=/.*?((?:http|https|file)(?::\/{2}[\w]+)(?:[\/|\.]?)(?:[^\s"]*)).*?/i,W=/(.*?):\d+:\d+\)?$/;R.length>0;){var X=R.shift();if(U=V.exec(X),null!=U)break}var Y;if(null!=U)var Y=W.exec(U[1])[1];P=Y,O=e(Y||Q),""===Q&&(Q=O)}else{var Z=document,$=Z.scripts,_=Z.getElementById("seajsnode")||$[$.length-1];P=n(_),O=e(P||Q)}if(M)u.request=o;else{var Z=document,aa=Z.head||Z.getElementsByTagName("head")[0]||Z.documentElement,ba=aa.getElementsByTagName("base")[0],ca;u.request=p}var da,ea=u.cache={},fa,ga={},ha={},ia={},ja=t.STATUS={FETCHING:1,SAVED:2,LOADING:3,LOADED:4,EXECUTING:5,EXECUTED:6,ERROR:7};t.prototype.resolve=function(){for(var a=this,b=a.dependencies,c=[],d=0,e=b.length;e>d;d++)c[d]=t.resolve(b[d],a.uri);return c},t.prototype.pass=function(){for(var a=this,b=a.dependencies.length,c=0;cf;f++){var g=a.deps[a.dependencies[f]];g.status0&&(d.remain+=e-1,a._entry.shift(),c--)}},t.prototype.load=function(){var a=this;if(!(a.status>=ja.LOADING)){a.status=ja.LOADING;var c=a.resolve();D("load",c);for(var d=0,e=c.length;e>d;d++)a.deps[a.dependencies[d]]=t.get(c[d]);if(a.pass(),a._entry.length)return a.onload(),b;var f={},g;for(d=0;e>d;d++)g=ea[c[d]],g.statusb;b++){var d=a._entry[b];0===--d.remain&&d.callback()}delete a._entry},t.prototype.error=function(){var a=this;a.onload(),a.status=ja.ERROR},t.prototype.exec=function(){function a(b){var d=c.deps[b]||t.get(a.resolve(b));if(d.status==ja.ERROR)throw Error("module was broken: "+d.uri);return d.exec()}var c=this;if(c.status>=ja.EXECUTING)return c.exports;if(c.status=ja.EXECUTING,c._entry&&!c._entry.length&&delete c._entry,!c.hasOwnProperty("factory"))return c.non=!0,b;var e=c.uri;a.resolve=function(a){return t.resolve(a,e)},a.async=function(b,c){return t.use(b,c,e+"_async_"+d()),a};var f=c.factory,g=z(f)?f.call(c.exports={},a,c.exports,c):f;return g===b&&(g=c.exports),delete c.factory,c.exports=g,c.status=ja.EXECUTED,D("exec",c),c.exports},t.prototype.fetch=function(a){function c(){u.request(g.requestUri,g.onRequest,g.charset,g.crossorigin)}function d(a){delete ga[h],ha[h]=!0,fa&&(t.save(f,fa),fa=null);var b,c=ia[h];for(delete ia[h];b=c.shift();)a===!0?b.error():b.load()}var e=this,f=e.uri;e.status=ja.FETCHING;var g={uri:f};D("fetch",g);var h=g.requestUri||f;return!h||ha.hasOwnProperty(h)?(e.load(),b):ga.hasOwnProperty(h)?(ia[h].push(e),b):(ga[h]=!0,ia[h]=[e],D("request",g={uri:f,requestUri:h,onRequest:d,charset:z(v.charset)?v.charset(h):v.charset,crossorigin:z(v.crossorigin)?v.crossorigin(h):v.crossorigin}),g.requested||(a?a[g.requestUri]=c:c()),b)},t.resolve=function(a,b){var c={id:a,refUri:b};return D("resolve",c),c.uri||u.resolve(c.id,b)},t.define=function(a,c,d){var e=arguments.length;1===e?(d=a,a=b):2===e&&(d=c,y(a)?(c=a,a=b):c=b),!y(c)&&z(d)&&(c=b===s?[]:s(""+d));var f={id:a,uri:t.resolve(a),deps:c,factory:d};if(!M&&!f.uri&&Z.attachEvent&&b!==r){var g=r();g&&(f.uri=g.src)}D("define",f),f.uri?t.save(f.uri,f):fa=f},t.save=function(a,b){var c=t.get(a);c.statusf;f++)b[f]=ea[d[f]].exec();c&&c.apply(a,b),delete e.callback,delete e.history,delete e.remain,delete e._entry},e.load()},u.use=function(a,b){return t.use(a,b,v.cwd+"_use_"+d()),u},t.define.cmd={},a.define=t.define,u.Module=t,v.fetchedList=ha,v.cid=d,u.require=function(a){var b=t.get(t.resolve(a));return b.status 4 | * Licensed under MIT 5 | */.la-ball-fall,.la-ball-fall>div{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.la-ball-fall{display:block;font-size:0;color:#fff;width:54px;height:18px}.la-ball-fall.la-dark{color:#333}.la-ball-fall>div{display:inline-block;float:none;background-color:currentColor;border:0 solid currentColor;width:10px;height:10px;margin:4px;border-radius:100%;opacity:0;-webkit-animation:ball-fall 1s ease-in-out infinite;-moz-animation:ball-fall 1s ease-in-out infinite;-o-animation:ball-fall 1s ease-in-out infinite;animation:ball-fall 1s ease-in-out infinite}.la-ball-fall>div:nth-child(1){-webkit-animation-delay:-.2s;-moz-animation-delay:-.2s;-o-animation-delay:-.2s;animation-delay:-.2s}.la-ball-fall>div:nth-child(2){-webkit-animation-delay:-.1s;-moz-animation-delay:-.1s;-o-animation-delay:-.1s;animation-delay:-.1s}.la-ball-fall>div:nth-child(3){-webkit-animation-delay:0s;-moz-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.la-ball-fall.la-sm{width:26px;height:8px}.la-ball-fall.la-sm>div{width:4px;height:4px;margin:2px}.la-ball-fall.la-2x{width:108px;height:36px}.la-ball-fall.la-2x>div{width:20px;height:20px;margin:8px}.la-ball-fall.la-3x{width:162px;height:54px}.la-ball-fall.la-3x>div{width:30px;height:30px;margin:12px}@-webkit-keyframes ball-fall{0%{opacity:0;-webkit-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(145%);transform:translateY(145%)}}@-moz-keyframes ball-fall{0%{opacity:0;-moz-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-moz-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(145%);transform:translateY(145%)}}@-o-keyframes ball-fall{0%{opacity:0;-o-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-o-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-o-transform:translateY(145%);transform:translateY(145%)}}@keyframes ball-fall{0%{opacity:0;-webkit-transform:translateY(-145%);-moz-transform:translateY(-145%);-o-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(145%);-moz-transform:translateY(145%);-o-transform:translateY(145%);transform:translateY(145%)}} -------------------------------------------------------------------------------- /public/js/outerPlugin/sweetalert.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t,n){"use strict";!function o(e,t,n){function a(s,l){if(!t[s]){if(!e[s]){var i="function"==typeof require&&require;if(!l&&i)return i(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return a(n?n:t)},c,c.exports,o,e,t,n)}return t[s].exports}for(var r="function"==typeof require&&require,s=0;s=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},i=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},u=function(e){e.style.opacity="",e.style.display="block"},c=function(e){if(e&&!e.length)return u(e);for(var t=0;t0?setTimeout(o,t):e.style.display="none"});o()},h=function(n){if("function"==typeof MouseEvent){var o=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(o)}else if(t.createEvent){var a=t.createEvent("MouseEvents");a.initEvent("click",!1,!1),n.dispatchEvent(a)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},g=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)};a.hasClass=r,a.addClass=s,a.removeClass=l,a.escapeHtml=i,a._show=u,a.show=c,a._hide=d,a.hide=f,a.isDescendant=p,a.getTopMargin=m,a.fadeIn=v,a.fadeOut=y,a.fireClick=h,a.stopEventPropagation=g},{}],5:[function(t,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=t("./handle-dom"),s=t("./handle-swal-dom"),l=function(t,o,a){var l=t||e.event,i=l.keyCode||l.which,u=a.querySelector("button.confirm"),c=a.querySelector("button.cancel"),d=a.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(i)){for(var f=l.target||l.srcElement,p=-1,m=0;m"),i.innerHTML=e.html?e.text:s.escapeHtml(e.text||"").split("\n").join("
"),e.text&&s.show(i),e.customClass)s.addClass(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var d=t.getAttribute("data-custom-class");s.removeClass(t,d),t.setAttribute("data-custom-class","")}if(s.hide(t.querySelectorAll(".sa-icon")),e.type&&!a.isIE8()){var f=function(){for(var o=!1,a=0;ao;o++)n=parseInt(e.substr(2*o,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),a+=("00"+n).substr(n.length);return a};o.extend=a,o.hexToRgb=r,o.isIE8=s,o.logStr=l,o.colorLuminance=i},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document); -------------------------------------------------------------------------------- /yoho.sql: -------------------------------------------------------------------------------- 1 | /* 2 | SQLyog 企业版 - MySQL GUI v8.14 3 | MySQL - 5.5.37 : Database - yohobuy 4 | ********************************************************************* 5 | */ 6 | 7 | 8 | /*!40101 SET NAMES utf8 */; 9 | 10 | /*!40101 SET SQL_MODE=''*/; 11 | 12 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 13 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 14 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 15 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 16 | CREATE DATABASE /*!32312 IF NOT EXISTS*/`yohobuy` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; 17 | 18 | USE `yohobuy`; 19 | 20 | /*Table structure for table `t_colandproduct` */ 21 | 22 | DROP TABLE IF EXISTS `t_colandproduct`; 23 | 24 | CREATE TABLE `t_colandproduct` ( 25 | `c2_id` int(11) NOT NULL AUTO_INCREMENT, 26 | `c2_col_id` int(10) DEFAULT NULL, 27 | `c2_p_id` int(10) DEFAULT NULL, 28 | `c2_amount` int(10) DEFAULT NULL, 29 | `c2_sell` int(10) DEFAULT NULL, 30 | `c2_stock` int(10) DEFAULT NULL, 31 | `c2_sz_id` int(10) DEFAULT NULL, 32 | PRIMARY KEY (`c2_id`) 33 | ) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 34 | 35 | /*Data for the table `t_colandproduct` */ 36 | 37 | insert into `t_colandproduct`(`c2_id`,`c2_col_id`,`c2_p_id`,`c2_amount`,`c2_sell`,`c2_stock`,`c2_sz_id`) values (1,4,1,20,0,20,4),(2,3,1,20,0,12,4),(3,2,1,15,0,13,6),(4,1,1,25,0,17,6),(5,4,1,10,0,9,3),(6,1,1,10,0,9,5),(7,1,2,10,0,10,2),(8,2,2,10,0,10,3),(9,2,2,10,0,8,4),(10,4,2,20,0,19,2),(11,3,5,50,NULL,49,2),(12,2,3,20,NULL,20,1),(13,1,3,20,NULL,20,1),(14,2,4,20,NULL,17,2),(15,1,4,20,NULL,20,3),(16,4,4,20,NULL,17,4),(17,1,4,20,NULL,20,1),(18,2,3,20,NULL,18,4),(19,2,3,20,NULL,20,3),(20,1,3,20,NULL,20,3),(21,2,5,50,NULL,47,2),(22,4,6,50,NULL,50,4),(23,1,6,50,NULL,50,3),(24,2,7,50,NULL,50,2),(25,2,7,50,NULL,50,1),(26,2,8,100,NULL,100,2),(27,3,9,100,NULL,98,6),(28,4,10,100,NULL,98,5),(29,4,11,50,NULL,50,3),(30,2,11,50,NULL,50,2),(31,1,12,50,NULL,50,1),(32,2,12,50,NULL,50,2),(33,3,13,50,NULL,50,3),(34,3,13,50,NULL,50,2),(35,2,14,25,NULL,25,3),(36,1,14,25,NULL,25,2),(37,4,14,25,NULL,25,4),(38,3,14,25,NULL,25,4),(39,4,15,50,NULL,50,3),(40,1,15,50,NULL,50,5),(41,2,16,100,NULL,100,3),(42,4,17,100,NULL,97,5),(43,2,18,100,NULL,100,4),(44,3,19,100,NULL,100,3),(45,4,20,100,NULL,100,2),(46,3,21,100,NULL,100,2),(47,2,22,100,NULL,100,1),(48,4,23,50,NULL,50,2),(49,4,23,50,NULL,50,2),(50,3,24,30,NULL,30,3),(51,2,24,40,NULL,40,5),(52,1,24,30,NULL,30,4),(53,2,25,100,NULL,100,3),(54,4,26,100,NULL,100,2),(55,2,27,100,NULL,100,1),(56,3,28,50,NULL,50,2),(57,3,28,50,NULL,50,3),(58,2,29,40,NULL,40,4),(59,2,29,30,NULL,30,5),(60,4,29,30,NULL,30,4),(61,2,30,100,NULL,100,3),(62,2,31,50,NULL,50,2),(63,4,31,50,NULL,50,1),(64,3,32,25,NULL,25,4),(65,2,32,25,NULL,25,3),(66,2,32,25,NULL,25,2),(67,1,32,25,NULL,25,1); 38 | 39 | /*Table structure for table `t_color` */ 40 | 41 | DROP TABLE IF EXISTS `t_color`; 42 | 43 | CREATE TABLE `t_color` ( 44 | `col_id` int(11) NOT NULL AUTO_INCREMENT, 45 | `col_name` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, 46 | PRIMARY KEY (`col_id`) 47 | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 48 | 49 | /*Data for the table `t_color` */ 50 | 51 | insert into `t_color`(`col_id`,`col_name`) values (1,'红色'),(2,'黑色'),(3,'灰色'),(4,'黄色'),(5,'白色'); 52 | 53 | /*Table structure for table `t_hot` */ 54 | 55 | DROP TABLE IF EXISTS `t_hot`; 56 | 57 | CREATE TABLE `t_hot` ( 58 | `h_id` int(10) NOT NULL AUTO_INCREMENT, 59 | `h_p_id` int(10) DEFAULT NULL, 60 | PRIMARY KEY (`h_id`) 61 | ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 62 | 63 | /*Data for the table `t_hot` */ 64 | 65 | insert into `t_hot`(`h_id`,`h_p_id`) values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12),(13,13),(14,14),(15,15),(16,16),(17,17),(18,18),(19,19),(20,20),(21,21),(22,22),(23,23),(24,24),(25,25),(26,26),(27,27),(28,28),(29,29),(30,30),(31,31),(32,32); 66 | 67 | /*Table structure for table `t_m_product` */ 68 | 69 | DROP TABLE IF EXISTS `t_m_product`; 70 | 71 | CREATE TABLE `t_m_product` ( 72 | `p_mid` int(50) NOT NULL AUTO_INCREMENT, 73 | `p_sex_mid` int(50) DEFAULT NULL, 74 | `p_t_id` int(40) DEFAULT NULL, 75 | `p_s_id` int(50) DEFAULT NULL, 76 | `p_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, 77 | `p_newPrice` decimal(10,2) DEFAULT NULL, 78 | `p_indexSrc` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 79 | `p_infoSrcMin` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 80 | `p_infoSrcMid` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 81 | `p_infoSrcLar` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 82 | `p_infoIntro` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL, 83 | `p_comment` decimal(10,0) DEFAULT NULL, 84 | `p_amount` int(10) DEFAULT NULL, 85 | `p_sellAmount` int(10) DEFAULT NULL, 86 | `p_stock` int(10) DEFAULT NULL, 87 | PRIMARY KEY (`p_mid`) 88 | ) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 89 | 90 | /*Data for the table `t_m_product` */ 91 | 92 | insert into `t_m_product`(`p_mid`,`p_sex_mid`,`p_t_id`,`p_s_id`,`p_name`,`p_newPrice`,`p_indexSrc`,`p_infoSrcMin`,`p_infoSrcMid`,`p_infoSrcLar`,`p_infoIntro`,`p_comment`,`p_amount`,`p_sellAmount`,`p_stock`) values (88,1,1,1,' 美式拼接篮球鞋 男款','200.00','msn1.png','mi11,mi12,mi13,mi14,mi15,mi16','mc1',NULL,'这双鞋款在Chuck Taylor ALL STAR的基础上做了许多变化,延续CTAS的经典鞋头,采用拼接材质进行设计,内部加绒,是一双很具有风度的鞋款。高帮,人造革/纺织织物,枚红色。',NULL,NULL,NULL,NULL),(89,1,2,1,'季节图案印花长袖T恤 男款','300.00','msn2.png','mi21,mi22',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(90,1,2,1,'印花连帽拉链衫 男款','140.00','msn3.png','mi31,mi32',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(91,1,2,3,'印花连帽拉链衫 男款','650.00','msn4.png','mi41,mi42',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(92,1,2,3,' 印花连帽拉链衫 男款','760.00','msn5.png','mi51,mi52',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(93,1,2,3,' 印花连帽拉链衫 男款','909.00','msn6.png','mi61,mi62',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(94,1,2,3,'印花连帽拉链衫 男款','888.00','msn7.png','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(95,1,2,2,'印花连帽拉链衫 男款','666.00','msn8.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(96,1,2,1,'印花连帽拉链衫 男款','222.00','msn9.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(97,1,3,2,'撞色星星印花小挎包 中性','636.00','msn11.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(98,2,4,3,'精致羊皮拉链 女款','888.00','msu1.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(99,2,4,2,'精致羊皮拉链 女款','778.00','msu2.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(100,2,4,4,'精致羊皮拉链 女款','667.00','msu3.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(101,2,5,3,'拉链针织外套 女款','776.00','msu4.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(102,2,4,2,'精致羊皮拉链 女款','999.00','msu5.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(103,2,5,1,'拉链针织外套 女款','44.00','msu6.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(104,2,4,2,'精致羊皮拉链 女款','333.00','msu7.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(105,2,4,3,'精致羊皮拉链 女款','99.00','msu8.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(106,2,6,2,'迷彩图案平沿帽 中性','333.00','msu9.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(107,2,6,1,'迷彩图案平沿帽 中性','222.00','msu10.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); 93 | 94 | /*Table structure for table `t_m_type` */ 95 | 96 | DROP TABLE IF EXISTS `t_m_type`; 97 | 98 | CREATE TABLE `t_m_type` ( 99 | `t_id` int(50) NOT NULL AUTO_INCREMENT, 100 | `t_name` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, 101 | `t_src` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, 102 | `t_sex_id` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, 103 | PRIMARY KEY (`t_id`) 104 | ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 105 | 106 | /*Data for the table `t_m_type` */ 107 | 108 | insert into `t_m_type`(`t_id`,`t_name`,`t_src`,`t_sex_id`) values (1,'男的踩的','iHot1.png','1'),(2,'男的穿的','iHot2.png','1'),(3,'男的戴的','iHot6.png','1'),(4,'女的踩的','iHot4.png','2'),(5,'女的穿的','iHot5.png','2'),(6,'女的戴的','iHot3.png','2'); 109 | 110 | /*Table structure for table `t_newproduct` */ 111 | 112 | DROP TABLE IF EXISTS `t_newproduct`; 113 | 114 | CREATE TABLE `t_newproduct` ( 115 | `p_id` int(50) NOT NULL AUTO_INCREMENT, 116 | `p_t_id` int(50) DEFAULT NULL, 117 | `p_s_id` int(50) DEFAULT NULL, 118 | `p_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, 119 | `p_newPrice` decimal(10,2) DEFAULT NULL, 120 | `p_indexSrc` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 121 | `p_infoSrcMin` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 122 | `p_infoSrcMid` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 123 | `p_infoSrcLar` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 124 | `p_infoIntro` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL, 125 | `p_m_indexSrc` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL, 126 | `p_amount` int(10) DEFAULT NULL, 127 | `p_stock` int(10) DEFAULT NULL, 128 | `p_sex_id` int(10) DEFAULT NULL, 129 | `p_m_searchSrc` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL, 130 | `p_m_infoSrcLar` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL, 131 | `p_m_infoSrcMin` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL, 132 | PRIMARY KEY (`p_id`) 133 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 134 | 135 | /*Data for the table `t_newproduct` */ 136 | 137 | /*Table structure for table `t_product` */ 138 | 139 | DROP TABLE IF EXISTS `t_product`; 140 | 141 | CREATE TABLE `t_product` ( 142 | `p_id` int(11) NOT NULL AUTO_INCREMENT, 143 | `p_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, 144 | `p_price` decimal(10,2) DEFAULT NULL, 145 | `p_brand` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, 146 | `p_index_imgLIST` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 147 | `p_detail_imgDA` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 148 | `p_detail_imgXIAO` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 149 | `p_detail_imgINFO` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 150 | `p_detail_imgCHIMA` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 151 | `p_discountZHEKOU` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 152 | `p_intro_imgJIESHAO` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, 153 | `p_t_id` int(11) DEFAULT NULL, 154 | PRIMARY KEY (`p_id`) 155 | ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 156 | 157 | /*Data for the table `t_product` */ 158 | 159 | insert into `t_product`(`p_id`,`p_name`,`p_price`,`p_brand`,`p_index_imgLIST`,`p_detail_imgDA`,`p_detail_imgXIAO`,`p_detail_imgINFO`,`p_detail_imgCHIMA`,`p_discountZHEKOU`,`p_intro_imgJIESHAO`,`p_t_id`) values (1,'Shapeless休闲 时尚 质感布裤收腿型','499.00','shapeless','list1.jpg','infoda1.jpg@infoda2.jpg','infoxiao1.jpg@infoxiao2.jpg','zhekou1.jpg','small.jpg','【优品推介】满¥799享7.8折@【优品推介】满¥499享8.8折@【全场99元加价购】@【全场59元加价购】@【全场39元加价购】','zhanshib (1).jpg@zhanshib (2).jpg@zhanshib (3).jpg@zhanshib (4).jpg@zhanshib (5).jpg@zhanshib (6).jpg@zhanshib (7).jpg@zhanshib (8).jpg',6),(2,'ShapelesS 时尚 质感 修身 英伦丝光长裤','329.00','shapeless','shop3-LIST.jpg','SHP3info1DA.jpg@SHP3info2DA.jpg@SHP3info3DA.jpg','SHP3info1XIAO.jpg@SHP3info2XIAO.jpg@SHP3info3XIAO.jpg','zhekou1.jpg','shop3small.jpg','【优品推介】满¥799享7.8折@【优品推介】满¥499享8.8折@【全场99元加价购】@【全场59元加价购】@【全场39元加价购】','BOT-LIST (1).jpg@BOT-LIST (2).jpg@BOT-LIST (3).jpg@BOT-LIST (4).jpg@BOT-LIST (5).jpg@BOT-LIST (6).jpg@BOT-LIST (7).jpg@BOT-LIST (8).jpg@BOT-LIST (9).jpg@BOT-LIST (10).jpg@BOT-LIST (11).jpg@BOT-LIST (12).jpg@',6),(3,'Wuss机车眼镜 时尚 007同款','1200.00','Wuss','shop4LIST.jpg','shop4info1DA.jpg@shop4info2DA.jpg','shop4info1XIAO.jpg@shop4info2XIAO.jpg','zhekou1.jpg','shop4SMALL.jpg','【优品推介】满¥799享7.8折@【优品推介】满¥499享8.8折@【全场99元加价购】@【全场59元加价购】@【全场39元加价购】','SHOP4zhanshi (1).jpg@SHOP4zhanshi (2).jpg@SHOP4zhanshi (3).jpg@SHOP4zhanshi (4).jpg@SHOP4zhanshi (5).jpg@SHOP4zhanshi (6).jpg',9),(4,'Shapeless 时尚 双肩背包 漆皮','280.00','Shapeless','shop5LIST .jpg','shop5infoDA (1).jpg@shop5infoDA (2).jpg','shop5infoXIAO (1).jpg@shop5infoXIAO (2).jpg','zhekou1.jpg','shop5SMALL.jpg','【优品推介】满¥799享7.8折@【优品推介】满¥499享8.8折@【全场99元加价购】@【全场59元加价购】@【全场39元加价购】','sh5zhanshi (1).jpg@sh5zhanshi (2).jpg@sh5zhanshi (3).jpg@sh5zhanshi (4).jpg@sh5zhanshi (5).jpg@sh5zhanshi (6).jpg@sh5zhanshi (7).jpg@',9),(5,'Shapeless 男士纯色立体剪裁夹克 ','629.00','shapeless','shop6LIST.jpg','SHOP6DA (1).jpg@SHOP6DA (2).jpg','SHOP6XIAO (1).jpg@SHOP6XIAO (2).jpg','SH6zhekou.jpg','SHOP6small.jpg',NULL,'sh6BOTTOM (1).jpg@sh6BOTTOM (2).jpg@sh6BOTTOM (3).jpg@sh6BOTTOM (4).jpg@sh6BOTTOM (5).jpg@sh6BOTTOM (6).jpg',1),(6,'adidasOriginals 5 PANEL CAP RUN 棒球帽','279.00','adidas Originals','shop7LIST.jpg','SH7DA1.jpg','SH7XIAO1.jpg','SH7zhekou.jpg','SHOP7small.jpg',NULL,'SH7bottom (1).jpg@SH7bottom (2).jpg@SH7bottom (3).jpg@SH7bottom (4).jpg',9),(7,'adidasOriginals TUBULAR RUNNER 运动鞋 ','1299.00','adidas Originals','sh8LIST.jpg','sh8DA.jpg','sh8XIAO.jpg','SH7zhekou.jpg','SH8SMALL.jpg',NULL,'SH8BOTT (1).jpg@SH8BOTT (2).jpg@SH8BOTT (3).jpg@SH8BOTT (4).jpg',10),(8,'WUSSA舞时 探索系列波浪纹理男表 ','2899.00','WUSSA舞时','sh9LIST2.jpg','sh9DA (1).jpg@sh9DA (2).jpg','SH9xiao (1).jpg@SH9xiao (2).jpg','SH7zhekou.jpg','sh9small.jpg',NULL,'shop9BOTTOM (1).jpg@shop9BOTTOM (2).jpg@shop9BOTTOM (3).jpg@shop9BOTTOM (4).jpg@shop9BOTTOM (5).jpg@shop9BOTTOM (6).jpg@shop9BOTTOM (7).jpg@shop9BOTTOM (8).jpg@shop9BOTTOM (9).jpg@shop9BOTTOM (10).jpg@shop9BOTTOM (11).jpg@shop9BOTTOM (12).jpg@shop9BOTTOM (13).jpg@shop9BOTTOM (14).jpg',9),(9,'WUSSA舞时 时尚休闲腕表 ','14500.00','WUSSA舞时','SH10LIST.jpg','SH10DA1 (1).jpg@SH10DA1 (2).jpg','SH10XIAO1 (1).jpg@SH10XIAO1 (2).jpg','SH10ZHEKOU.jpg','SH10small.jpg',NULL,'SH10bottom (1).jpg@SH10bottom (2).jpg@SH10bottom (3).jpg@SH10bottom (4).jpg@SH10bottom (5).jpg@SH10bottom (6).jpg@SH10bottom (7).jpg@SH10bottom (8).jpg@',9); 160 | 161 | /*Table structure for table `t_sale` */ 162 | 163 | DROP TABLE IF EXISTS `t_sale`; 164 | 165 | CREATE TABLE `t_sale` ( 166 | `s_id` int(11) NOT NULL AUTO_INCREMENT, 167 | `s_p_id` int(11) DEFAULT NULL, 168 | PRIMARY KEY (`s_id`) 169 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 170 | 171 | /*Data for the table `t_sale` */ 172 | 173 | /*Table structure for table `t_shopcar` */ 174 | 175 | DROP TABLE IF EXISTS `t_shopcar`; 176 | 177 | CREATE TABLE `t_shopcar` ( 178 | `sc_id` int(11) NOT NULL AUTO_INCREMENT, 179 | `sc_u_id` int(11) DEFAULT NULL, 180 | `sc_p_id` int(11) DEFAULT NULL, 181 | `sc_count` int(11) DEFAULT NULL, 182 | `sc_size` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, 183 | PRIMARY KEY (`sc_id`) 184 | ) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 185 | 186 | /*Data for the table `t_shopcar` */ 187 | 188 | insert into `t_shopcar`(`sc_id`,`sc_u_id`,`sc_p_id`,`sc_count`,`sc_size`) values (134,5,3,NULL,NULL),(135,5,2,NULL,NULL),(136,5,5,NULL,NULL),(137,NULL,9,2,'L'),(139,NULL,8,3,'XL'),(142,1,8,52,'L'),(143,NULL,7,2,'M'),(145,5,6,NULL,NULL),(146,1,2,2,'M'),(147,12,2,1,'L'),(148,13,2,2,'L'),(151,15,2,1,'XL'); 189 | 190 | /*Table structure for table `t_type` */ 191 | 192 | DROP TABLE IF EXISTS `t_type`; 193 | 194 | CREATE TABLE `t_type` ( 195 | `t_id` int(11) NOT NULL AUTO_INCREMENT, 196 | `t_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, 197 | PRIMARY KEY (`t_id`) 198 | ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 199 | 200 | /*Data for the table `t_type` */ 201 | 202 | insert into `t_type`(`t_id`,`t_name`) values (1,'外套'),(2,'风衣'),(3,'衬衫'),(4,'针织衫'),(5,'T恤'),(6,'休闲裤'),(7,'牛仔裤'),(8,'短裤'),(9,'饰品'),(10,'鞋子'); 203 | 204 | /*Table structure for table `t_user` */ 205 | 206 | DROP TABLE IF EXISTS `t_user`; 207 | 208 | CREATE TABLE `t_user` ( 209 | `u_id` int(11) NOT NULL AUTO_INCREMENT, 210 | `u_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, 211 | `u_pwd` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, 212 | PRIMARY KEY (`u_id`) 213 | ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 214 | 215 | /*Data for the table `t_user` */ 216 | 217 | insert into `t_user`(`u_id`,`u_name`,`u_pwd`) values (5,'13422222222','Jia_luo1234'),(6,'15008251081','JIAjia_123'),(7,'18328720723','JIAjia_1234'),(8,'13111111111','Aa_111111'),(9,'13222222222','ABCabc_123'),(10,'13333333333','ABCabc_123'),(11,'13444444444','ABCabc_123'),(12,'13200000000','jiaJIA_1234'),(13,'13200000001','jiaJIA_1234'),(15,'13422222221','quQU_123'),(16,'15982125563','123_jiaJIA'); 218 | 219 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 220 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 221 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 222 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 223 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 65 | 66 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | true 78 | 79 | 80 | $PROJECT_DIR$/gulpfile.js 81 | 82 | 83 | DEFINITION_ORDER 84 | 85 | 86 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 112 | 113 | 116 | 117 | 118 | 119 | 122 | 123 | 126 | 127 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | project 189 | 190 | 191 | true 192 | 193 | 194 | 195 | DIRECTORY 196 | 197 | false 198 | 199 | 200 | 201 | 202 | 204 | 205 | 206 | 207 | 1489741036887 208 | 213 | 214 | 215 | 216 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 245 | 246 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | -------------------------------------------------------------------------------- /public/js/outerPlugin/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); --------------------------------------------------------------------------------