├── .gitattributes ├── .gitignore ├── .idea ├── .name ├── encodings.xml ├── interest.iml ├── jsLibraryMappings.xml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── CmsProject ├── .idea │ └── .name ├── browser │ ├── add.html │ ├── css │ │ ├── add.css │ │ ├── base.css │ │ ├── bootstrap.min.css │ │ ├── font-awesome.min.css │ │ ├── index.css │ │ ├── login.css │ │ ├── personal.css │ │ ├── search.css │ │ └── update.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── imgs │ │ ├── bg.jpg │ │ ├── bg2.jpeg │ │ ├── bg2.png │ │ └── center.png │ ├── index.html │ ├── js │ │ ├── bootstrap.min.js │ │ ├── cancel.js │ │ ├── checkSession.js │ │ ├── formCheck.js │ │ ├── getdata.js │ │ └── jquery.min.js │ ├── login.html │ ├── personal.html │ ├── regist.html │ ├── search.html │ └── update.html └── server │ ├── add.php │ ├── cancel.php │ ├── change.php │ ├── check.php │ ├── conn.php │ ├── del.php │ ├── getdata.php │ ├── personal.php │ ├── regist.php │ ├── search.php │ ├── sessionCheck.php │ ├── update.php │ └── update2.php ├── O2Oweb ├── .idea │ └── encodings.xml ├── css │ ├── bootstrap.min.css │ ├── index.css │ ├── login.css │ ├── order.css │ └── personal.css ├── imgs │ ├── banner-index.jpg │ ├── bg1-index.jpg │ ├── bg2-index.jpg │ ├── error.png │ ├── jstar-modern.png │ ├── person-ico.png │ ├── slide-index.jpg │ ├── slide1-index.jpg │ ├── slide2-index .jpg │ ├── slide3-index.jpg │ ├── slide4-index.jpg │ ├── start.png │ └── success.png ├── index.html ├── js │ ├── bootstrap.min.js │ ├── jquery-stars.js │ ├── jquery.min.js │ └── vue.js ├── login.html ├── order.html ├── personal.html ├── register.html └── service │ ├── conn.php │ ├── login.php │ ├── signin.php │ └── test.sql ├── README.md ├── _config.yml ├── api ├── app.js ├── bin │ └── www ├── config │ └── mongoose.js ├── musics │ ├── 001.mp3 │ ├── 002.mp3 │ ├── 003.mp3 │ ├── 004.mp3 │ ├── 005.mp3 │ ├── 006.mp3 │ ├── 007.mp3 │ ├── 008.mp3 │ ├── 009.mp3 │ ├── 010.mp3 │ ├── 听海-青花瓷竹笛.mp3 │ ├── 宫崎骏-Always With Me.mp3 │ ├── 汪苏泷-你让我懂.mp3 │ ├── 筷子兄弟 - 小苹果 - Ktv版伴奏.mp3 │ ├── 网络歌手-石进 - 夜的钢琴曲 - 九 原创作品.mp3 │ ├── 萨克斯-我心永恒.mp3 │ └── 麦振鸿-恨爱交加.mp3 ├── package.json ├── pics │ ├── 001.jpg │ ├── 002.jpg │ ├── 003.jpg │ ├── 004.jpg │ ├── 005.jpg │ ├── 006.jpg │ └── pic1.jpg ├── public │ └── stylesheets │ │ ├── bootstrap.min.css │ │ └── style.css ├── routes │ ├── index.js │ └── users.js └── views │ └── index.html ├── booksystem ├── add.html ├── add.php ├── add1.php ├── conn.php ├── css │ └── bootstrap.min.css ├── del.php ├── del1.php ├── index.html ├── index.php ├── index1.php ├── js │ ├── bootstrap.min.js │ ├── index.js │ └── jquery.min.js ├── search.html └── search.php ├── cloudMusic ├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build │ ├── build.js │ ├── check-versions.js │ ├── dev-client.js │ ├── dev-server.js │ ├── utils.js │ ├── vue-loader.conf.js │ ├── webpack.base.conf.js │ ├── webpack.dev.conf.js │ └── webpack.prod.conf.js ├── config │ ├── dev.env.js │ ├── index.js │ └── prod.env.js ├── index.html ├── package.json ├── src │ ├── App.vue │ ├── assets │ │ ├── imgs │ │ │ ├── 768.png │ │ │ ├── bg1.jpg │ │ │ ├── bg2.jpg │ │ │ ├── bg3.png │ │ │ ├── btn.png │ │ │ ├── btn1.png │ │ │ └── btn2.png │ │ └── musics │ │ │ ├── 001.mp3 │ │ │ ├── 听海-青花瓷竹笛.mp3 │ │ │ ├── 宫崎骏-Always With Me.mp3 │ │ │ ├── 林俊杰-一眼万年.mp3 │ │ │ ├── 林俊杰-江南.mp3 │ │ │ ├── 汪苏泷-你让我懂.mp3 │ │ │ ├── 王菲-匆匆那年(电影《匆匆那年》同名主题曲).mp3 │ │ │ ├── 石进-夜的钢琴曲五.mp3 │ │ │ ├── 笛子-倾世皇妃 配乐.mp3 │ │ │ ├── 笛子-情深深雨蒙蒙、情深深雨蒙蒙曲.mp3 │ │ │ ├── 笛子-爱江山更爱美人.mp3 │ │ │ ├── 筷子兄弟 - 小苹果 - Ktv版伴奏.mp3 │ │ │ ├── 纯音乐-故乡的原风景.mp3 │ │ │ ├── 网络歌手-石进 - 夜的钢琴曲 - 九 原创作品.mp3 │ │ │ ├── 萨克斯-我心永恒.mp3 │ │ │ ├── 钢琴-Kiss The Rain.mp3 │ │ │ ├── 魏新雨-恋人心.mp3 │ │ │ └── 麦振鸿-恨爱交加.mp3 │ ├── components │ │ ├── ranking_list │ │ │ └── ranking_list.vue │ │ ├── recommend │ │ │ └── recommend.vue │ │ ├── song_list │ │ │ └── song_list.vue │ │ └── station │ │ │ └── station.vue │ ├── main.js │ ├── router │ │ └── index.js │ └── store │ │ └── store.js └── static │ └── .gitkeep ├── message_board ├── app.js ├── bin │ └── www ├── config │ ├── config.js │ └── mongoose.js ├── node_modules │ ├── .bin │ │ ├── jade │ │ └── jade.cmd │ ├── .npminstall.done │ ├── .package_versions.json │ └── .recently_updates.txt ├── package.json ├── public │ ├── javascripts │ │ ├── bootstrap.min.js │ │ └── jquery.min.js │ └── stylesheets │ │ ├── bootstrap.min.css │ │ └── style.css ├── routes │ ├── index.js │ └── users.js └── views │ ├── error.jade │ ├── index.html │ ├── index.jade │ └── layout.jade ├── personalHomePage ├── .idea │ ├── .name │ ├── encodings.xml │ ├── html5网站设计作业(郭爱华).iml │ ├── misc.xml │ ├── modules.xml │ ├── scopes │ │ └── scope_settings.xml │ ├── vcs.xml │ └── workspace.xml ├── Memery.html ├── css │ ├── base.css │ ├── index.css │ ├── memery.css │ ├── person.css │ ├── seasons.css │ └── time.css ├── imgs │ ├── 1.jpg │ ├── 10.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.jpg │ ├── 9.jpg │ ├── autumu.jpg │ ├── bg.jpg │ ├── bg10.jpg │ ├── bg11.jpg │ ├── bg12.jpg │ ├── bg13.jpg │ ├── bg14.jpg │ ├── bg15.jpg │ ├── bg16.jpg │ ├── bg2.jpg │ ├── bg3.jpg │ ├── bg4.jpg │ ├── bg5.jpg │ ├── bg6.jpg │ ├── bg7.jpg │ ├── bg8.jpg │ ├── bg9.jpg │ ├── icon.png │ ├── logo.png │ ├── next.png │ ├── prev.png │ ├── psb (1).jpg │ ├── psb (2).jpg │ ├── psb (3).jpg │ ├── psb (4).jpg │ ├── psb (5).jpg │ ├── psb (6).jpg │ ├── psb (7).jpg │ ├── psb (8).jpg │ ├── psb.jpg │ ├── spring.jpg │ ├── summer.jpg │ ├── winter.jpg │ └── xuehua.png ├── index.html ├── js │ ├── animate.js │ ├── click.js │ ├── donghua.js │ └── slider.js ├── personshow.html ├── seasons.html └── time.html ├── spider ├── spider_1 │ ├── app.js │ └── package.json └── splier │ ├── app.js │ ├── bin │ └── www │ ├── package.json │ ├── public │ └── stylesheets │ │ └── style.css │ ├── routes │ ├── index.js │ └── users.js │ └── views │ ├── error.jade │ ├── index.jade │ └── layout.jade ├── waterfall ├── README ├── css.css ├── imgs │ ├── 0.jpg │ ├── 1.jpg │ ├── 10.jpg │ ├── 11.jpg │ ├── 12.jpg │ ├── 13.jpg │ ├── 14.jpg │ ├── 15.jpg │ ├── 16.jpg │ ├── 17.jpg │ ├── 18.jpg │ ├── 19.jpg │ ├── 2.jpg │ ├── 20.jpg │ ├── 21.jpg │ ├── 22.jpg │ ├── 23.jpg │ ├── 24.jpg │ ├── 25.jpg │ ├── 26.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.jpg │ ├── 9.jpg │ └── bg.png ├── index.html └── js │ └── script.js ├── websocket ├── app.js ├── bin │ └── www ├── config │ └── mongoose.js ├── node_modules │ ├── .bin │ │ ├── jade │ │ └── jade.cmd │ ├── .npminstall.done │ ├── .package_versions.json │ └── .recently_updates.txt ├── package.json ├── public │ ├── images │ │ ├── bg1.jpg │ │ ├── bg2.jpg │ │ └── bg3.jpg │ ├── index.html │ ├── javascripts │ │ ├── bootstrap.min.js │ │ └── jquery.min.js │ └── stylesheets │ │ ├── bootstrap.min.css │ │ ├── index.css │ │ └── style.css ├── routes │ ├── index.js │ └── users.js └── views │ ├── error.jade │ ├── index.jade │ └── layout.jade └── zming ├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── dev-client.js ├── dev-server.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js └── prod.env.js ├── index.html ├── package.json ├── src ├── App.vue ├── components │ ├── article.vue │ ├── contact.vue │ ├── home.vue │ ├── person.vue │ └── project.vue ├── main.js └── router │ └── index.js └── static ├── .gitkeep ├── css └── bootstrap.min.css ├── fonts ├── email.svg ├── location.svg └── phone.svg ├── imgs ├── 22.png ├── 39.png ├── 45.png ├── arrows.png ├── bg.png ├── block1.jpg ├── block2.jpg ├── block3.jpg ├── block4.jpg ├── block5.jpg ├── block6.jpg ├── borders1.png ├── boxs.jpg ├── jstar-modern.png ├── moon.png ├── music-fly.png ├── project.jpg ├── propic1.png ├── propic2.png ├── propic3.png ├── propic4.png ├── propic5.png ├── propic6.png ├── star.png ├── stars.png ├── winnower-bottom.png └── winnower.png └── javascript ├── bootstrap.min.js ├── jquery-stars.js └── jquery.min.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | *.xml 8 | *.iml 9 | # Recycle Bin used on file shares 10 | $RECYCLE.BIN/ 11 | 12 | # Windows Installer files 13 | *.cab 14 | *.msi 15 | *.msm 16 | *.msp 17 | 18 | O2Oweb/Font-Awesome 19 | ��ҳ��Ŀ/Font-Awesome 20 | 21 | # Windows shortcuts 22 | *.lnk 23 | 24 | # ========================= 25 | # Operating System Files 26 | # ========================= 27 | 28 | # OSX 29 | # ========================= 30 | 31 | .DS_Store 32 | .AppleDouble 33 | .LSOverride 34 | 35 | # Thumbnails 36 | ._* 37 | 38 | # Files that might appear on external disk 39 | .Spotlight-V100 40 | .Trashes 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | jqery/exercise-one/index.html 49 | .idea/workspace.xml 50 | 51 | 52 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | interest -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/interest.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CmsProject/.idea/.name: -------------------------------------------------------------------------------- 1 | CmsProject -------------------------------------------------------------------------------- /CmsProject/browser/css/add.css: -------------------------------------------------------------------------------- 1 | .wrap { 2 | width: 80%; 3 | margin: 0 auto; 4 | margin-top: 20px; 5 | } -------------------------------------------------------------------------------- /CmsProject/browser/css/base.css: -------------------------------------------------------------------------------- 1 | html,body{ 2 | width: 100%; 3 | height:100%; 4 | } 5 | * { 6 | margin: 0; 7 | padding: 0; 8 | } 9 | body { 10 | background: url("../imgs/bg2.png") -220px 0px no-repeat; 11 | height: auto; 12 | } 13 | .session { 14 | padding-top: 15px; 15 | padding-right: 10px; 16 | color: #9d9d9d; 17 | } -------------------------------------------------------------------------------- /CmsProject/browser/css/index.css: -------------------------------------------------------------------------------- 1 | 2 | .wrap { 3 | width: 80%; 4 | margin: 0 auto; 5 | } 6 | .fenye span{ 7 | cursor: pointer; 8 | } -------------------------------------------------------------------------------- /CmsProject/browser/css/login.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | } 4 | body { 5 | background-image: url(../imgs/bg.jpg); 6 | height: auto; 7 | transform-origin: center top 0px; 8 | } 9 | .center { 10 | width: 600px; 11 | height: 460px; 12 | margin-left: auto; 13 | margin-right: auto; 14 | background-image: url(../imgs/center.png); 15 | background-position: 53% 56%; 16 | padding-top: 12%; 17 | background-size: 170% 150%; 18 | } 19 | input { 20 | width: 42%; 21 | height: 2.7em; 22 | background-color: rgba(224, 227, 232, 0.11); 23 | border-radius: 5px; 24 | opacity: 1; 25 | margin-left: 23.6%; 26 | font-size: 16px; 27 | padding-left: 8%; 28 | line-height: 2.7em; 29 | } 30 | span { 31 | display: block; 32 | height: 2em; 33 | line-height: 2em; 34 | width: 35%; 35 | margin-left: 30%; 36 | } 37 | 38 | .login{ 39 | width: 25%; 40 | height: 2em; 41 | font-size: 20px; 42 | margin-left: 1%; 43 | background-color: #4c7c97; 44 | color: #95b9b8; 45 | border-radius: 5px; 46 | } 47 | .regist{ 48 | width: 25%; 49 | height: 2em; 50 | font-size: 20px; 51 | margin-left: 23.6%; 52 | background-color: #4c7c97; 53 | color: #95b9b8; 54 | border-radius: 5px; 55 | } 56 | 57 | .formOne { 58 | position: relative; 59 | } 60 | 61 | .fa { 62 | position: absolute; 63 | left: 150px; 64 | } 65 | .fa-user { 66 | top: 5px; 67 | } 68 | .fa-key{ 69 | top: 85px; 70 | } 71 | 72 | .fa-qq { 73 | top: 165px; 74 | left: 145px; 75 | } 76 | 77 | .welcomText { 78 | margin-bottom: 5%; 79 | margin-left: 26%; 80 | font-size: 20px; 81 | } -------------------------------------------------------------------------------- /CmsProject/browser/css/personal.css: -------------------------------------------------------------------------------- 1 | #formSix .col-md-5{ 2 | margin-top: 6px; 3 | } -------------------------------------------------------------------------------- /CmsProject/browser/css/search.css: -------------------------------------------------------------------------------- 1 | .wrap { 2 | width: 80%; 3 | margin: 0 auto ; 4 | margin-top: 20px; 5 | } 6 | .seaform { 7 | margin-bottom: 10px; 8 | } 9 | -------------------------------------------------------------------------------- /CmsProject/browser/css/update.css: -------------------------------------------------------------------------------- 1 | .wrap { 2 | margin: 0 auto; 3 | margin-top: 20px; 4 | } -------------------------------------------------------------------------------- /CmsProject/browser/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /CmsProject/browser/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /CmsProject/browser/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /CmsProject/browser/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /CmsProject/browser/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /CmsProject/browser/imgs/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/imgs/bg.jpg -------------------------------------------------------------------------------- /CmsProject/browser/imgs/bg2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/imgs/bg2.jpeg -------------------------------------------------------------------------------- /CmsProject/browser/imgs/bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/imgs/bg2.png -------------------------------------------------------------------------------- /CmsProject/browser/imgs/center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/CmsProject/browser/imgs/center.png -------------------------------------------------------------------------------- /CmsProject/browser/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 管理主页 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 33 |
34 | 35 |
36 |
37 | 前一页 38 | 39 | 下一页 40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /CmsProject/browser/js/cancel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by sun-gah on 2017/7/4. 3 | */ 4 | $(function () { 5 | $("#cancel").click(function(){ 6 | $.ajax({ 7 | type:'POST', 8 | url:'../server/cancel.php', 9 | success: function (data) { 10 | alert(data); 11 | } 12 | }); 13 | }); 14 | }); -------------------------------------------------------------------------------- /CmsProject/browser/js/checkSession.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by sun-gah on 2017/7/2. 3 | */ 4 | $(function () { 5 | $.ajax({ 6 | type:'POST', 7 | url:'../server/sessionCheck.php', 8 | async:false, 9 | success:function(data){ 10 | if(data==2){ 11 | alert("请先登录!"); 12 | location.href="./login.html"; 13 | }else{ 14 | console.log(data); 15 | sessionName=data; 16 | $("#showSession").html("欢迎你!"+sessionName); 17 | } 18 | } 19 | }); 20 | }); -------------------------------------------------------------------------------- /CmsProject/browser/js/formCheck.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by gah on 2017/7/3. 3 | */ 4 | 5 | /** 6 | * 7 | * 默认:id 8 | * 表单名称:form(可更改) 9 | * 用户名:user 10 | * 密码:password 11 | * 电话号码:phoneNum 12 | * QQ:qq 13 | * 14 | */ 15 | 16 | $(function () { 17 | 18 | var num=0; 19 | //对表格的input 进行失去焦点遍历验证合理性 20 | $("#formOne :input").blur(function(){ 21 | //分别进行匹配 22 | //用户名进行验证 规则:中文或者大小写字母数字 23 | 24 | 25 | if($(this).is("#user")){ 26 | let re=/[\w\u4e00-\u9fa5]/g; 27 | if(re.test(this.value)){ 28 | $("#span_user").html("用户名验证通过"); 29 | num++; 30 | console.log(num); 31 | }else{ 32 | $("#span_user").html("请输入合法用户名"); 33 | } 34 | } 35 | //密码验证 规则:只能为数字字母大小写且不少于6位 36 | if($(this).is("#password")){ 37 | let re=/[\w]{6}/g; 38 | if(re.test(this.value)){ 39 | $("#span_password").html("密码验证通过"); 40 | num++; 41 | console.log(num); 42 | }else{ 43 | $("#span_password").html("请输入字母数字切不少于六位"); 44 | } 45 | } 46 | // qq号码验证 规则:只能为数字 47 | if($(this).is("#qq")){ 48 | let re=/^[1-9][0-9]+/g; 49 | if(re.test(this.value)){ 50 | $("#span_qq").html("qq验证通过"); 51 | num++; 52 | console.log(num); 53 | }else{ 54 | $("#span_qq").html("只能为数字"); 55 | } 56 | } 57 | // 电话号码验证 规则: 只能为11位数字 58 | if($(this).is("#phoneNum")){ 59 | let re=/^[1-9][0-9]{10}/g; 60 | if(re.test(this.value)){ 61 | $("#span_phoneNum").html("手机验证通过"); 62 | num++; 63 | console.log(num); 64 | }else{ 65 | $("#span_phoneNum").html("请输入11位手机号码"); 66 | } 67 | } 68 | 69 | if(num==$("#formOne :input").length){ 70 | console.log(flag); 71 | flag=true; 72 | console.log(num); 73 | console.log(flag); 74 | } 75 | }); 76 | }); -------------------------------------------------------------------------------- /CmsProject/browser/js/getdata.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by sun-gah on 2017/6/28. 3 | */ 4 | $(function(){ 5 | var p={"p":1}; 6 | getData(p); 7 | $(".pre").click(function(){ 8 | if (p.p>1) { 9 | p.p--; 10 | getData(p); 11 | console.log(p); 12 | }else{ 13 | p.p=1; 14 | getData(p); 15 | console.log(p); 16 | } 17 | }); 18 | 19 | $(".next").click(function(){ 20 | p.p++; 21 | getData(p); 22 | console.log(p); 23 | }); 24 | }); 25 | 26 | function getData(p){ 27 | $.ajax({ 28 | type:'post', 29 | url:'../server/getdata.php', 30 | cache:false, 31 | data:p, 32 | datatype:'json', 33 | success:function(data){ 34 | /*console.log(data);*/ 35 | /* console.log("ceshi");*/ 36 | var str=JSON.parse(data); 37 | var reshtml='编号 名称 类型 价格 数量 '; 38 | $.each(str,function(index,content){ 39 | reshtml+=''+content.id+''+content.name+''+content.type+''+content.pirce+''+content.number+''; 40 | }); 41 | $('#showt').html( 42 | reshtml 43 | ); 44 | } 45 | }); 46 | } 47 | -------------------------------------------------------------------------------- /CmsProject/browser/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登陆界面 6 | 7 | 8 | 9 | 10 |
11 |

欢迎登录实验室元件管理系统

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /CmsProject/browser/regist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 注册 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
31 | 64 | 65 | -------------------------------------------------------------------------------- /CmsProject/server/add.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/cancel.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/change.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /CmsProject/server/check.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/conn.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/del.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/getdata.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/personal.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/regist.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/search.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/sessionCheck.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/update.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CmsProject/server/update2.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /O2Oweb/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /O2Oweb/css/order.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin:0; 3 | padding:0; 4 | } 5 | 6 | .header { 7 | min-width: 1300px; 8 | height: 60px; 9 | background-color: #99cccc; 10 | } 11 | 12 | .nav1 { 13 | width: 90%; 14 | height: 60px; 15 | margin: 0 auto; 16 | font-size: 20px; 17 | } 18 | .wrap { 19 | width: 80%; 20 | margin: 50px auto; 21 | } 22 | 23 | .tab-content { 24 | margin-top:20px; 25 | } 26 | .tab-content th { 27 | text-align: center; 28 | } 29 | 30 | .ws th:nth-child(1) {width: 35%} 31 | .ws th:nth-child(2) {width: 16.25%} 32 | .ws th:nth-child(3) {width: 16.25%} 33 | .ws th:nth-child(4) {width: 16.25%} 34 | .ws th:nth-child(5) {width: 16.25%} 35 | 36 | .banner p { 37 | float: left; 38 | line-height: 50px; 39 | } 40 | .clear { 41 | clear: both; 42 | } 43 | 44 | #nav-tabs { 45 | width: 600px; 46 | float: right; 47 | border-bottom: none; 48 | font-size: 20px; 49 | font-family: "STSong", STXingkai, FangSong; 50 | color: #9d9d9d; 51 | } 52 | .footer { 53 | position: fixed; 54 | bottom: 20px; 55 | width: 80%; 56 | left: 50%; 57 | margin-left: -40%; 58 | text-align: center; 59 | color: #000000; 60 | font-size: 20px; 61 | } 62 | 63 | #form-center { 64 | width: 80%; 65 | margin-left: 20px; 66 | } 67 | .form-group input { 68 | width: 400px; 69 | height: 30px; 70 | padding-left: 10px; 71 | } -------------------------------------------------------------------------------- /O2Oweb/css/personal.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin:0; 3 | padding:0; 4 | } 5 | 6 | .header { 7 | min-width: 1300px; 8 | height: 60px; 9 | background-color: #99cccc; 10 | } 11 | 12 | body { 13 | /* background: url("../imgs/b1.png");*/ 14 | font-size: 20px; 15 | font-family: "STSong", STXingkai, FangSong; 16 | } 17 | .tabs-left > .nav-tabs { 18 | /* background-color: #9d9d9d;*/ 19 | } 20 | 21 | .tab-content > .tab-pane 22 | { 23 | display: none; 24 | } 25 | 26 | .tab-content > .active 27 | { 28 | display: block; 29 | } 30 | .tabs-left > .nav-tabs > li 31 | { 32 | float: none; 33 | margin-bottom: -1px; 34 | } 35 | 36 | .tabs-left > .nav-tabs > li > a { 37 | min-width: 74px; 38 | margin-right: 0; 39 | margin-bottom: 3px; 40 | border: none; 41 | text-align: center; 42 | line-height: 40px; 43 | display: block; 44 | } 45 | 46 | .nav-tabs span { 47 | display: block; 48 | width: 150px; 49 | height: 150px;; 50 | border-radius: 75px; 51 | background: url("../imgs/person-ico.png"); 52 | border: 1px solid deepskyblue; 53 | margin-left: 10px; 54 | } 55 | 56 | 57 | .tabs-left > .nav-tabs { 58 | float: left; 59 | margin-right: 19px; 60 | /* border-right: 1px solid #ddd;*/ 61 | border: none; 62 | width:15%; 63 | } 64 | 65 | .tabs-left > .nav-tabs > li > a { 66 | width: 100%; 67 | height: 60px; 68 | } 69 | .tabs-left > .nav-tabs >li:nth-child(1)>a { 70 | height: 250px; 71 | } 72 | 73 | .tabs-left > .nav-tabs > li > a:hover, 74 | .tabs-left > .nav-tabs > li > a:focus { 75 | border: none; 76 | } 77 | 78 | .wrap { 79 | margin: 50px auto; 80 | width: 80%; 81 | /* border: 1px solid #cccccc;*/ 82 | overflow: hidden; 83 | } 84 | 85 | /* 右边部分*/ 86 | .container { 87 | width: 80%; 88 | margin-left: 20%; 89 | margin-right: 0; 90 | } 91 | 92 | .col-sm-3 { 93 | height: 684px; 94 | /* background: greenyellow;*/ 95 | } 96 | .col-1,.col-2,.col-3,.col-4 { 97 | height: 25%; 98 | } 99 | .panel-title img { 100 | height: 100px; 101 | width: 100%; 102 | } -------------------------------------------------------------------------------- /O2Oweb/imgs/banner-index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/banner-index.jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/bg1-index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/bg1-index.jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/bg2-index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/bg2-index.jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/error.png -------------------------------------------------------------------------------- /O2Oweb/imgs/jstar-modern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/jstar-modern.png -------------------------------------------------------------------------------- /O2Oweb/imgs/person-ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/person-ico.png -------------------------------------------------------------------------------- /O2Oweb/imgs/slide-index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/slide-index.jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/slide1-index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/slide1-index.jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/slide2-index .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/slide2-index .jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/slide3-index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/slide3-index.jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/slide4-index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/slide4-index.jpg -------------------------------------------------------------------------------- /O2Oweb/imgs/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/start.png -------------------------------------------------------------------------------- /O2Oweb/imgs/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/O2Oweb/imgs/success.png -------------------------------------------------------------------------------- /O2Oweb/register.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 用户注册 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /O2Oweb/service/conn.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /O2Oweb/service/login.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /O2Oweb/service/signin.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /O2Oweb/service/test.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.0.4 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- 主机: localhost 6 | -- 生成日期: 2017 年 06 月 04 日 15:17 7 | -- 服务器版本: 5.6.12-log 8 | -- PHP 版本: 5.4.12 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8 */; 18 | 19 | -- 20 | -- 数据库: `test` 21 | -- 22 | CREATE DATABASE IF NOT EXISTS `test` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; 23 | USE `test`; 24 | 25 | -- -------------------------------------------------------- 26 | 27 | -- 28 | -- 表的结构 `usermanagement` 29 | -- 30 | 31 | CREATE TABLE IF NOT EXISTS `usermanagement` ( 32 | `id` int(11) NOT NULL AUTO_INCREMENT, 33 | `loginname` varchar(50) NOT NULL, 34 | `password` varchar(50) NOT NULL, 35 | `username` text NOT NULL, 36 | `email` varchar(50) NOT NULL, 37 | `place` varchar(50) NOT NULL, 38 | `phonenumber` varchar(50) NOT NULL, 39 | PRIMARY KEY (`id`) 40 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; 41 | 42 | -- 43 | -- 转存表中的数据 `usermanagement` 44 | -- 45 | 46 | INSERT INTO `usermanagement` (`id`, `loginname`, `password`, `username`, `email`, `place`, `phonenumber`) VALUES 47 | (1, '郭爱华', '308232015', '再见时光', '', '', '13100695760'), 48 | (2, 'hua', '0', '华', 'email', 'place', 'phonenumber'), 49 | (3, '小', 'gah123', '颜', 'email', 'place', 'phonenumber'), 50 | (4, 'hua', 'asda', '阿达洒', 'email', 'place', 'phonenumber'), 51 | (5, '霞', 'AS', '小', 'email', 'place', 'phonenumber'), 52 | (6, '', '', '', '萨芬撒', '阿达洒', ''), 53 | (7, '凤', '32112', '琴', 'adsa', '很远', '13100899089'), 54 | (8, '郭', '123', '过', '', '', '12313131312'); 55 | 56 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 57 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 58 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 时隔一年多,在工作中得到了更多的沉淀,现在继续加油。期待与更多的小伙伴交流学习308232015qq/微信 2 | 3 | # 仓库项目简介 4 | 1.zming个人站 基于vue的单页面应用
5 | 2.websocket  用nodejs开发的网络聊天室
6 | 3.spider    网络爬虫
7 | 4.CmsProject、booksystem php后台的元件库管理系统
8 | 5.message——board mongodb分页管理
9 | 6.api  express框架api
10 | 7.O2Oweb  电商平台的模仿
11 | 8.personalHomePage 纪念萌新de第一个网站
12 | 9.waterfall 原生js开发的瀑布流
13 | 10.cloudMusic 基于vue的简单仿网易云 14 |
15 | # 重构开始: 16 | 1.vue全家桶重构第一个个人站。(2019-5-23) 17 | 新的仓库地址(仓库分开了):https://github.com/guoaihua/ziming 18 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate -------------------------------------------------------------------------------- /api/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var index = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | 11 | var app = express(); 12 | 13 | app.all('*',function (req,res,next) { 14 | res.header("Access-Control-Allow-Origin","*"); 15 | res.header("Access-Control-Allow-Headers","Content-Type"); 16 | next(); 17 | }); 18 | 19 | // view engine setup 20 | app.set('views', path.join(__dirname, 'views')); 21 | app.engine('.html',require('ejs').__express);//两个下划线 22 | app.set('view engine', 'html'); 23 | 24 | // uncomment after placing your favicon in /public 25 | //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); 26 | app.use(logger('dev')); 27 | app.use(bodyParser.json()); 28 | app.use(bodyParser.urlencoded({ extended: false })); 29 | app.use(cookieParser()); 30 | app.use(express.static(path.join(__dirname, 'public'))); 31 | 32 | app.use('/', index); 33 | app.use('/users', users); 34 | 35 | // catch 404 and forward to error handler 36 | app.use(function(req, res, next) { 37 | var err = new Error('Not Found'); 38 | err.status = 404; 39 | next(err); 40 | }); 41 | 42 | // error handler 43 | app.use(function(err, req, res, next) { 44 | // set locals, only providing error in development 45 | res.locals.message = err.message; 46 | res.locals.error = req.app.get('env') === 'development' ? err : {}; 47 | 48 | // render the error page 49 | res.status(err.status || 500); 50 | res.render('error'); 51 | }); 52 | 53 | module.exports = app; 54 | -------------------------------------------------------------------------------- /api/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('api:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /api/config/mongoose.js: -------------------------------------------------------------------------------- 1 | var mongoose=require('mongoose'); 2 | var db=mongoose.connect('mongodb://localhost/test'); 3 | 4 | var DataSchema=new mongoose.Schema({ 5 | ip:{type:String}, 6 | adress:{type:String}, 7 | time:{type:Date,default:Date.now} 8 | }); 9 | 10 | var MesSchema=new mongoose.Schema({ 11 | name:{type:String}, 12 | qq:{type:Number}, 13 | email:{type:String}, 14 | phone:{type:Number}, 15 | message:{type:String}, 16 | time:{type:Date,default:Date.now} 17 | }); 18 | 19 | mongoose.model('usersInfo',DataSchema); 20 | mongoose.model('mesInfo',MesSchema); -------------------------------------------------------------------------------- /api/musics/001.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/001.mp3 -------------------------------------------------------------------------------- /api/musics/002.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/002.mp3 -------------------------------------------------------------------------------- /api/musics/003.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/003.mp3 -------------------------------------------------------------------------------- /api/musics/004.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/004.mp3 -------------------------------------------------------------------------------- /api/musics/005.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/005.mp3 -------------------------------------------------------------------------------- /api/musics/006.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/006.mp3 -------------------------------------------------------------------------------- /api/musics/007.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/007.mp3 -------------------------------------------------------------------------------- /api/musics/008.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/008.mp3 -------------------------------------------------------------------------------- /api/musics/009.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/009.mp3 -------------------------------------------------------------------------------- /api/musics/010.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/010.mp3 -------------------------------------------------------------------------------- /api/musics/听海-青花瓷竹笛.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/听海-青花瓷竹笛.mp3 -------------------------------------------------------------------------------- /api/musics/宫崎骏-Always With Me.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/宫崎骏-Always With Me.mp3 -------------------------------------------------------------------------------- /api/musics/汪苏泷-你让我懂.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/汪苏泷-你让我懂.mp3 -------------------------------------------------------------------------------- /api/musics/筷子兄弟 - 小苹果 - Ktv版伴奏.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/筷子兄弟 - 小苹果 - Ktv版伴奏.mp3 -------------------------------------------------------------------------------- /api/musics/网络歌手-石进 - 夜的钢琴曲 - 九 原创作品.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/网络歌手-石进 - 夜的钢琴曲 - 九 原创作品.mp3 -------------------------------------------------------------------------------- /api/musics/萨克斯-我心永恒.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/萨克斯-我心永恒.mp3 -------------------------------------------------------------------------------- /api/musics/麦振鸿-恨爱交加.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/musics/麦振鸿-恨爱交加.mp3 -------------------------------------------------------------------------------- /api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.17.1", 10 | "cookie-parser": "~1.4.3", 11 | "debug": "~2.6.3", 12 | "express": "~4.15.2", 13 | "jade": "~1.11.0", 14 | "morgan": "~1.8.1", 15 | "serve-favicon": "~2.4.2" 16 | }, 17 | "devDependencies": { 18 | "bootstrap": "^3.3.7", 19 | "ejs": "^2.5.7", 20 | "mongoose": "^4.11.7" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /api/pics/001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/pics/001.jpg -------------------------------------------------------------------------------- /api/pics/002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/pics/002.jpg -------------------------------------------------------------------------------- /api/pics/003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/pics/003.jpg -------------------------------------------------------------------------------- /api/pics/004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/pics/004.jpg -------------------------------------------------------------------------------- /api/pics/005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/pics/005.jpg -------------------------------------------------------------------------------- /api/pics/006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/pics/006.jpg -------------------------------------------------------------------------------- /api/pics/pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/api/pics/pic1.jpg -------------------------------------------------------------------------------- /api/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin:0; 3 | padding: 0; 4 | font-family: "宋体"; 5 | } 6 | 7 | html,body { 8 | width: 100%; 9 | height: 100%; 10 | } 11 | 12 | 13 | h1,h2,h3,h4,h5,h6 { 14 | font-family: "宋体"; 15 | } 16 | 17 | .wrap { 18 | width:80%; 19 | margin: 0 auto; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /api/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | // 数组 10 | // var a=[ 11 | 12 | 13 | 14 | var data=[ 15 | {num:1,name:'故乡的原风景',author:'陈小熊',src:'http://www.guoaihua.com/music/001'}, 16 | {num:2,name:'爱江山更爱美人',author:'笛子',src:'http://www.guoaihua.com/music/002'}, 17 | {num:3,name:'初见',author:'笛子',src:'http://www.guoaihua.com/music/003'}, 18 | {num:4,name:'情深深雨蒙蒙',author:'笛子',src:'http://www.guoaihua.com/music/004'}, 19 | {num:5,name:'kiss the rain',author:'钢琴',src:'http://www.guoaihua.com/music/005'}, 20 | {num:6,name:'江南',author:'林俊杰',src:'http://www.guoaihua.com/music/006'}, 21 | {num:7,name:'一眼万年',author:'林俊杰',src:'http://www.guoaihua.com/music/007'}, 22 | {num:8,name:'夜的钢琴曲',author:'石进',src:'http://www.guoaihua.com/music/008'}, 23 | {num:9,name:'匆匆那年',author:'王菲',src:'http://www.guoaihua.com/music/009'}, 24 | {num:10,name:'恋人心',author:'魏新雨',src:'http://www.guoaihua.com/music/010'}, 25 | ]; 26 | 27 | router.post('/getData', function(req, res, next) { 28 | res.send(data); 29 | }); 30 | 31 | 32 | 33 | module.exports = router; 34 | -------------------------------------------------------------------------------- /api/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var path=require('path'); 4 | var bodyParser=require('body-parser'); 5 | var mongoose=require('mongoose'); 6 | require('../config/mongoose.js'); 7 | var count=0; 8 | 9 | router.use(bodyParser.urlencoded({extended: false})); 10 | router.use(bodyParser.json()); 11 | 12 | /* GET users listing. */ 13 | router.get('/', function(req, res, next) { 14 | res.send('respond with a resource'); 15 | }); 16 | 17 | 18 | router.get('/:id', function(req, res, next) { 19 | res.sendFile(path.join(__dirname,'../musics',req.params.id+'.mp3')); 20 | }); 21 | 22 | router.post('/saveInfo', function(req, res, next) { 23 | 24 | var usersModel=mongoose.model('usersInfo'); 25 | var data=new usersModel({ 26 | ip:req.body.ip, 27 | adress:req.body.adress, 28 | time:req.body.time 29 | }); 30 | 31 | data.save(function(err){ 32 | console.log(err); 33 | }); 34 | count++; 35 | res.send({count:count}); 36 | }); 37 | 38 | router.post('/saveMessage', function(req, res, next) { 39 | var mesModel=mongoose.model('mesInfo'); 40 | var data=new mesModel({ 41 | name:req.body.name, 42 | qq:req.body.qq, 43 | email:req.body.email, 44 | phone:req.body.phone, 45 | message:req.body.message, 46 | time:req.body.time 47 | }); 48 | 49 | data.save(function(err){ 50 | console.log(err); 51 | }); 52 | res.send("发送成功!"); 53 | }); 54 | 55 | module.exports = router; 56 | -------------------------------------------------------------------------------- /api/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | api 6 | 7 | 8 | 9 | 10 |
11 |

音乐列表

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
#nameauthorlyricactions
24 |
25 | 28 | 29 | -------------------------------------------------------------------------------- /booksystem/add.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 书店 6 | 7 | 41 | 42 | 43 |
44 |
45 |

网上书店

46 |
47 |
48 | 49 | 54 | 55 |
56 |

插入书籍

57 | 书籍名称:

58 | 书籍作者:

59 | 书记类型:

60 | 书籍价格:

61 | 62 |
63 | 64 |
65 | 66 |
67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /booksystem/add1.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /booksystem/conn.php: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /booksystem/del.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 书店 15 | 16 | 58 | 59 | 60 |
61 |
62 |

网上书店

63 |
64 |
65 | 66 | 71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
书籍名称书籍编号书籍作者书籍类型书籍价格
90 | 91 |
92 | 93 | 94 |
95 |
96 |
97 |
98 | -------------------------------------------------------------------------------- /booksystem/del1.php: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /booksystem/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 书城主页 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 |

显示所有图书

34 |
35 |
36 | 显示区12 37 | 38 | 39 | 40 |
41 | 42 |
43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /booksystem/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | 23 | 书店 24 | 25 | 67 | 68 | 69 |
70 |
71 |

网上书店

72 |
73 |
74 | 75 | 80 |
81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
书籍名称书籍作者书籍类型书籍价格
97 |
98 |
99 | 100 |
101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /booksystem/index1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /booksystem/js/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by sun-gah on 2017/5/18. 3 | */ 4 | $(function(){ 5 | $.ajax({ 6 | type:'post', 7 | url:'./index1.php', 8 | cache:false, 9 | datatype:'json', 10 | success:function(data){ 11 | console.log(11+Math.random()); 12 | var str=$.parseJSON(data); 13 | console.log(str); 14 | 15 | var a=''; 16 | var reshtml='书籍名称 书籍作者 书籍类型 书籍价格 '; 17 | $.each(str,function(index,content){ 18 | console.log(content.bookName+content.bookAuthor+content.bookType+content.bookPrice); 19 | a+=content.bookName+content.bookAuthor+content.bookType+content.bookPrice; 20 | reshtml+=''+content.bookName+' '+content.bookAuthor+' '+content.bookType+' '+content.bookPrice+''; 21 | }); 22 | $('#show_table').html( 23 | reshtml 24 | ) 25 | } 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /booksystem/search.php: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /cloudMusic/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["istanbul"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /cloudMusic/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /cloudMusic/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | *.suo 11 | *.ntvs* 12 | *.njsproj 13 | *.sln 14 | -------------------------------------------------------------------------------- /cloudMusic/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /cloudMusic/README.md: -------------------------------------------------------------------------------- 1 | # 基于vue的仿网易云音乐开发 2 | >A vue project 3 | ## 技术栈 4 | * vue 5 | * vuex 6 | * vue-router 7 | * axios 8 | * express 9 | ## Build Setup 10 | 11 | ``` bash 12 | # install dependencies 13 | npm install 14 | 15 | # serve with hot reload at localhost:8080 16 | npm run dev 17 | 18 | # build for production with minification 19 | npm run build 20 | 21 | # build for production and view the bundle analyzer report 22 | npm run build --report 23 | ``` 24 | 25 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 26 | -------------------------------------------------------------------------------- /cloudMusic/build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | var ora = require('ora') 6 | var rm = require('rimraf') 7 | var path = require('path') 8 | var chalk = require('chalk') 9 | var webpack = require('webpack') 10 | var config = require('../config') 11 | var webpackConfig = require('./webpack.prod.conf') 12 | 13 | var spinner = ora('building for production...') 14 | spinner.start() 15 | 16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 17 | if (err) throw err 18 | webpack(webpackConfig, function (err, stats) { 19 | spinner.stop() 20 | if (err) throw err 21 | process.stdout.write(stats.toString({ 22 | colors: true, 23 | modules: false, 24 | children: false, 25 | chunks: false, 26 | chunkModules: false 27 | }) + '\n\n') 28 | 29 | console.log(chalk.cyan(' Build complete.\n')) 30 | console.log(chalk.yellow( 31 | ' Tip: built files are meant to be served over an HTTP server.\n' + 32 | ' Opening index.html over file:// won\'t work.\n' 33 | )) 34 | }) 35 | }) 36 | -------------------------------------------------------------------------------- /cloudMusic/build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | }, 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | console.log('') 39 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 40 | console.log() 41 | for (var i = 0; i < warnings.length; i++) { 42 | var warning = warnings[i] 43 | console.log(' ' + warning) 44 | } 45 | console.log() 46 | process.exit(1) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /cloudMusic/build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /cloudMusic/build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | var config = require('../config') 4 | if (!process.env.NODE_ENV) { 5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 6 | } 7 | 8 | var opn = require('opn') 9 | var path = require('path') 10 | var express = require('express') 11 | var webpack = require('webpack') 12 | var proxyMiddleware = require('http-proxy-middleware') 13 | var webpackConfig = require('./webpack.dev.conf') 14 | 15 | // default port where dev server listens for incoming traffic 16 | var port = process.env.PORT || config.dev.port 17 | // automatically open browser, if not set will be false 18 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 19 | // Define HTTP proxies to your custom API backend 20 | // https://github.com/chimurai/http-proxy-middleware 21 | var proxyTable = config.dev.proxyTable 22 | 23 | var app = express() 24 | var compiler = webpack(webpackConfig) 25 | 26 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 27 | publicPath: webpackConfig.output.publicPath, 28 | quiet: true 29 | }) 30 | 31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 32 | log: () => {}, 33 | heartbeat: 2000 34 | }) 35 | // force page reload when html-webpack-plugin template changes 36 | compiler.plugin('compilation', function (compilation) { 37 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 38 | hotMiddleware.publish({ action: 'reload' }) 39 | cb() 40 | }) 41 | }) 42 | 43 | // proxy api requests 44 | Object.keys(proxyTable).forEach(function (context) { 45 | var options = proxyTable[context] 46 | if (typeof options === 'string') { 47 | options = { target: options } 48 | } 49 | app.use(proxyMiddleware(options.filter || context, options)) 50 | }) 51 | 52 | // handle fallback for HTML5 history API 53 | app.use(require('connect-history-api-fallback')()) 54 | 55 | // serve webpack bundle output 56 | app.use(devMiddleware) 57 | 58 | // enable hot-reload and state-preserving 59 | // compilation error display 60 | app.use(hotMiddleware) 61 | 62 | // serve pure static assets 63 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 64 | app.use(staticPath, express.static('./static')) 65 | 66 | var uri = 'http://localhost:' + port 67 | 68 | var _resolve 69 | var readyPromise = new Promise(resolve => { 70 | _resolve = resolve 71 | }) 72 | 73 | console.log('> Starting dev server...') 74 | devMiddleware.waitUntilValid(() => { 75 | console.log('> Listening at ' + uri + '\n') 76 | // when env is testing, don't need open it 77 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 78 | opn(uri) 79 | } 80 | _resolve() 81 | }) 82 | 83 | var server = app.listen(port) 84 | 85 | module.exports = { 86 | ready: readyPromise, 87 | close: () => { 88 | server.close() 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /cloudMusic/build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.cssLoaders = function (options) { 13 | options = options || {} 14 | 15 | var cssLoader = { 16 | loader: 'css-loader', 17 | options: { 18 | minimize: process.env.NODE_ENV === 'production', 19 | sourceMap: options.sourceMap 20 | } 21 | } 22 | 23 | // generate loader string to be used with extract text plugin 24 | function generateLoaders (loader, loaderOptions) { 25 | var loaders = [cssLoader] 26 | if (loader) { 27 | loaders.push({ 28 | loader: loader + '-loader', 29 | options: Object.assign({}, loaderOptions, { 30 | sourceMap: options.sourceMap 31 | }) 32 | }) 33 | } 34 | 35 | // Extract CSS when that option is specified 36 | // (which is the case during production build) 37 | if (options.extract) { 38 | return ExtractTextPlugin.extract({ 39 | use: loaders, 40 | fallback: 'vue-style-loader' 41 | }) 42 | } else { 43 | return ['vue-style-loader'].concat(loaders) 44 | } 45 | } 46 | 47 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 48 | return { 49 | css: generateLoaders(), 50 | postcss: generateLoaders(), 51 | less: generateLoaders('less'), 52 | sass: generateLoaders('sass', { indentedSyntax: true }), 53 | scss: generateLoaders('sass'), 54 | stylus: generateLoaders('stylus'), 55 | styl: generateLoaders('stylus') 56 | } 57 | } 58 | 59 | // Generate loaders for standalone style files (outside of .vue) 60 | exports.styleLoaders = function (options) { 61 | var output = [] 62 | var loaders = exports.cssLoaders(options) 63 | for (var extension in loaders) { 64 | var loader = loaders[extension] 65 | output.push({ 66 | test: new RegExp('\\.' + extension + '$'), 67 | use: loader 68 | }) 69 | } 70 | return output 71 | } 72 | -------------------------------------------------------------------------------- /cloudMusic/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | var isProduction = process.env.NODE_ENV === 'production' 4 | 5 | module.exports = { 6 | loaders: utils.cssLoaders({ 7 | sourceMap: isProduction 8 | ? config.build.productionSourceMap 9 | : config.dev.cssSourceMap, 10 | extract: isProduction 11 | }), 12 | transformToRequire: { 13 | video: 'src', 14 | source: 'src', 15 | img: 'src', 16 | image: 'xlink:href' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /cloudMusic/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var config = require('../config') 4 | var vueLoaderConfig = require('./vue-loader.conf') 5 | 6 | function resolve (dir) { 7 | return path.join(__dirname, '..', dir) 8 | } 9 | 10 | module.exports = { 11 | entry: { 12 | app: './src/main.js' 13 | }, 14 | output: { 15 | path: config.build.assetsRoot, 16 | filename: '[name].js', 17 | publicPath: process.env.NODE_ENV === 'production' 18 | ? config.build.assetsPublicPath 19 | : config.dev.assetsPublicPath 20 | }, 21 | resolve: { 22 | extensions: ['.js', '.vue', '.json'], 23 | alias: { 24 | 'vue$': 'vue/dist/vue.esm.js', 25 | '@': resolve('src') 26 | } 27 | }, 28 | module: { 29 | rules: [ 30 | { 31 | test: /\.vue$/, 32 | loader: 'vue-loader', 33 | options: vueLoaderConfig 34 | }, 35 | { 36 | test: /\.js$/, 37 | loader: 'babel-loader', 38 | include: [resolve('src'), resolve('test')] 39 | }, 40 | { 41 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 42 | loader: 'url-loader', 43 | options: { 44 | limit: 10000, 45 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 46 | } 47 | }, 48 | { 49 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 50 | loader: 'url-loader', 51 | options: { 52 | limit: 10000, 53 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 54 | } 55 | }, 56 | { 57 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 58 | loader: 'url-loader', 59 | options: { 60 | limit: 10000, 61 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 62 | } 63 | } 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /cloudMusic/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | 9 | // add hot-reload related code to entry chunks 10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 12 | }) 13 | 14 | module.exports = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: '#cheap-module-eval-source-map', 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env': config.dev.env 23 | }), 24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 25 | new webpack.HotModuleReplacementPlugin(), 26 | new webpack.NoEmitOnErrorsPlugin(), 27 | // https://github.com/ampedandwired/html-webpack-plugin 28 | new HtmlWebpackPlugin({ 29 | filename: 'index.html', 30 | template: 'index.html', 31 | inject: true 32 | }), 33 | new FriendlyErrorsPlugin() 34 | ] 35 | }) 36 | -------------------------------------------------------------------------------- /cloudMusic/config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /cloudMusic/config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: '/', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | dev: { 25 | env: require('./dev.env'), 26 | port: 8080, 27 | autoOpenBrowser: true, 28 | assetsSubDirectory: 'static', 29 | assetsPublicPath: '/', 30 | proxyTable: {}, 31 | // CSS Sourcemaps off by default because relative paths are "buggy" 32 | // with this option, according to the CSS-Loader README 33 | // (https://github.com/webpack/css-loader#sourcemaps) 34 | // In our experience, they generally work as expected, 35 | // just be aware of this issue when enabling this option. 36 | cssSourceMap: false 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /cloudMusic/config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /cloudMusic/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | hua 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cloudMusic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hua", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "start": "node build/dev-server.js", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "vue": "^2.3.3", 14 | "vue-router": "^2.6.0" 15 | }, 16 | "devDependencies": { 17 | "autoprefixer": "^7.1.2", 18 | "axios": "^0.16.2", 19 | "babel-core": "^6.22.1", 20 | "babel-loader": "^7.1.1", 21 | "babel-plugin-transform-runtime": "^6.22.0", 22 | "babel-preset-env": "^1.3.2", 23 | "babel-preset-stage-2": "^6.22.0", 24 | "babel-register": "^6.22.0", 25 | "chalk": "^2.0.1", 26 | "connect-history-api-fallback": "^1.3.0", 27 | "copy-webpack-plugin": "^4.0.1", 28 | "css-loader": "^0.28.0", 29 | "cssnano": "^3.10.0", 30 | "eventsource-polyfill": "^0.9.6", 31 | "express": "^4.14.1", 32 | "extract-text-webpack-plugin": "^2.0.0", 33 | "file-loader": "^0.11.1", 34 | "friendly-errors-webpack-plugin": "^1.1.3", 35 | "html-webpack-plugin": "^2.28.0", 36 | "http-proxy-middleware": "^0.17.3", 37 | "opn": "^5.1.0", 38 | "optimize-css-assets-webpack-plugin": "^2.0.0", 39 | "ora": "^1.2.0", 40 | "rimraf": "^2.6.0", 41 | "semver": "^5.3.0", 42 | "shelljs": "^0.7.6", 43 | "url-loader": "^0.5.8", 44 | "vue-loader": "^12.1.0", 45 | "vue-style-loader": "^3.0.1", 46 | "vue-template-compiler": "^2.3.3", 47 | "webpack": "^2.6.1", 48 | "webpack-bundle-analyzer": "^2.2.1", 49 | "webpack-dev-middleware": "^1.10.0", 50 | "webpack-hot-middleware": "^2.18.0", 51 | "webpack-merge": "^4.1.0" 52 | }, 53 | "engines": { 54 | "node": ">= 4.0.0", 55 | "npm": ">= 3.0.0" 56 | }, 57 | "browserslist": [ 58 | "> 1%", 59 | "last 2 versions", 60 | "not ie <= 8" 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /cloudMusic/src/assets/imgs/768.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/imgs/768.png -------------------------------------------------------------------------------- /cloudMusic/src/assets/imgs/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/imgs/bg1.jpg -------------------------------------------------------------------------------- /cloudMusic/src/assets/imgs/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/imgs/bg2.jpg -------------------------------------------------------------------------------- /cloudMusic/src/assets/imgs/bg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/imgs/bg3.png -------------------------------------------------------------------------------- /cloudMusic/src/assets/imgs/btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/imgs/btn.png -------------------------------------------------------------------------------- /cloudMusic/src/assets/imgs/btn1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/imgs/btn1.png -------------------------------------------------------------------------------- /cloudMusic/src/assets/imgs/btn2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/imgs/btn2.png -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/001.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/001.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/听海-青花瓷竹笛.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/听海-青花瓷竹笛.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/宫崎骏-Always With Me.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/宫崎骏-Always With Me.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/林俊杰-一眼万年.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/林俊杰-一眼万年.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/林俊杰-江南.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/林俊杰-江南.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/汪苏泷-你让我懂.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/汪苏泷-你让我懂.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/王菲-匆匆那年(电影《匆匆那年》同名主题曲).mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/王菲-匆匆那年(电影《匆匆那年》同名主题曲).mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/石进-夜的钢琴曲五.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/石进-夜的钢琴曲五.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/笛子-倾世皇妃 配乐.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/笛子-倾世皇妃 配乐.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/笛子-情深深雨蒙蒙、情深深雨蒙蒙曲.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/笛子-情深深雨蒙蒙、情深深雨蒙蒙曲.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/笛子-爱江山更爱美人.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/笛子-爱江山更爱美人.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/筷子兄弟 - 小苹果 - Ktv版伴奏.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/筷子兄弟 - 小苹果 - Ktv版伴奏.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/纯音乐-故乡的原风景.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/纯音乐-故乡的原风景.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/网络歌手-石进 - 夜的钢琴曲 - 九 原创作品.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/网络歌手-石进 - 夜的钢琴曲 - 九 原创作品.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/萨克斯-我心永恒.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/萨克斯-我心永恒.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/钢琴-Kiss The Rain.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/钢琴-Kiss The Rain.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/魏新雨-恋人心.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/魏新雨-恋人心.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/assets/musics/麦振鸿-恨爱交加.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/src/assets/musics/麦振鸿-恨爱交加.mp3 -------------------------------------------------------------------------------- /cloudMusic/src/components/ranking_list/ranking_list.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 44 | 45 | 102 | -------------------------------------------------------------------------------- /cloudMusic/src/components/recommend/recommend.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 44 | 45 | -------------------------------------------------------------------------------- /cloudMusic/src/components/song_list/song_list.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 44 | 45 | -------------------------------------------------------------------------------- /cloudMusic/src/components/station/station.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 32 | 33 | -------------------------------------------------------------------------------- /cloudMusic/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import axios from 'axios' 7 | import store from './store/store.js' 8 | 9 | 10 | Vue.prototype.$axios=axios 11 | Vue.config.productionTip = false 12 | 13 | /* eslint-disable no-new */ 14 | new Vue({ 15 | el: '#app', 16 | store, 17 | router, 18 | template: '', 19 | components: { App }, 20 | data:{ 21 | Bus:new Vue() 22 | } 23 | }) 24 | -------------------------------------------------------------------------------- /cloudMusic/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import recommend from '../components/recommend/recommend' 4 | import song_list from '../components/song_list/song_list' 5 | import station from '../components/station/station' 6 | import ranking_list from '../components/ranking_list/ranking_list' 7 | 8 | Vue.use(Router) 9 | 10 | export default new Router({ 11 | routes: [ 12 | { 13 | path: '/', 14 | redirect: {name:'recommend'} 15 | }, 16 | { 17 | path:'/recommend', 18 | name:'recommend', 19 | component: recommend 20 | }, 21 | { 22 | path:'/song_list', 23 | name:'song_list', 24 | component: song_list 25 | }, 26 | { 27 | path:'/station', 28 | name:'station', 29 | component: station 30 | }, 31 | { 32 | path:'/ranking_list', 33 | name:'ranking_list', 34 | component: ranking_list 35 | }, 36 | ], 37 | linkActiveClass:'active' 38 | }) 39 | -------------------------------------------------------------------------------- /cloudMusic/src/store/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex); 5 | 6 | var state={ 7 | collectLists:[] 8 | } 9 | 10 | const getters ={ 11 | collectLists(state){ 12 | return state.collectLists; 13 | } 14 | } 15 | 16 | const mutations={ 17 | addmusic(state,value){ 18 | state.collectLists.push(value); 19 | alert("收藏成功!"); 20 | }, 21 | del(state,index){ 22 | state.collectLists.splice(index,1); 23 | } 24 | } 25 | 26 | const actions={ 27 | addmusic({commit},value){ 28 | commit('addmusic',value) 29 | }, 30 | del({commit},index){ 31 | commit('del',index) 32 | } 33 | } 34 | 35 | 36 | export default new Vuex.Store({ 37 | state,getters,actions,mutations 38 | }) -------------------------------------------------------------------------------- /cloudMusic/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/cloudMusic/static/.gitkeep -------------------------------------------------------------------------------- /message_board/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | 4 | var index = require('./routes/index'); 5 | var users = require('./routes/users'); 6 | 7 | var app = express(); 8 | 9 | // 获取发布的model 10 | 11 | 12 | // view engine setup 13 | app.set('views', path.join(__dirname, 'views')); 14 | app.engine('.html',require('ejs').__express);//两个下划线 15 | app.set('view engine', 'html'); 16 | 17 | app.use('/', index); 18 | app.use('/users', users); 19 | 20 | app.set('views',__dirname+'/views'); 21 | app.use(express.static(path.join(__dirname, 'public'))); 22 | 23 | 24 | 25 | module.exports = app; 26 | 27 | -------------------------------------------------------------------------------- /message_board/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('message-board:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /message_board/config/config.js: -------------------------------------------------------------------------------- 1 | module.exports={ 2 | url:'mongodb://localhost/ms' 3 | } -------------------------------------------------------------------------------- /message_board/config/mongoose.js: -------------------------------------------------------------------------------- 1 | var mongoose=require('mongoose'); 2 | var config=require('./config.js'); 3 | 4 | var db=mongoose.connect(config.url); 5 | 6 | 7 | var DataSchema=new mongoose.Schema({ 8 | name:{type:String}, 9 | content:{type:String}, 10 | time:{type:String,default:Date.now} 11 | }); 12 | 13 | mongoose.model('user',DataSchema); 14 | -------------------------------------------------------------------------------- /message_board/node_modules/.bin/jade: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../._jade@1.11.0@jade/bin/jade.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../._jade@1.11.0@jade/bin/jade.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /message_board/node_modules/.bin/jade.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\._jade@1.11.0@jade\bin\jade.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\._jade@1.11.0@jade\bin\jade.js" %* 7 | ) -------------------------------------------------------------------------------- /message_board/node_modules/.npminstall.done: -------------------------------------------------------------------------------- 1 | All packages installed at Tue Jul 25 2017 18:47:29 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /message_board/node_modules/.recently_updates.txt: -------------------------------------------------------------------------------- 1 | Recently updated (since 2017-07-18) 2 | Today: 3 | → mongoose@4.11.4 › mongodb@2.2.27 › mongodb-core@2.1.11 › require_optional@1.0.1 › semver@^5.1.0 (02:48:27) 4 | 2017-07-24 5 | → mongoose@* (01:36:23) 6 | 2017-07-21 7 | → mongoose@4.11.4 › kareem@1.5.0 (06:31:52) 8 | -------------------------------------------------------------------------------- /message_board/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "message-board", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.17.1", 10 | "cookie-parser": "~1.4.3", 11 | "debug": "~2.6.3", 12 | "express": "~4.15.2", 13 | "jade": "~1.11.0", 14 | "morgan": "~1.8.1", 15 | "serve-favicon": "~2.4.2" 16 | }, 17 | "devDependencies": { 18 | "ejs": "^2.5.6", 19 | "mongoose": "^4.11.4" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /message_board/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var mongoose=require('mongoose'); 4 | require('../config/mongoose.js'); 5 | var bodyParser=require('body-parser'); 6 | 7 | /* GET home page. */ 8 | /* 获取模版model*/ 9 | var DataModel=mongoose.model('user'); 10 | 11 | router.use(bodyParser.urlencoded({extended: false})); 12 | router.use(bodyParser.json()); 13 | 14 | router.get('/', function(req, res, next) { 15 | res.render('index', { title: 'Express' }); 16 | }); 17 | 18 | router.post('/save', function(req, res, next) { 19 | /*console.log(req.body);*/ 20 | var data=new DataModel({ 21 | name:req.body.name, 22 | content:req.body.content, 23 | time:req.body.time 24 | }); 25 | 26 | console.log(data); 27 | data.save(function (err) { 28 | console.log(err); 29 | }); 30 | 31 | res.send("success!"); 32 | 33 | }); 34 | 35 | 36 | router.post('/find', function(req, res, next) { 37 | // 首先获取当前页面 38 | var page=req.body.nowPage 39 | /* console.log(req.body.nowPage);*/ 40 | var query=DataModel.find({}); 41 | // 从6*当前页面-1开始查找 42 | 43 | 44 | query.skip((page-1)*6); 45 | query.limit(6); 46 | query.exec(function(err,docs) { 47 | DataModel.count(function (err,count) { 48 | /*console.log(count);*/ 49 | jsonArray={total:count,rows:docs}; 50 | res.json(jsonArray); 51 | }); 52 | 53 | }); 54 | }); 55 | 56 | 57 | module.exports = router; 58 | -------------------------------------------------------------------------------- /message_board/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /message_board/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /message_board/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /message_board/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /personalHomePage/.idea/.name: -------------------------------------------------------------------------------- 1 | html5网站设计作业(郭爱华) -------------------------------------------------------------------------------- /personalHomePage/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /personalHomePage/.idea/html5网站设计作业(郭爱华).iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /personalHomePage/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /personalHomePage/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /personalHomePage/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /personalHomePage/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /personalHomePage/Memery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Memery 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 60 | 61 | -------------------------------------------------------------------------------- /personalHomePage/css/base.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;} 2 | ul{list-style: none;} 3 | li { 4 | float: left; 5 | } 6 | body { 7 | font-size: 14px; 8 | font-family: "宋体"; 9 | } 10 | img { 11 | vertical-align: top; 12 | } 13 | 14 | a { 15 | text-decoration: none; 16 | } 17 | .w { 18 | width: 75%; 19 | margin: 0 auto; 20 | } 21 | .bannertop { 22 | width: 100%; 23 | height: 100px; 24 | background-color: #000000; 25 | } 26 | .topleft { 27 | float: left; 28 | color: #FF6600; 29 | font-size: 40px; 30 | width: 30%; 31 | line-height: 100px; 32 | text-align: center; 33 | } 34 | .logo { 35 | width: 150px; 36 | height: 100px; 37 | background: url("../imgs/logo.png") no-repeat; 38 | margin-left: 200px; 39 | } 40 | 41 | 42 | 43 | .topright { 44 | float: left; 45 | font-size: 15px; 46 | height: 50px; 47 | margin-top: 25px; 48 | padding-left: 50px; 49 | } 50 | 51 | .topright li { 52 | width: 80px; 53 | height: 50px; 54 | line-height: 50px; 55 | text-align: center; 56 | } 57 | 58 | li a { 59 | color: grey; 60 | display: block; 61 | text-decoration: none; 62 | font-family: "楷体"; 63 | font-size: 20px; 64 | } 65 | 66 | li a:hover { 67 | color: red; 68 | 69 | } 70 | 71 | .banner img { 72 | width: 100%; 73 | height: 100%; 74 | 75 | } 76 | 77 | /*尾部开始*/ 78 | .footer { 79 | height: 100px; 80 | background-color: #000000; 81 | } 82 | 83 | 84 | .s,.z { 85 | width: 100%; 86 | height: 50px; 87 | text-align: center; 88 | color: #cccccc; 89 | line-height: 50px; 90 | } 91 | 92 | .s ul,.z ul { 93 | display: block; 94 | width: 150px; 95 | height: 30px; 96 | margin-left: 40%; 97 | } 98 | 99 | 100 | 101 | span { 102 | margin-top: 18px; 103 | display: block; 104 | width: 1px; 105 | height: 14px; 106 | background-color: white; 107 | } 108 | 109 | .footer .z ul { 110 | margin-left: 42%; 111 | } 112 | 113 | .z li{margin-left: 40px; 114 | } 115 | 116 | .bj { 117 | 118 | width: 1349px; 119 | margin: 0 auto; 120 | } -------------------------------------------------------------------------------- /personalHomePage/css/index.css: -------------------------------------------------------------------------------- 1 | .content { 2 | height: 800px; 3 | background-color: #151515; 4 | } 5 | 6 | .contentleft { 7 | float: left; 8 | width: 30%; 9 | height: 700px; 10 | 11 | } 12 | 13 | .contentright { 14 | margin-left: 1%; 15 | float: left; 16 | width: 69%; 17 | height: 700px; 18 | 19 | } 20 | 21 | .left1 { 22 | width: 100%; 23 | height: 356px; 24 | background-color: #1F1F1F; 25 | border: 1px solid #000000; 26 | margin-bottom: 10px; 27 | } 28 | 29 | .left1top,.left2top { 30 | height: 50px; 31 | line-height: 50px; 32 | font-size: 30px; 33 | background-color: #FF6600; 34 | padding-left: 10%; 35 | border-radius: 5px; 36 | } 37 | 38 | .left1top a,.left2top a{ 39 | color: white; 40 | } 41 | 42 | .left1bottom ul li,.left2bottom ul li{ 43 | clear: both; 44 | color: #000000; 45 | } 46 | 47 | .left1bottom ,.left2bottom{ 48 | margin-left: 8%; 49 | margin-top: 10px; 50 | } 51 | 52 | .left1bottom ul,.left2bottom ul { 53 | list-style: disc; 54 | line-height: 30px; 55 | font-size: 16px; 56 | font-family: "STSong",STXingkai,FangSong; 57 | } 58 | 59 | 60 | .left2 { 61 | width: 100%; 62 | height: 330px; 63 | background-color: #1F1F1F; 64 | border: 1px solid #000000; 65 | 66 | } 67 | 68 | 69 | /*右边开始*/ 70 | 71 | 72 | .right1 { 73 | width: 100%; 74 | height: 60%; 75 | 76 | position: relative; 77 | overflow: hidden; 78 | } 79 | 80 | .slider-main-img { 81 | position: absolute; 82 | top: 0; 83 | left: 0; 84 | } 85 | .right1-main img { 86 | width: 698px; 87 | height: 420px; 88 | 89 | } 90 | 91 | .right1-main { 92 | width: 1397px; 93 | height: 420px; 94 | } 95 | 96 | .slider { 97 | width: 100%; 98 | height: 30px; 99 | position: absolute; 100 | bottom: 20px; 101 | left: 220px; 102 | 103 | } 104 | 105 | .slider span { 106 | display: inline-block; 107 | width: 24px; 108 | height: 20px; 109 | background:url("../imgs/icon.png") no-repeat -24px -782px; 110 | cursor: pointer; 111 | margin-top: 4px; 112 | margin-left: 10px; 113 | font-size: 0px; 114 | } 115 | 116 | 117 | 118 | .right2 { 119 | width: 100%; 120 | height: 40%; 121 | 122 | } 123 | 124 | .right2top { 125 | width: 95%; 126 | height: 50px; 127 | font-size: 20px; 128 | line-height: 50px; 129 | padding-left: 5%; 130 | background-color: #FF6600; 131 | border-radius: 5px; 132 | 133 | } 134 | 135 | .right2bottom { 136 | height: 222px; 137 | background-color: #1F1F1F; 138 | line-height: 30px; 139 | padding-top: 10px; 140 | color: #ffffff; 141 | } 142 | 143 | -------------------------------------------------------------------------------- /personalHomePage/css/memery.css: -------------------------------------------------------------------------------- 1 | .content { 2 | width: 100%; 3 | height: 635px; 4 | background-color: rgba(26, 105, 101, 0.62); 5 | } 6 | 7 | .s div,.z div,.x div{ 8 | width: 337px; 9 | height: 210px; 10 | background-color: pink; 11 | float: left; 12 | overflow: hidden; 13 | } 14 | 15 | .bannertop { 16 | background-color: rgb(247, 143, 143); 17 | } 18 | 19 | .content { 20 | background-color: rgba(11, 196, 239, 0.35); 21 | } 22 | 23 | .footer { 24 | background-color: rgb(234, 68, 68); 25 | } 26 | 27 | .bj { 28 | width: 1349px; 29 | margin: 0 auto; 30 | } -------------------------------------------------------------------------------- /personalHomePage/css/person.css: -------------------------------------------------------------------------------- 1 | .slide { 2 | height: 500px; 3 | position: relative; 4 | 5 | } 6 | .content { 7 | background: url("../imgs/bg11.jpg") no-repeat; 8 | } 9 | .content .bj { 10 | width: 1200px; 11 | 12 | 13 | } 14 | 15 | .content { 16 | margin-bottom: 100px; 17 | margin-top: 10px; 18 | } 19 | 20 | .slide li { 21 | position: absolute; 22 | left: 200px; 23 | top: 0; 24 | } 25 | .slide li img { 26 | width: 100%; 27 | } 28 | 29 | 30 | 31 | .arrow { 32 | opacity: 0; 33 | position: relative; 34 | z-index: 100; 35 | } 36 | 37 | 38 | .prev ,.next { 39 | width: 76px; 40 | height: 112px; 41 | position: absolute; 42 | top: 50%; 43 | margin-top: -22px; 44 | background: url("../imgs/prev.png"); 45 | z-index: 99; 46 | } 47 | 48 | .next { 49 | right: 0; 50 | background: url("../imgs/next.png"); 51 | } 52 | 53 | 54 | 55 | .bannertop { 56 | background-color: rgba(204, 204, 153, 0.61); 57 | } 58 | 59 | 60 | 61 | .footer { 62 | background-color: rgba(100, 125, 51, 0.79); 63 | } 64 | -------------------------------------------------------------------------------- /personalHomePage/css/seasons.css: -------------------------------------------------------------------------------- 1 | .content { 2 | height: 940px; 3 | width: 100%; 4 | background-color: #FFCC99; 5 | } 6 | .icon { 7 | height: 140px; 8 | padding-left: 245px; 9 | } 10 | .circle { 11 | width: 100px; 12 | height: 100px; 13 | background-color: skyblue; 14 | border-radius: 50px; 15 | float: left; 16 | margin: 20px 0 20px 30px; 17 | text-align: center; 18 | line-height: 100px; 19 | font-size: 36px; 20 | font-family: "楷体"; 21 | cursor: pointer; 22 | } 23 | 24 | .introduction { 25 | height: 700px; 26 | width: 100%; 27 | background: url("../imgs/spring.jpg")no-repeat; 28 | overflow: hidden; 29 | 30 | } 31 | 32 | 33 | .bannertop { 34 | background-color: #cccccc; 35 | } 36 | 37 | 38 | 39 | .footer { 40 | background-color:rgba(100, 125, 51, 0.98); 41 | } 42 | 43 | 44 | #spring { 45 | background-color: #79AF25; 46 | } 47 | #summer{ 48 | background-color: #EF5BB1; 49 | } 50 | #autumu { 51 | background-color: #FC9931; 52 | } 53 | 54 | #winter { 55 | background-color: #86A6FD; 56 | } 57 | 58 | 59 | .bj { 60 | width: 1349px; 61 | margin: 0 auto; 62 | } -------------------------------------------------------------------------------- /personalHomePage/css/time.css: -------------------------------------------------------------------------------- 1 | .content { 2 | width: 100%; 3 | height: 759px; 4 | background: rgb(178, 172, 156); 5 | 6 | } 7 | 8 | .w .wz { 9 | width: 450px; 10 | height: 200px; 11 | float: left; 12 | background: rgba(102, 51, 0, 0.25); 13 | margin: 10px 0 10px 20px; 14 | border-radius: 10px; 15 | text-align: center; 16 | line-height: 25px; 17 | font-family: "楷体"; 18 | 19 | } 20 | 21 | .w .wenzi { 22 | width: 450px; 23 | height: 200px; 24 | float: left; 25 | background: rgba(102, 51, 0, 0.25); 26 | margin: 10px 0 10px 20px; 27 | border-radius: 10px; 28 | text-align: center; 29 | line-height: 25px; 30 | font-family: "楷体"; 31 | padding-top: 20px; 32 | text-align: justify; 33 | } 34 | 35 | 36 | 37 | .bj { 38 | width: 1349px; 39 | height: 759px; 40 | margin: 0 auto; 41 | background-image: url("../imgs/bg10.jpg"); 42 | } 43 | 44 | 45 | 46 | .bannertop { 47 | background-color: #999999; 48 | 49 | } 50 | 51 | .bannertop ul li a{ 52 | color: #000000; 53 | } 54 | 55 | .footer { 56 | background-color: #999999; 57 | } 58 | -------------------------------------------------------------------------------- /personalHomePage/imgs/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/1.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/10.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/2.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/3.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/4.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/5.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/6.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/7.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/8.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/9.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/autumu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/autumu.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg10.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg11.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg12.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg13.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg14.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg15.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg16.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg2.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg3.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg4.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg5.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg6.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg7.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg8.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/bg9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/bg9.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/icon.png -------------------------------------------------------------------------------- /personalHomePage/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/logo.png -------------------------------------------------------------------------------- /personalHomePage/imgs/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/next.png -------------------------------------------------------------------------------- /personalHomePage/imgs/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/prev.png -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (1).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (1).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (2).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (3).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (3).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (4).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (4).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (5).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (5).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (6).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (6).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (7).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (7).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb (8).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb (8).jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/psb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/psb.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/spring.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/spring.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/summer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/summer.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/winter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/winter.jpg -------------------------------------------------------------------------------- /personalHomePage/imgs/xuehua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/personalHomePage/imgs/xuehua.png -------------------------------------------------------------------------------- /personalHomePage/js/animate.js: -------------------------------------------------------------------------------- 1 | 2 | // 多个属性运动框架 添加回调函数 3 | function animate(obj,json,fn) { // 给谁 json 4 | clearInterval(obj.timer); 5 | obj.timer = setInterval(function() { 6 | var flag = true; // 用来判断是否停止定时器 一定写到遍历的外面 7 | for(var attr in json){ // attr 属性 json[attr] 值 8 | //开始遍历 json 9 | // 计算步长 用 target 位置 减去当前的位置 除以 10 10 | // console.log(attr); 11 | var current = 0; 12 | if(attr == "opacity") 13 | { 14 | current = Math.round(parseInt(getStyle(obj,attr)*100)) || 0; 15 | console.log(current); 16 | } 17 | else 18 | { 19 | current = parseInt(getStyle(obj,attr)); // 数值 20 | } 21 | // console.log(current); 22 | // 目标位置就是 属性值 23 | var step = ( json[attr] - current) / 10; // 步长 用目标位置 - 现在的位置 / 10 24 | step = step > 0 ? Math.ceil(step) : Math.floor(step); 25 | //判断透明度 26 | if(attr == "opacity") // 判断用户有没有输入 opacity 27 | { 28 | if("opacity" in obj.style) // 判断 我们浏览器是否支持opacity 29 | { 30 | // obj.style.opacity 31 | obj.style.opacity = (current + step) /100; 32 | } 33 | else 34 | { // obj.style.filter = alpha(opacity = 30) 35 | obj.style.filter = "alpha(opacity = "+(current + step)* 10+")"; 36 | 37 | } 38 | } 39 | else if(attr == "zIndex") 40 | { 41 | obj.style.zIndex = json[attr]; 42 | } 43 | else 44 | { 45 | obj.style[attr] = current + step + "px" ; 46 | } 47 | 48 | if(current != json[attr]) // 只要其中一个不满足条件 就不应该停止定时器 这句一定遍历里面 49 | { 50 | flag = false; 51 | } 52 | } 53 | if(flag) // 用于判断定时器的条件 54 | { 55 | clearInterval(obj.timer); 56 | //alert("ok了"); 57 | if(fn) // 很简单 当定时器停止了。 动画就结束了 如果有回调,就应该执行回调 58 | { 59 | fn(); // 函数名 + () 调用函数 执行函数 60 | } 61 | } 62 | },10) 63 | } 64 | function getStyle(obj,attr) { // 谁的 那个属性 65 | if(obj.currentStyle) // ie 等 66 | { 67 | return obj.currentStyle[attr]; // 返回传递过来的某个属性 68 | } 69 | else 70 | { 71 | return window.getComputedStyle(obj,null)[attr]; // w3c 浏览器 72 | } 73 | } -------------------------------------------------------------------------------- /personalHomePage/js/click.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by gah on 2016/11/28. 3 | */ 4 | /*点击切换背景功能函数*/ 5 | 6 | 7 | window.onload = function (){ 8 | 9 | function $(id) {return document.getElementById(id);} // id获取函数 10 | 11 | var spring = $("spring"); // 获取四季的id 并创建变量 12 | var summer = $("summer"); 13 | var autumu = $("autumu"); 14 | var winter = $("winter"); 15 | 16 | var introduction = $("introduction"); 17 | 18 | spring.onclick = function (){ 19 | introduction.style.background = "url('imgs/spring.jpg') no-repeat"; 20 | } 21 | summer.onclick = function (){ 22 | introduction.style.background = "url('imgs/summer.jpg') no-repeat"; 23 | } 24 | 25 | autumu.onclick = function (){ 26 | introduction.style.background = "url('imgs/autumu.jpg') no-repeat"; 27 | } 28 | 29 | winter.onclick = function (){ 30 | introduction.style.background = "url('imgs/winter.jpg') no-repeat"; 31 | } 32 | 33 | 34 | 35 | 36 | } -------------------------------------------------------------------------------- /personalHomePage/js/donghua.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by gah on 2016/11/30. 3 | */ 4 | 5 | window.onload = function (){ 6 | function $(id) {return document.getElementById(id);} 7 | 8 | var wrap = $("wrap"); // 获取大盒子warp 9 | var arrow = $("arrow"); 10 | var slide = $("slide"); 11 | var lis = slide.getElementsByTagName("li"); // 获取所有的li标签 12 | 13 | wrap.onmouseover = function () { 14 | animate(arrow,{'opacity':100}); 15 | 16 | 17 | } 18 | 19 | wrap.onmouseout = function () { 20 | animate(arrow,{'opacity':0}); 21 | 22 | } 23 | 24 | // json 数组 储存 imgs信息 25 | 26 | var json = [ 27 | { // 1 28 | width: 400, 29 | top: 20, 30 | left: 50, 31 | opacity: 20, 32 | z:2 33 | }, 34 | { 35 | // 2 36 | width:600, 37 | top: 70, 38 | left: 0, 39 | opacity: 80, 40 | z:3 41 | }, 42 | { 43 | // 3 44 | width:800, 45 | top: 100, 46 | left: 200, 47 | opacity: 90, 48 | z:4 49 | }, 50 | { 51 | // 4 52 | width:600, 53 | top: 70, 54 | left: 600, 55 | opacity: 80, 56 | z:3 57 | }, 58 | { 59 | // 5 60 | width:400, 61 | top: 20, 62 | left: 750, 63 | opacity: 20, 64 | z:2 65 | } 66 | ]; 67 | 68 | var haha= arrow.children; 69 | 70 | 71 | for(var k in haha ){ 72 | 73 | haha[k].onclick = function () { 74 | if(this.className=="prev"){ 75 | change(false); // 左侧按钮 76 | } 77 | else{ 78 | change(true); // 右侧按钮 79 | } 80 | } 81 | 82 | } 83 | 84 | 85 | function change (flag){ 86 | if(flag){ 87 | json.unshift(json.pop()); // 把最后一个删除 并且把第一个添加到json第一个位置 88 | } 89 | else{ 90 | json.push(json.shift()); // 移除第一个 放到json最后一个 91 | } 92 | 93 | for(var i=0;i iNow) { 36 | animate(imgs[iNow], {left: -scrollWidth }); 37 | imgs[that].style.left = scrollWidth + "px"; 38 | } 39 | else if (that < iNow) { 40 | animate(imgs[iNow], {left: scrollWidth}); 41 | imgs[that].style.left = -scrollWidth + "px"; 42 | } 43 | iNow = that; 44 | animate(imgs[iNow], {left: 0}); 45 | 46 | } 47 | 48 | } 49 | 50 | 51 | 52 | } -------------------------------------------------------------------------------- /personalHomePage/personshow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 个人show 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
    31 |
  • 32 |
  • 33 |
  • 34 |
  • 35 |
  • 36 |
37 |
38 | 39 | 40 |
41 | 42 |
43 |
44 |
45 |
46 | 63 | 64 | -------------------------------------------------------------------------------- /personalHomePage/seasons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 四季变幻 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 | 22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 |
38 |
39 |
40 |
41 | 58 | 59 | -------------------------------------------------------------------------------- /spider/spider_1/app.js: -------------------------------------------------------------------------------- 1 | var http=require('http'); 2 | var cheerio=require('cheerio'); 3 | var request=require('request'); 4 | var fs=require('fs'); 5 | var i=0; 6 | var url='http://www.ss.pku.edu.cn/index.php/newscenter/news/2391'; 7 | 8 | 9 | function fetchPage(str){ 10 | startReq(str); 11 | } 12 | 13 | 14 | function startReq(str){ 15 | // 利用http模块 发起一次get请求 16 | 17 | http.get(str,function(res){ 18 | var html=''; 19 | var titles=[]; 20 | res.setEncoding('utf-8'); // 防止中文乱码 21 | 22 | // steam流操作 23 | // 监听data事件,读取返回体 24 | res.on('data',function(chunk){ 25 | html+=chunk; 26 | }); 27 | // 监听end事件 28 | res.on('end',function(){ 29 | var $=cheerio.load(html); // 获取html中的所有选择器 开启node中的jquery 30 | var time=$('.article-info a:nth-child(2)').text().trim(); 31 | 32 | var news_item={ 33 | title:$('div.article-title a').text().trim(), 34 | Time:time, 35 | link:'http://www.ss.pku.edu.cn'+$('.article-title a').attr('href'), 36 | num:i++ 37 | }; 38 | 39 | console.log(news_item); 40 | var news_title=news_item.title; 41 | savePage($,news_title); // 保存文章到本地 42 | saveImg($,news_title); // 保存图片到本地 43 | 44 | //下一次request的url 45 | 46 | var nextLink="http://www.ss.pku.edu.cn"+$('li.next a').attr('href'); 47 | str1=nextLink.split('-'); 48 | str=encodeURI(str1[0]); // 将字符串编码为url 49 | console.log(str); 50 | if(i<10){ 51 | fetchPage(str); 52 | } 53 | }); 54 | 55 | }); 56 | 57 | } 58 | 59 | function savePage($,news_title){ 60 | $('div.article-content p').each(function(index,item){ 61 | var x=$(this).text(); // this为dom元素,包装为jquery对象 62 | x=x+'\n'; 63 | fs.appendFile('./data/'+news_title+'.txt',x,'utf-8',function(err){ // 添加文件到本地 64 | if (err) { 65 | console.log(err); 66 | } 67 | }); 68 | }); 69 | } 70 | 71 | function saveImg($,news_title){ 72 | $('.article-content img').each(function(index,item){ 73 | var title=$(this).parent().next().text().trim(); // 获取图片标题 74 | var img_filname=title+'.jpg'; 75 | 76 | var img_src="http://www.ss.pku.edu.cn"+$(this).attr('src'); 77 | 78 | request.head(img_src,function(err,res,body){ // 用head请求只是为了验证路径是否存在 79 | if(err){ 80 | console.log(err); 81 | return; 82 | } 83 | }) 84 | request(img_src).pipe(fs.createWriteStream('./image/'+news_title+'-'+img_filname)); // 以流的形式保存图片到本地 85 | 86 | 87 | }); 88 | } 89 | 90 | 91 | fetchPage(url); -------------------------------------------------------------------------------- /spider/spider_1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spider_1", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "cheerio": "^1.0.0-rc.2", 13 | "request": "^2.81.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spider/splier/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app=express(); 3 | var request=require('request'); 4 | var cheerio=require('cheerio'); 5 | var fs=require('fs'); 6 | var num=0; 7 | app.get('/',function(req,res) { 8 | // body... 9 | var request = require('request'); 10 | request('https://movie.douban.com/', function (error, response, body) { 11 | // console.log('error:', error); // Print the error if one occurred 12 | // console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received 13 | // console.log('body:', body); // Print the HTML for the Google homepage 14 | $=cheerio.load(body); 15 | var data=[]; 16 | var ws1 = fs.createWriteStream('./data/message.txt', 'utf-8'); 17 | $('.ui-slide-content .ui-slide-item').each(function(i,e){ 18 | num++; 19 | var obj = {}; 20 | obj.title=$(e).attr('data-title'); 21 | obj.rate=$(e).attr('data-rate'); 22 | obj.img=$(e).find('img').attr('src'); 23 | if(obj.title!=undefined){ 24 | var mes=num+':'+obj.title+' '+obj.rate+'\n'; 25 | ws1.write(mes); 26 | data.push(obj); 27 | } 28 | }) 29 | res.send(data); 30 | }); 31 | }); 32 | 33 | app.listen(3000); -------------------------------------------------------------------------------- /spider/splier/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('splier:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /spider/splier/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "splier", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.17.1", 10 | "cookie-parser": "~1.4.3", 11 | "debug": "~2.6.3", 12 | "express": "~4.15.2", 13 | "jade": "~1.11.0", 14 | "morgan": "~1.8.1", 15 | "serve-favicon": "~2.4.2" 16 | }, 17 | "devDependencies": { 18 | "cheerio": "^1.0.0-rc.2", 19 | "express": "^4.15.4", 20 | "request": "^2.81.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spider/splier/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /spider/splier/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /spider/splier/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /spider/splier/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /spider/splier/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /spider/splier/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /waterfall/README: -------------------------------------------------------------------------------- 1 | # 原生js瀑布流
2 | # 持续开发 3 | -------------------------------------------------------------------------------- /waterfall/css.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;} 2 | 3 | body { 4 | background: #efeeec; 5 | } 6 | .banner { 7 | width: 100%; 8 | height: 430px; 9 | 10 | /* position: fixed; 11 | top: 0; 12 | left:0; 13 | z-index: 999;*/ 14 | } 15 | 16 | .banner>img { 17 | width: 100%; 18 | height: 430px; 19 | } 20 | 21 | 22 | /* banner设计*/ 23 | 24 | .banner>.nav { 25 | width: 100%; 26 | height: 80px; 27 | position: fixed; 28 | left: 0; 29 | top: 0; 30 | z-index: 99; 31 | background-color: rgba(227, 229, 228, 0); 32 | -webkit-transition: background-color 3s ease-in-out; 33 | transition: background-color 3s ease-in-out; 34 | } 35 | .logo { 36 | width: 10%; 37 | height: 80px; 38 | float: left; 39 | margin-left: 20%; 40 | font-size: 40px; 41 | font-family: 宋体; 42 | line-height: 80px; 43 | text-align: center; 44 | font-weight: bold; 45 | 46 | } 47 | 48 | .logo~ul{ 49 | list-style: none; 50 | width: auto; 51 | height: 80px; 52 | } 53 | 54 | .logo~ul>li { 55 | float: left; 56 | width: 5%; 57 | height: 80px; 58 | line-height: 80px; 59 | text-align: center; 60 | font-size: 25px; 61 | font-family: 宋体; 62 | 63 | } 64 | 65 | .main { 66 | position: relative; 67 | height: auto; 68 | 69 | } 70 | 71 | .box { 72 | padding: 15px 0 0 15px; 73 | float: left; 74 | -webkit-transition:all 1s ease-in-out; 75 | transition:all 1s ease-in-out; 76 | } 77 | 78 | .pic { 79 | padding: 10px; 80 | border: 1px solid #ccc; 81 | border-radius: 5px; 82 | box-shadow: 0 0 5px #ccc; 83 | } 84 | 85 | .pic:hover { 86 | box-shadow: 13px 17px 13px #ccc; 87 | } 88 | .pic img { 89 | width: 303px; 90 | height: auto; 91 | } 92 | 93 | 94 | /*返回按钮*/ 95 | a { 96 | width: 40px; 97 | height: 40px; 98 | border-radius: 20px; 99 | background: gray; 100 | position: fixed; 101 | right: 5%; 102 | bottom: 20px; 103 | text-align: center; 104 | line-height: 40px; 105 | font-size: 14px; 106 | text-decoration: none; 107 | border-radius: 2px; 108 | color: white; 109 | display: none; 110 | } 111 | 112 | .show { 113 | position: fixed; 114 | left: 50%; 115 | top: 50%; 116 | margin-left: -150px; 117 | background: deepskyblue; 118 | /* height: 200px; 119 | width: 303px;*/ 120 | z-index: 999; 121 | } -------------------------------------------------------------------------------- /waterfall/imgs/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/0.jpg -------------------------------------------------------------------------------- /waterfall/imgs/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/1.jpg -------------------------------------------------------------------------------- /waterfall/imgs/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/10.jpg -------------------------------------------------------------------------------- /waterfall/imgs/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/11.jpg -------------------------------------------------------------------------------- /waterfall/imgs/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/12.jpg -------------------------------------------------------------------------------- /waterfall/imgs/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/13.jpg -------------------------------------------------------------------------------- /waterfall/imgs/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/14.jpg -------------------------------------------------------------------------------- /waterfall/imgs/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/15.jpg -------------------------------------------------------------------------------- /waterfall/imgs/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/16.jpg -------------------------------------------------------------------------------- /waterfall/imgs/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/17.jpg -------------------------------------------------------------------------------- /waterfall/imgs/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/18.jpg -------------------------------------------------------------------------------- /waterfall/imgs/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/19.jpg -------------------------------------------------------------------------------- /waterfall/imgs/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/2.jpg -------------------------------------------------------------------------------- /waterfall/imgs/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/20.jpg -------------------------------------------------------------------------------- /waterfall/imgs/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/21.jpg -------------------------------------------------------------------------------- /waterfall/imgs/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/22.jpg -------------------------------------------------------------------------------- /waterfall/imgs/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/23.jpg -------------------------------------------------------------------------------- /waterfall/imgs/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/24.jpg -------------------------------------------------------------------------------- /waterfall/imgs/25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/25.jpg -------------------------------------------------------------------------------- /waterfall/imgs/26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/26.jpg -------------------------------------------------------------------------------- /waterfall/imgs/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/3.jpg -------------------------------------------------------------------------------- /waterfall/imgs/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/4.jpg -------------------------------------------------------------------------------- /waterfall/imgs/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/5.jpg -------------------------------------------------------------------------------- /waterfall/imgs/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/6.jpg -------------------------------------------------------------------------------- /waterfall/imgs/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/7.jpg -------------------------------------------------------------------------------- /waterfall/imgs/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/8.jpg -------------------------------------------------------------------------------- /waterfall/imgs/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/9.jpg -------------------------------------------------------------------------------- /waterfall/imgs/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/waterfall/imgs/bg.png -------------------------------------------------------------------------------- /websocket/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var app = express(); 4 | var server=require('http').createServer(app); 5 | var io=require('socket.io').listen(server); 6 | var mongoose1=require('./config/mongoose.js'); 7 | var mongoose=require('mongoose'); 8 | 9 | 10 | var index = require('./routes/index'); 11 | var users = require('./routes/users'); 12 | 13 | var db=mongoose1(); 14 | var users=[]; 15 | // 获取发布的model'data' 16 | var DataModel=mongoose.model('data'); 17 | // 静态资源分配 18 | app.use(express.static(path.join(__dirname, 'public'))); 19 | 20 | 21 | 22 | // 全局socket对象 监听connet事件 捕获新接入的socket对象 23 | io.on('connect',function(socket){ 24 | 25 | // 监听客户端连接 26 | socket.on('login',function (name) { 27 | 28 | /*先将用户加入数组,保存,然后默认输出5条消息记录*/ 29 | /*判断昵称是否存在于数组中,未查询到返回-1*/ 30 | if(users.indexOf(name)>-1){ 31 | socket.emit('existed',name); 32 | }else{ 33 | users.push(name); 34 | socket.username=name; 35 | socket.index=users.length-1; 36 | var query=DataModel.find({}); 37 | query.sort({'time':-1}).limit(5); 38 | query.exec(function(err,doc){ 39 | socket.emit('message',doc); 40 | }); 41 | io.sockets.emit('loginsuceess',name,users.length); 42 | 43 | /* io.sockets.emit('count',count);*/ 44 | } 45 | }); 46 | 47 | //将用户信息存入数据库 48 | socket.on('message',function (data) { 49 | /*console.log(data);*/ 50 | let arr=data.split(':'); 51 | let name1=arr[0]; 52 | let content1=arr[1]; 53 | let time=new Date(); 54 | var DataEntity=new DataModel({ 55 | name:name1, 56 | content:content1, 57 | time:time.toLocaleString() 58 | }); 59 | console.log(time); 60 | DataEntity.save(function(err,doc){ 61 | if(err){ 62 | console.log(err); 63 | }else{ 64 | /* console.log('success'+doc);*/ 65 | var query=DataModel.find({}); 66 | query.sort({'time':-1}).limit(1); 67 | query.exec(function(err,doc){ 68 | /* console.log(doc); 69 | console.log(doc[0]);*/ 70 | io.sockets.emit('message',doc); 71 | }); 72 | } 73 | }); 74 | 75 | }); 76 | 77 | socket.on('disconnect', function () { 78 | console.log('socket disconnect'); 79 | users.splice(socket.index,1); 80 | io.sockets.emit('disc',socket.username+'已断开连接',users.length); 81 | }); 82 | 83 | }); 84 | 85 | 86 | server.listen(8088); 87 | -------------------------------------------------------------------------------- /websocket/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('websocket:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /websocket/config/mongoose.js: -------------------------------------------------------------------------------- 1 | var mongoose=require('mongoose'); 2 | 3 | 4 | // 建立Schema(数据表) 5 | // 6 | module.exports=function () { 7 | var db=mongoose.connect('mongodb://127.0.0.1:27017/test'); 8 | var DataSchema=new mongoose.Schema({ 9 | name:{type:String}, 10 | content:{type:String}, 11 | time:{type:String,default:Date.now} 12 | }); 13 | mongoose.model('data',DataSchema); 14 | return db; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /websocket/node_modules/.bin/jade: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../._jade@1.11.0@jade/bin/jade.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../._jade@1.11.0@jade/bin/jade.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /websocket/node_modules/.bin/jade.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\._jade@1.11.0@jade\bin\jade.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\._jade@1.11.0@jade\bin\jade.js" %* 7 | ) -------------------------------------------------------------------------------- /websocket/node_modules/.npminstall.done: -------------------------------------------------------------------------------- 1 | All packages installed at Wed Jul 19 2017 16:57:57 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /websocket/node_modules/.recently_updates.txt: -------------------------------------------------------------------------------- 1 | Recently updated (since 2017-07-11) 2 | 2017-07-15 3 | → mongoose@* (07:52:30) 4 | -------------------------------------------------------------------------------- /websocket/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "websocket", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.17.1", 10 | "cookie-parser": "~1.4.3", 11 | "debug": "~2.6.3", 12 | "express": "~4.15.2", 13 | "jade": "~1.11.0", 14 | "morgan": "~1.8.1", 15 | "serve-favicon": "~2.4.2" 16 | }, 17 | "devDependencies": { 18 | "bootstrap": "^3.3.7", 19 | "jquery": "^3.2.1", 20 | "mongoose": "^4.11.3", 21 | "socket.io": "^2.0.3" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /websocket/public/images/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/websocket/public/images/bg1.jpg -------------------------------------------------------------------------------- /websocket/public/images/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/websocket/public/images/bg2.jpg -------------------------------------------------------------------------------- /websocket/public/images/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/websocket/public/images/bg3.jpg -------------------------------------------------------------------------------- /websocket/public/stylesheets/index.css: -------------------------------------------------------------------------------- 1 | html,body{ 2 | width: 100%; 3 | height: 100%; 4 | font-size: 1.6rem; 5 | font-family: "宋体"; 6 | } 7 | 8 | #body { 9 | overflow: hidden; 10 | } 11 | 12 | /* 外部容器控制 */ 13 | .container{ 14 | margin-top: 3%; 15 | height: 100%; 16 | } 17 | .col1 { 18 | height: 91%; 19 | } 20 | 21 | .col2 { 22 | height: 100%; 23 | } 24 | 25 | .co1 { 26 | height: 5%; 27 | margin-top: -4%; 28 | } 29 | 30 | 31 | .co2,.co3{ 32 | padding-right: 0; 33 | height: 100%; 34 | } 35 | 36 | #ms { 37 | height: 100%; 38 | width: 100%; 39 | margin-left: -15px; 40 | resize: none; 41 | font-size: 0.8rem; 42 | font-family: "宋体"; 43 | border: 1px solid skyblue; 44 | padding:0; 45 | padding-left: 2%; 46 | } 47 | 48 | #sendBtn { 49 | height: 100%; 50 | width: 100%; 51 | margin-top: 7%; 52 | } 53 | 54 | #showMsg { 55 | font-family: '宋体'; 56 | font-size: 0.6rem; 57 | overflow-y:auto; 58 | height: 80%; 59 | } 60 | 61 | /*覆盖框 */ 62 | 63 | .model { 64 | width: 100%; 65 | height: 100%; 66 | background-color: rgba(0, 0, 0, 0.47); 67 | position: fixed; 68 | top: 0; 69 | left: 0; 70 | z-index: 999; 71 | color: white; 72 | /* display: none; */ 73 | } 74 | 75 | .name { 76 | position: absolute; 77 | top: 50%; 78 | left: 50%; 79 | transform: translate(-50%,-50%); 80 | height: 20%; 81 | text-align: center; 82 | width: 100%; 83 | } 84 | 85 | #name { 86 | width: 60%; 87 | height: 20%; 88 | border: 1px solid skyblue; 89 | font-size: 0.9rem; 90 | background-color: rgba(118, 208, 231, 0.63); 91 | padding-left: 2%; 92 | font-size: 0.8rem; 93 | font-family: "宋体"; 94 | outline: none; 95 | padding: 5%; 96 | } 97 | 98 | #sendName { 99 | display: inline-block; 100 | margin-top: 2%; 101 | cursor: pointer; 102 | } 103 | 104 | .co4 { 105 | height: 100%; 106 | } 107 | 108 | -------------------------------------------------------------------------------- /websocket/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | 2 | body,html{ 3 | width: 100%; 4 | height: 100%; 5 | } 6 | body { 7 | margin: 0; 8 | font: 16rem "宋体", Helvetica, Arial, sans-serif; 9 | 10 | } 11 | 12 | .wrap { 13 | width: 80%; 14 | height: 100%; 15 | margin: 0 auto; 16 | margin-top: 1%; 17 | } 18 | 19 | #showContent { 20 | width: 80%; 21 | height: 65%; 22 | margin-left: auto; 23 | margin-right: auto; 24 | 25 | } 26 | 27 | #showMsg { 28 | overflow-y: auto; 29 | width: 100%; 30 | height: 82%; 31 | /* background-image: url('../images/bg3.jpg'); */ 32 | } 33 | 34 | .control { 35 | width: 80%; 36 | height: 20%; 37 | margin-left: auto; 38 | margin-right: auto; 39 | margin-top: -2%; 40 | } 41 | 42 | #ms{ 43 | width: 90%; 44 | padding: 2%; 45 | height: 80%; 46 | border: 1px solid skyblue; 47 | resize: none; 48 | overflow-y:auto; 49 | font-size: 1.6rem; 50 | } 51 | 52 | 53 | } 54 | #sendBtn { 55 | display: inline-block; 56 | width: 8%; 57 | height: 80%; 58 | margin-top: -4%; 59 | font-size: 2rem; 60 | margin-left: -7.3%; 61 | } 62 | 63 | 64 | @media screen and (max-device-width: 500px) { 65 | .control { 66 | width: 60%; 67 | height: 20%; 68 | margin-left: auto; 69 | margin-right: auto; 70 | margin-top: -2%; 71 | } 72 | } 73 | .name { 74 | position: absolute; 75 | top: 50%; 76 | left: 50%; 77 | transform: translate(-50%,-50%); 78 | height: 29px; 79 | } 80 | 81 | #name { 82 | height: 29px; 83 | color: white; 84 | background-color: black; 85 | border: 1px solid skyblue; 86 | padding-left: 10px; 87 | } 88 | .model { 89 | width: 100%; 90 | height: 100%; 91 | position: fixed; 92 | top: 0; 93 | left: 0; 94 | background-color: black; 95 | opacity: 0.5; 96 | color: white; 97 | display: none; 98 | /* -webkit-filter: blur(10px); Chrome, Opera 99 | -moz-filter: blur(10px); 100 | -ms-filter: blur(10px); 101 | filter: blur(10px); */ 102 | 103 | } -------------------------------------------------------------------------------- /websocket/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /websocket/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /websocket/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /websocket/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /websocket/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /zming/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["istanbul"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /zming/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /zming/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | *.suo 11 | *.ntvs* 12 | *.njsproj 13 | *.sln 14 | -------------------------------------------------------------------------------- /zming/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /zming/README.md: -------------------------------------------------------------------------------- 1 | # ziming 2 | (http://www.guoaihua.com) 3 | 4 | > A Vue.js project 5 | ## skills 6 | vue-router(前端路由)
7 | axios
8 | express(后端api)
9 | node
10 | mongodb
11 | mongoose
12 | ## API 13 | 音乐请求: http://www.guoaihua.com:3000/users/001 (GET 目前就放了001-009)
14 | ip信息上传:http://www.guoaihua.com:3000/users/saveInfo (POST)
15 | 发送消息:http://www.guoaihua.com:3000/users/saveMessage (POST)
16 | ## Build Setup 17 | 18 | ``` bash 19 | # install dependencies 20 | npm install 21 | 22 | # serve with hot reload at localhost:8080 23 | npm run dev 24 | 25 | # build for production with minification 26 | npm run build 27 | 28 | # build for production and view the bundle analyzer report 29 | npm run build --report 30 | ``` 31 | 32 | ## version 1.0 33 | 实现功能:
34 | 基础的页面展示
35 | 电脑端的大小自适应
36 | 统计流量
37 | (时间有限,技术水平有限,哈哈,纯属小白瞎折腾) 38 | -------------------------------------------------------------------------------- /zming/build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | var ora = require('ora') 6 | var rm = require('rimraf') 7 | var path = require('path') 8 | var chalk = require('chalk') 9 | var webpack = require('webpack') 10 | var config = require('../config') 11 | var webpackConfig = require('./webpack.prod.conf') 12 | 13 | var spinner = ora('building for production...') 14 | spinner.start() 15 | 16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 17 | if (err) throw err 18 | webpack(webpackConfig, function (err, stats) { 19 | spinner.stop() 20 | if (err) throw err 21 | process.stdout.write(stats.toString({ 22 | colors: true, 23 | modules: false, 24 | children: false, 25 | chunks: false, 26 | chunkModules: false 27 | }) + '\n\n') 28 | 29 | console.log(chalk.cyan(' Build complete.\n')) 30 | console.log(chalk.yellow( 31 | ' Tip: built files are meant to be served over an HTTP server.\n' + 32 | ' Opening index.html over file:// won\'t work.\n' 33 | )) 34 | }) 35 | }) 36 | -------------------------------------------------------------------------------- /zming/build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | }, 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | console.log('') 39 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 40 | console.log() 41 | for (var i = 0; i < warnings.length; i++) { 42 | var warning = warnings[i] 43 | console.log(' ' + warning) 44 | } 45 | console.log() 46 | process.exit(1) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /zming/build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /zming/build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | var config = require('../config') 4 | if (!process.env.NODE_ENV) { 5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 6 | } 7 | 8 | var opn = require('opn') 9 | var path = require('path') 10 | var express = require('express') 11 | var webpack = require('webpack') 12 | var proxyMiddleware = require('http-proxy-middleware') 13 | var webpackConfig = require('./webpack.dev.conf') 14 | 15 | // default port where dev server listens for incoming traffic 16 | var port = process.env.PORT || config.dev.port 17 | // automatically open browser, if not set will be false 18 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 19 | // Define HTTP proxies to your custom API backend 20 | // https://github.com/chimurai/http-proxy-middleware 21 | var proxyTable = config.dev.proxyTable 22 | 23 | var app = express() 24 | var compiler = webpack(webpackConfig) 25 | 26 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 27 | publicPath: webpackConfig.output.publicPath, 28 | quiet: true 29 | }) 30 | 31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 32 | log: false, 33 | heartbeat: 2000 34 | }) 35 | // force page reload when html-webpack-plugin template changes 36 | compiler.plugin('compilation', function (compilation) { 37 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 38 | hotMiddleware.publish({ action: 'reload' }) 39 | cb() 40 | }) 41 | }) 42 | 43 | // proxy api requests 44 | Object.keys(proxyTable).forEach(function (context) { 45 | var options = proxyTable[context] 46 | if (typeof options === 'string') { 47 | options = { target: options } 48 | } 49 | app.use(proxyMiddleware(options.filter || context, options)) 50 | }) 51 | 52 | // handle fallback for HTML5 history API 53 | app.use(require('connect-history-api-fallback')()) 54 | 55 | // serve webpack bundle output 56 | app.use(devMiddleware) 57 | 58 | // enable hot-reload and state-preserving 59 | // compilation error display 60 | app.use(hotMiddleware) 61 | 62 | // serve pure static assets 63 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 64 | app.use(staticPath, express.static('./static')) 65 | 66 | var uri = 'http://localhost:' + port 67 | 68 | var _resolve 69 | var readyPromise = new Promise(resolve => { 70 | _resolve = resolve 71 | }) 72 | 73 | console.log('> Starting dev server...') 74 | devMiddleware.waitUntilValid(() => { 75 | console.log('> Listening at ' + uri + '\n') 76 | // when env is testing, don't need open it 77 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 78 | opn(uri) 79 | } 80 | _resolve() 81 | }) 82 | 83 | var server = app.listen(port) 84 | 85 | module.exports = { 86 | ready: readyPromise, 87 | close: () => { 88 | server.close() 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /zming/build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.cssLoaders = function (options) { 13 | options = options || {} 14 | 15 | var cssLoader = { 16 | loader: 'css-loader', 17 | options: { 18 | minimize: process.env.NODE_ENV === 'production', 19 | sourceMap: options.sourceMap 20 | } 21 | } 22 | 23 | // generate loader string to be used with extract text plugin 24 | function generateLoaders (loader, loaderOptions) { 25 | var loaders = [cssLoader] 26 | if (loader) { 27 | loaders.push({ 28 | loader: loader + '-loader', 29 | options: Object.assign({}, loaderOptions, { 30 | sourceMap: options.sourceMap 31 | }) 32 | }) 33 | } 34 | 35 | // Extract CSS when that option is specified 36 | // (which is the case during production build) 37 | if (options.extract) { 38 | return ExtractTextPlugin.extract({ 39 | use: loaders, 40 | fallback: 'vue-style-loader' 41 | }) 42 | } else { 43 | return ['vue-style-loader'].concat(loaders) 44 | } 45 | } 46 | 47 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 48 | return { 49 | css: generateLoaders(), 50 | postcss: generateLoaders(), 51 | less: generateLoaders('less'), 52 | sass: generateLoaders('sass', { indentedSyntax: true }), 53 | scss: generateLoaders('sass'), 54 | stylus: generateLoaders('stylus'), 55 | styl: generateLoaders('stylus') 56 | } 57 | } 58 | 59 | // Generate loaders for standalone style files (outside of .vue) 60 | exports.styleLoaders = function (options) { 61 | var output = [] 62 | var loaders = exports.cssLoaders(options) 63 | for (var extension in loaders) { 64 | var loader = loaders[extension] 65 | output.push({ 66 | test: new RegExp('\\.' + extension + '$'), 67 | use: loader 68 | }) 69 | } 70 | return output 71 | } 72 | -------------------------------------------------------------------------------- /zming/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | var isProduction = process.env.NODE_ENV === 'production' 4 | 5 | module.exports = { 6 | loaders: utils.cssLoaders({ 7 | sourceMap: isProduction 8 | ? config.build.productionSourceMap 9 | : config.dev.cssSourceMap, 10 | extract: isProduction 11 | }), 12 | transformToRequire: { 13 | video: 'src', 14 | source: 'src', 15 | img: 'src', 16 | image: 'xlink:href' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /zming/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var config = require('../config') 4 | var vueLoaderConfig = require('./vue-loader.conf') 5 | var webpack=require('webpack') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | module.exports = { 12 | plugins:[ 13 | new webpack.optimize.CommonsChunkPlugin('common.js'), 14 | new webpack.ProvidePlugin({ 15 | jQuery: "jquery", 16 | $: "jquery" 17 | }) 18 | ], 19 | entry: { 20 | app: './src/main.js' 21 | }, 22 | output: { 23 | path: config.build.assetsRoot, 24 | filename: '[name].js', 25 | publicPath: process.env.NODE_ENV === 'production' 26 | ? config.build.assetsPublicPath 27 | : config.dev.assetsPublicPath 28 | }, 29 | resolve: { 30 | extensions: ['.js', '.vue', '.json'], 31 | alias: { 32 | 'vue$': 'vue/dist/vue.esm.js', 33 | '@': resolve('src') 34 | } 35 | }, 36 | module: { 37 | rules: [ 38 | { 39 | test: /\.vue$/, 40 | loader: 'vue-loader', 41 | options: vueLoaderConfig 42 | }, 43 | { 44 | test: /\.js$/, 45 | loader: 'babel-loader', 46 | include: [resolve('src'), resolve('test')] 47 | }, 48 | { 49 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 50 | loader: 'url-loader', 51 | options: { 52 | limit: 10000, 53 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 54 | } 55 | }, 56 | { 57 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 58 | loader: 'url-loader', 59 | options: { 60 | limit: 10000, 61 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 62 | } 63 | }, 64 | { 65 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 66 | loader: 'url-loader', 67 | options: { 68 | limit: 10000, 69 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 70 | } 71 | } 72 | ] 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /zming/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | 9 | // add hot-reload related code to entry chunks 10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 12 | }) 13 | 14 | module.exports = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: '#cheap-module-eval-source-map', 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env': config.dev.env 23 | }), 24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 25 | new webpack.HotModuleReplacementPlugin(), 26 | new webpack.NoEmitOnErrorsPlugin(), 27 | // https://github.com/ampedandwired/html-webpack-plugin 28 | new HtmlWebpackPlugin({ 29 | filename: 'index.html', 30 | template: 'index.html', 31 | inject: true 32 | }), 33 | new FriendlyErrorsPlugin() 34 | ] 35 | }) 36 | -------------------------------------------------------------------------------- /zming/config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /zming/config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: '/', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | dev: { 25 | env: require('./dev.env'), 26 | port: 8080, 27 | autoOpenBrowser: true, 28 | assetsSubDirectory: 'static', 29 | assetsPublicPath: '/', 30 | proxyTable: { 31 | }, 32 | // CSS Sourcemaps off by default because relative paths are "buggy" 33 | // with this option, according to the CSS-Loader README 34 | // (https://github.com/webpack/css-loader#sourcemaps) 35 | // In our experience, they generally work as expected, 36 | // just be aware of this issue when enabling this option. 37 | cssSourceMap: false 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /zming/config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /zming/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ziming 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /zming/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ziming", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "hua", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "start": "node build/dev-server.js", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "vue": "^2.3.3", 14 | "vue-router": "^2.6.0" 15 | }, 16 | "devDependencies": { 17 | "autoprefixer": "^7.1.2", 18 | "axios": "^0.16.2", 19 | "babel-core": "^6.22.1", 20 | "babel-loader": "^7.1.1", 21 | "babel-plugin-transform-runtime": "^6.22.0", 22 | "babel-preset-env": "^1.3.2", 23 | "babel-preset-stage-2": "^6.22.0", 24 | "babel-register": "^6.22.0", 25 | "bootstrap": "^3.3.7", 26 | "chalk": "^2.0.1", 27 | "connect-history-api-fallback": "^1.3.0", 28 | "copy-webpack-plugin": "^4.0.1", 29 | "css-loader": "^0.28.0", 30 | "cssnano": "^3.10.0", 31 | "eventsource-polyfill": "^0.9.6", 32 | "express": "^4.14.1", 33 | "extract-text-webpack-plugin": "^2.0.0", 34 | "file-loader": "^0.11.1", 35 | "friendly-errors-webpack-plugin": "^1.1.3", 36 | "html-webpack-plugin": "^2.28.0", 37 | "http-proxy-middleware": "^0.17.3", 38 | "jquery": "^3.2.1", 39 | "opn": "^5.1.0", 40 | "optimize-css-assets-webpack-plugin": "^2.0.0", 41 | "ora": "^1.2.0", 42 | "request": "^2.81.0", 43 | "rimraf": "^2.6.0", 44 | "semver": "^5.3.0", 45 | "shelljs": "^0.7.6", 46 | "url-loader": "^0.5.8", 47 | "vue-loader": "^12.1.0", 48 | "vue-style-loader": "^3.0.1", 49 | "vue-template-compiler": "^2.3.3", 50 | "webpack": "^2.6.1", 51 | "webpack-bundle-analyzer": "^2.2.1", 52 | "webpack-dev-middleware": "^1.10.0", 53 | "webpack-hot-middleware": "^2.18.0", 54 | "webpack-merge": "^4.1.0" 55 | }, 56 | "engines": { 57 | "node": ">= 4.0.0", 58 | "npm": ">= 3.0.0" 59 | }, 60 | "browserslist": [ 61 | "> 1%", 62 | "last 2 versions", 63 | "not ie <= 8" 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /zming/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import $ from 'jQuery' 7 | import axios from 'axios' 8 | 9 | Vue.config.productionTip = false 10 | Vue.prototype.$axios=axios 11 | /* eslint-disable no-new */ 12 | new Vue({ 13 | el: '#app', 14 | router, 15 | template: '', 16 | components: { App } 17 | }) 18 | -------------------------------------------------------------------------------- /zming/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import home from '../components/home' 4 | import project from '../components/project' 5 | import article from '../components/article' 6 | import person from '../components/person' 7 | import contact from '../components/contact' 8 | 9 | 10 | Vue.use(Router) 11 | 12 | export default new Router({ 13 | routes: [ 14 | { 15 | path: '/home', 16 | name: 'home', 17 | component: home 18 | }, 19 | { 20 | path: '/person', 21 | name: 'person', 22 | component: person 23 | }, 24 | { 25 | path: '/article', 26 | name: 'article', 27 | component: article 28 | }, 29 | { 30 | path: '/project', 31 | name: 'project', 32 | component: project 33 | }, 34 | { 35 | path: '/contact', 36 | name: 'contact', 37 | component: contact 38 | }, 39 | { 40 | path:'/*', 41 | redirect:'/home' 42 | } 43 | ] 44 | }) 45 | -------------------------------------------------------------------------------- /zming/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/.gitkeep -------------------------------------------------------------------------------- /zming/static/fonts/email.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 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 | -------------------------------------------------------------------------------- /zming/static/fonts/location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /zming/static/fonts/phone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 16 | 17 | 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 | -------------------------------------------------------------------------------- /zming/static/imgs/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/22.png -------------------------------------------------------------------------------- /zming/static/imgs/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/39.png -------------------------------------------------------------------------------- /zming/static/imgs/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/45.png -------------------------------------------------------------------------------- /zming/static/imgs/arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/arrows.png -------------------------------------------------------------------------------- /zming/static/imgs/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/bg.png -------------------------------------------------------------------------------- /zming/static/imgs/block1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/block1.jpg -------------------------------------------------------------------------------- /zming/static/imgs/block2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/block2.jpg -------------------------------------------------------------------------------- /zming/static/imgs/block3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/block3.jpg -------------------------------------------------------------------------------- /zming/static/imgs/block4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/block4.jpg -------------------------------------------------------------------------------- /zming/static/imgs/block5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/block5.jpg -------------------------------------------------------------------------------- /zming/static/imgs/block6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/block6.jpg -------------------------------------------------------------------------------- /zming/static/imgs/borders1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/borders1.png -------------------------------------------------------------------------------- /zming/static/imgs/boxs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/boxs.jpg -------------------------------------------------------------------------------- /zming/static/imgs/jstar-modern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/jstar-modern.png -------------------------------------------------------------------------------- /zming/static/imgs/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/moon.png -------------------------------------------------------------------------------- /zming/static/imgs/music-fly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/music-fly.png -------------------------------------------------------------------------------- /zming/static/imgs/project.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/project.jpg -------------------------------------------------------------------------------- /zming/static/imgs/propic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/propic1.png -------------------------------------------------------------------------------- /zming/static/imgs/propic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/propic2.png -------------------------------------------------------------------------------- /zming/static/imgs/propic3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/propic3.png -------------------------------------------------------------------------------- /zming/static/imgs/propic4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/propic4.png -------------------------------------------------------------------------------- /zming/static/imgs/propic5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/propic5.png -------------------------------------------------------------------------------- /zming/static/imgs/propic6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/propic6.png -------------------------------------------------------------------------------- /zming/static/imgs/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/star.png -------------------------------------------------------------------------------- /zming/static/imgs/stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/stars.png -------------------------------------------------------------------------------- /zming/static/imgs/winnower-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/winnower-bottom.png -------------------------------------------------------------------------------- /zming/static/imgs/winnower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoaihua/main_project/3ff34d1ddff0e6a4ebb7b1b3bda4980156c36d00/zming/static/imgs/winnower.png --------------------------------------------------------------------------------