└── DangDang ├── src ├── store │ ├── getter.js │ ├── mutation-types.js │ ├── action.js │ ├── mutations.js │ └── index.js ├── common │ ├── stylus │ │ ├── index.styl │ │ └── mixin.styl │ └── util │ │ └── timeInterval.js ├── assets │ ├── logo.png │ ├── contentimg │ │ ├── 91.png │ │ ├── c1.png │ │ ├── c2.png │ │ ├── c3.png │ │ ├── c4.png │ │ ├── c5.png │ │ ├── g0.jpg │ │ ├── g1.jpg │ │ ├── g2.jpg │ │ ├── j1.png │ │ ├── ms.png │ │ ├── qq.png │ │ ├── s1.jpg │ │ ├── s2.jpg │ │ ├── s3.jpg │ │ ├── s5.jpg │ │ ├── s6.jpg │ │ ├── y1.jpg │ │ ├── 111.png │ │ ├── ar1.png │ │ ├── back.png │ │ ├── chao.jpg │ │ ├── cxkx.png │ │ ├── fbi.png │ │ ├── g01.jpg │ │ ├── hd1.jpg │ │ ├── maox.jpg │ │ ├── menu.png │ │ ├── ppj.jpg │ │ ├── pws.png │ │ ├── s61.jpg │ │ ├── s62.jpg │ │ ├── sina.png │ │ ├── ss1.jpg │ │ ├── ss2.jpg │ │ ├── ss3.jpg │ │ ├── sy1.png │ │ ├── tz1.jpg │ │ ├── tz2.jpg │ │ ├── tz3.jpg │ │ ├── wd1.png │ │ ├── wd2.png │ │ ├── addIcon.png │ │ ├── alipay.png │ │ ├── biaoti1.jpg │ │ ├── check.png │ │ ├── clun1.png │ │ ├── clun2.png │ │ ├── clun3.png │ │ ├── fukuan7.png │ │ ├── go-top.png │ │ ├── goto1.png │ │ ├── icon0.png │ │ ├── icon1.png │ │ ├── icon2.png │ │ ├── iconsuo.png │ │ ├── qiang7.jpg │ │ ├── user-bg.jpg │ │ ├── cart_null.gif │ │ ├── children1.png │ │ ├── icon_shop.png │ │ ├── loading2.png │ │ ├── menu (1).png │ │ ├── clear_icon.png │ │ ├── icon_smile.png │ │ ├── menu-active.png │ │ ├── reductIcon1.png │ │ ├── refresh_icon.png │ │ ├── rightarrow.png │ │ └── icon_shoppingcart.png │ ├── iconfont │ │ ├── iconfont.eot │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ ├── demo_fontclass.html │ │ ├── iconfont.css │ │ ├── demo_unicode.html │ │ ├── demo_symbol.html │ │ └── demo.css │ └── iconfontimg │ │ ├── lunbo1.jpg │ │ ├── lunbo2.jpg │ │ ├── lunbo3.jpg │ │ ├── toubu1.png │ │ ├── toubu2.jpg │ │ ├── zdm1.png │ │ ├── zdm2.png │ │ ├── banner1.jpg │ │ ├── ddlogial.png │ │ ├── fangzi1.png │ │ ├── fangzi2.png │ │ ├── fenlei1.png │ │ ├── people1.png │ │ └── shopingcar1.png ├── components │ ├── HelloWorld.vue │ ├── icon-svg.vue │ ├── product │ │ ├── imgScale.vue │ │ ├── detail.vue │ │ ├── swiper.vue │ │ ├── comment.vue │ │ ├── ptopbar.vue │ │ ├── index.vue │ │ └── bottombar.vue │ ├── contain │ │ ├── gotop.vue │ │ ├── tuozhuai.vue │ │ ├── daojishi.vue │ │ ├── activelist.vue │ │ ├── conbar.vue │ │ └── cmiaosa.vue │ ├── footbar │ │ └── footbar.vue │ ├── loadmore.vue │ ├── header │ │ ├── hsearch.vue │ │ ├── hsearchtwo.vue │ │ └── sousuo.vue │ ├── topbar.vue │ ├── login │ │ ├── identify.vue │ │ ├── denlu.vue │ │ └── log.vue │ ├── banner │ │ └── lunbo1.vue │ └── loadfresh.vue ├── container │ ├── Vmy.vue │ ├── Vcategory.vue │ ├── Vhome.vue │ ├── Vtest.vue │ ├── Vbuy.vue │ └── Vcart.vue ├── App.vue ├── main.js └── router │ └── index.js ├── static ├── .gitkeep └── css │ └── reset.css ├── .eslintignore ├── test ├── unit │ ├── setup.js │ ├── .eslintrc │ ├── specs │ │ └── HelloWorld.spec.js │ └── jest.conf.js └── e2e │ ├── specs │ └── test.js │ ├── custom-assertions │ └── elementCount.js │ ├── nightwatch.conf.js │ └── runner.js ├── build ├── logo.png ├── vue-loader.conf.js ├── build.js ├── check-versions.js ├── webpack.base.conf.js ├── utils.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── prod.env.js ├── test.env.js ├── dev.env.js └── index.js ├── .editorconfig ├── .postcssrc.js ├── .gitignore ├── index.html ├── .babelrc ├── .eslintrc.js ├── README.md └── package.json /DangDang/src/store/getter.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /DangDang/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /DangDang/src/common/stylus/index.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /DangDang/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /DangDang/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /DangDang/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/build/logo.png -------------------------------------------------------------------------------- /DangDang/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /DangDang/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/logo.png -------------------------------------------------------------------------------- /DangDang/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/91.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/91.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/c1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/c1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/c2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/c2.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/c3.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/c4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/c4.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/c5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/c5.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/g0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/g0.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/g1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/g1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/g2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/g2.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/j1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/j1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/ms.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/qq.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/s1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/s1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/s2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/s2.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/s3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/s3.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/s5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/s5.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/s6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/s6.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/y1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/y1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/111.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/ar1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/ar1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/back.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/chao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/chao.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/cxkx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/cxkx.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/fbi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/fbi.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/g01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/g01.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/hd1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/hd1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/maox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/maox.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/menu.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/ppj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/ppj.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/pws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/pws.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/s61.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/s61.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/s62.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/s62.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/sina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/sina.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/ss1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/ss1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/ss2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/ss2.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/ss3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/ss3.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/sy1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/sy1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/tz1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/tz1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/tz2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/tz2.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/tz3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/tz3.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/wd1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/wd1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/wd2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/wd2.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/addIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/addIcon.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/alipay.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/biaoti1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/biaoti1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/check.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/clun1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/clun1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/clun2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/clun2.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/clun3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/clun3.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/fukuan7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/fukuan7.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/go-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/go-top.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/goto1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/goto1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/icon0.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/icon1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/icon2.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/iconsuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/iconsuo.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/qiang7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/qiang7.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/user-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/user-bg.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfont/iconfont.eot -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfont/iconfont.woff -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/lunbo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/lunbo1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/lunbo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/lunbo2.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/lunbo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/lunbo3.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/toubu1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/toubu1.png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/toubu2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/toubu2.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/zdm1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/zdm1.png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/zdm2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/zdm2.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/cart_null.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/cart_null.gif -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/children1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/children1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/icon_shop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/icon_shop.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/loading2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/loading2.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/menu (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/menu (1).png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/banner1.jpg -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/ddlogial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/ddlogial.png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/fangzi1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/fangzi1.png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/fangzi2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/fangzi2.png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/fenlei1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/fenlei1.png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/people1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/people1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/clear_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/clear_icon.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/icon_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/icon_smile.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/menu-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/menu-active.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/reductIcon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/reductIcon1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/refresh_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/refresh_icon.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/rightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/rightarrow.png -------------------------------------------------------------------------------- /DangDang/src/assets/iconfontimg/shopingcar1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/iconfontimg/shopingcar1.png -------------------------------------------------------------------------------- /DangDang/src/assets/contentimg/icon_shoppingcart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangkaiyangyi/vue-/HEAD/DangDang/src/assets/contentimg/icon_shoppingcart.png -------------------------------------------------------------------------------- /DangDang/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /DangDang/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /DangDang/.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 | -------------------------------------------------------------------------------- /DangDang/src/store/mutation-types.js: -------------------------------------------------------------------------------- 1 | export const ADDACTIVITY = "ADDACTIVITY" 2 | export const ADDGOODS = "ADDGOODS" 3 | export const PRODUCTINFO = 'PRODUCTINFO' 4 | 5 | // 改变token(权限) 6 | export const CHANGE_TOKEN = 'CHANGE_TOKEN' 7 | 8 | 9 | 10 | //// mutation-types.js 是放置常量的文件 11 | 12 | -------------------------------------------------------------------------------- /DangDang/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /DangDang/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | # Editor directories and files 12 | .idea 13 | .vscode 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | 19 | 20 | node_modules -------------------------------------------------------------------------------- /DangDang/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dangdang 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /DangDang/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 16 | 17 | 18 | 21 | -------------------------------------------------------------------------------- /DangDang/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /DangDang/src/store/action.js: -------------------------------------------------------------------------------- 1 | import * as types from './mutation-types.js' 2 | export default { 3 | // increment({commit}){ 4 | // commit("INCREMENT") 5 | // }, 6 | addActivity ({commit}, value) { 7 | commit(types.ADDACTIVITY, value) 8 | }, 9 | addGoods ({commit}, value) { 10 | commit(types.ADDGOODS, value) 11 | }, 12 | 13 | productInfo ({commit}, value) { 14 | commit(types.PRODUCTINFO, value) 15 | }, 16 | 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /DangDang/.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-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DangDang/src/store/mutations.js: -------------------------------------------------------------------------------- 1 | import * as types from './mutation-types.js' 2 | export default { 3 | // 加1 这里操作要大写 4 | // add(state) { 5 | // state.count += 1; 6 | // }, 7 | [types.CHANGE_TOKEN] (state, res) { 8 | state.token = res 9 | }, 10 | [types.ADDACTIVITY] (state, value) { 11 | state.activityList = value 12 | }, 13 | [types.ADDGOODS] (state, value) { 14 | state.goodsList = value 15 | }, 16 | [types.PRODUCTINFO] (state, value) { 17 | state.productInfo = value 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /DangDang/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import actions from './action.js' 4 | import mutations from './mutations.js' 5 | import getter from './getter.js' 6 | 7 | 8 | Vue.use(Vuex) 9 | 10 | // 存放着组件中信息的状态 11 | const state = { 12 | // nowIndex: 0, //获取详情页导航条的状态 13 | activityList: [], 14 | productInfo: {}, 15 | // count:1, 16 | carfull:true, 17 | goodsList: [], 18 | token:0 19 | 20 | 21 | } 22 | 23 | export default new Vuex.Store({ 24 | state, 25 | mutations, 26 | actions, 27 | getter, 28 | 29 | }) 30 | -------------------------------------------------------------------------------- /DangDang/src/components/icon-svg.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | 24 | 33 | -------------------------------------------------------------------------------- /DangDang/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DangDang/src/container/Vmy.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 29 | 30 | 31 | 34 | -------------------------------------------------------------------------------- /DangDang/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DangDang/src/container/Vcategory.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 29 | 30 | 31 | 34 | -------------------------------------------------------------------------------- /DangDang/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /DangDang/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /DangDang/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | }, 29 | globals:{ 30 | 'Swiper':true 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /DangDang/src/container/Vhome.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 41 | 42 | 43 | 45 | -------------------------------------------------------------------------------- /DangDang/src/common/util/timeInterval.js: -------------------------------------------------------------------------------- 1 | 2 | function cartInterVal (time) { 3 | let interVal = setInterval(() => { 4 | if(this.time.sec > 0) { 5 | let newSec = Math.round((this.time.sec - 0.1)*10)/10 + '' 6 | // math round 四舍五入 先扩大一倍 在除去自身 7 | // console.log((newSec + '').split('.')[1] == undefined) 8 | if (newSec.split('.')[0].length == 1) { 9 | newSec = '0' + newSec 10 | } 11 | if ((newSec).split('.')[1] == undefined) { 12 | this.time.sec = newSec + '.0' 13 | } else { 14 | this.time.sec = newSec 15 | } 16 | } else { 17 | this.time.sec = 60 18 | if(this.time.min > 0) { 19 | this.time.min-- 20 | let newMin = this.time.min + '' 21 | if(newMin.length == 1 ) { 22 | this.time.min = '0' + newMin 23 | } 24 | } else { 25 | this.time.min = 0 26 | } 27 | } 28 | if( this.min == 0 && this.sec == 0) 29 | clearInterval(this.interval) 30 | }, 100) 31 | 32 | } 33 | 34 | 35 | export {cartInterVal} 36 | -------------------------------------------------------------------------------- /DangDang/src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 33 | 34 | 64 | -------------------------------------------------------------------------------- /DangDang/test/e2e/nightwatch.conf.js: -------------------------------------------------------------------------------- 1 | require('babel-register') 2 | var config = require('../../config') 3 | 4 | // http://nightwatchjs.org/gettingstarted#settings-file 5 | module.exports = { 6 | src_folders: ['test/e2e/specs'], 7 | output_folder: 'test/e2e/reports', 8 | custom_assertions_path: ['test/e2e/custom-assertions'], 9 | 10 | selenium: { 11 | start_process: true, 12 | server_path: require('selenium-server').path, 13 | host: '127.0.0.1', 14 | port: 4444, 15 | cli_args: { 16 | 'webdriver.chrome.driver': require('chromedriver').path 17 | } 18 | }, 19 | 20 | test_settings: { 21 | default: { 22 | selenium_port: 4444, 23 | selenium_host: 'localhost', 24 | silent: true, 25 | globals: { 26 | devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port) 27 | } 28 | }, 29 | 30 | chrome: { 31 | desiredCapabilities: { 32 | browserName: 'chrome', 33 | javascriptEnabled: true, 34 | acceptSslCerts: true 35 | } 36 | }, 37 | 38 | firefox: { 39 | desiredCapabilities: { 40 | browserName: 'firefox', 41 | javascriptEnabled: true, 42 | acceptSslCerts: true 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /DangDang/build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /DangDang/src/components/product/imgScale.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 23 | 24 | 64 | -------------------------------------------------------------------------------- /DangDang/src/components/product/detail.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 39 | 40 | 41 | 69 | -------------------------------------------------------------------------------- /DangDang/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /DangDang/test/e2e/runner.js: -------------------------------------------------------------------------------- 1 | // 1. start the dev server using production config 2 | process.env.NODE_ENV = 'testing' 3 | 4 | const webpack = require('webpack') 5 | const DevServer = require('webpack-dev-server') 6 | 7 | const webpackConfig = require('../../build/webpack.prod.conf') 8 | const devConfigPromise = require('../../build/webpack.dev.conf') 9 | 10 | let server 11 | 12 | devConfigPromise.then(devConfig => { 13 | const devServerOptions = devConfig.devServer 14 | const compiler = webpack(webpackConfig) 15 | server = new DevServer(compiler, devServerOptions) 16 | const port = devServerOptions.port 17 | const host = devServerOptions.host 18 | return server.listen(port, host) 19 | }) 20 | .then(() => { 21 | // 2. run the nightwatch test suite against it 22 | // to run in additional browsers: 23 | // 1. add an entry in test/e2e/nightwatch.conf.js under "test_settings" 24 | // 2. add it to the --env flag below 25 | // or override the environment flag, for example: `npm run e2e -- --env chrome,firefox` 26 | // For more information on Nightwatch's config file, see 27 | // http://nightwatchjs.org/guide#settings-file 28 | let opts = process.argv.slice(2) 29 | if (opts.indexOf('--config') === -1) { 30 | opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js']) 31 | } 32 | if (opts.indexOf('--env') === -1) { 33 | opts = opts.concat(['--env', 'chrome']) 34 | } 35 | 36 | const spawn = require('cross-spawn') 37 | const runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' }) 38 | 39 | runner.on('exit', function (code) { 40 | server.close() 41 | process.exit(code) 42 | }) 43 | 44 | runner.on('error', function (err) { 45 | server.close() 46 | throw err 47 | }) 48 | }) 49 | -------------------------------------------------------------------------------- /DangDang/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 | 7 | // 引入vuex 8 | import store from './store/index.js' 9 | // 引入jquery 10 | import $ from 'jquery' 11 | window.$ = $ 12 | 13 | const Mock = require('mockjs') 14 | 15 | global.storage = window.localStorage 16 | // 引入axios 17 | import axios from 'axios' 18 | // Vue.prototype.$http = axios//在vue的原型链上添加axios 19 | axios.defaults.withCredentials = true //允许跨域 20 | global.axios = axios //设置为全局引用 21 | 22 | // 引入vue-touch 23 | import VueTouch from 'vue-touch' 24 | Vue.use(VueTouch, {name: 'v-touch'}) 25 | // 移动自适应 26 | import 'lib-flexible' 27 | // 引入阿里巴巴字体图标 28 | import '@/assets/iconfont/iconfont.js' 29 | 30 | import IconSvg from '@/components/icon-svg' 31 | // 全局注册icon-svg 32 | Vue.component('icon-svg', IconSvg) 33 | 34 | Vue.config.productionTip = false 35 | 36 | // 用钩子函数beforeEach()对路由进行判断 37 | 38 | router.beforeEach((to, from, next) => { 39 | if (to.meta.requireAuth) { // 需要权限,进一步进行判断 40 | if (store.state.token) { // 通过vuex state获取当前的token是否存在 41 | next(); 42 | } 43 | else { //如果没有权限,重定向到登录页,进行登录 44 | next({ 45 | path: '/denlu', 46 | // query: {redirect: to.fullPath} // 将跳转的路由path作为参数,登录成功后跳转到该路由 47 | }) 48 | } 49 | } 50 | else { //不需要权限 直接跳转 51 | next(); 52 | } 53 | }) 54 | 55 | 56 | /* eslint-disable no-new */ 57 | new Vue({ 58 | el: '#app', 59 | router, 60 | store, 61 | components: { App }, 62 | template: '', 63 | data: { 64 | eventHub: new Vue() // 使用集中的事件处理器,一劳永逸的在任何组件调用事件发射、接受的方法 65 | } 66 | }) 67 | -------------------------------------------------------------------------------- /DangDang/src/components/product/swiper.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 55 | 56 | 59 | -------------------------------------------------------------------------------- /DangDang/src/components/contain/gotop.vue: -------------------------------------------------------------------------------- 1 | 6 | 54 | -------------------------------------------------------------------------------- /DangDang/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | //五大主页 4 | import home from '../container/Vhome' 5 | import category from '../container/Vcategory' 6 | import buy from '../container/Vbuy' 7 | import cart from '../container/Vcart' 8 | import my from '../container/Vmy' 9 | //登陆注册 10 | import denlu from '../components/login/denlu' 11 | import zuce from '../components/login/zuce' 12 | 13 | //商品prodcut 14 | import index from '../components/product/index' 15 | import goods from '../components/product/goods' 16 | import detail from '../components/product/detail' 17 | import comment from '../components/product/comment' 18 | //懒加载 19 | Vue.use(Router) 20 | 21 | const router = new Router({ 22 | routes: [ 23 | { 24 | path: '/', 25 | name: 'home', 26 | component: home 27 | }, 28 | { 29 | path: '/category', 30 | name: 'category', 31 | component: category 32 | }, 33 | { 34 | path: '/buy', 35 | name: 'buy', 36 | component: buy 37 | }, 38 | { 39 | path: '/cart', 40 | name: 'cart', 41 | component: cart, 42 | meta: { 43 | requireAuth: true // 添加该字段,表示进入这个路由是需要登录才能进入的 44 | } 45 | }, 46 | { 47 | path: '/my', 48 | name: 'my', 49 | component: my 50 | }, 51 | { 52 | path: '/denlu', 53 | name: 'denlu', 54 | component: denlu 55 | }, 56 | { 57 | path: '/zuce', 58 | name: 'zuce', 59 | component: zuce 60 | }, 61 | { 62 | path: '/index', 63 | name: 'index', 64 | component: index, 65 | redirect: '/index/one', 66 | children: [ 67 | { 68 | path: 'one', 69 | name: 'goods', 70 | component: goods 71 | }, 72 | { 73 | path: 'two', 74 | name: 'detail', 75 | component: detail, 76 | }, 77 | { 78 | path: 'three', 79 | name: 'comment', 80 | component: comment, 81 | } 82 | ] 83 | }, 84 | 85 | ] 86 | }) 87 | 88 | export default router -------------------------------------------------------------------------------- /DangDang/src/components/product/comment.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 67 | 68 | 69 | 86 | -------------------------------------------------------------------------------- /DangDang/src/components/footbar/footbar.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /DangDang/README.md: -------------------------------------------------------------------------------- 1 | # 如何启动项目 2 | npm i 3 | npm run dev 4 | # 项目描述 5 | 这是一个基于vue技术的单页SPA项目,模仿的是当当网移动端项目,基本功能已经实现,还存在一些bug后续改善 6 | 通过模块化,组件化,工程化创建对象, 7 | # 技术选型 8 | 1. vue-cli -- vue脚手架 9 | 2. vuex -- 管理状态类似于redux 10 | 3. vue-router -- vue的路由 11 | 4. axios -- 向后台发送数据 12 | 5. mockjs -- 前台模拟后台数据 13 | 6. better-scroll -- 必须超过容器大小才可以滑动 14 | 7. swiper -- 轮播插件 15 | 8. lib-flexible 16 | 9. px2rem-loader 17 | 18 | 19 | # use 20 | 1. 阿里字体图标 21 | 22 | # 实现的功能 23 | 1. 适配 lib-flexible自适应,px2rem-loader适配 24 | 1. 点击跳转路由 25 | 3. 前台登录验证 26 | 27 | # 未实现的功能 28 | 1. 注册功能,未实现短信注册功能 29 | 30 | 31 | 32 | # 遇到的问题 33 | 1. 二维数组 34 | 2. better-scroll使用过程中的问题 35 | 1. 移动端时手指滑动,设置左右滑动的时候,上下滑动不了 36 | * 解决 设置添加属性 37 | 38 | 3. 点击按钮到页面顶部 39 | * 40 | 4. 过渡动画 41 | * 过渡动画要么自己触发,要么设置定时器 42 | 5. 文本两行,然后省略号 43 | 6. 某个子组件有的组件使用某个不使用 44 | * 在需要使用这个组组件的路由设置中,添加meta配置属性 45 | * 在子组件的最外层包裹器上添加 v-show判断 $route.meta.xx 46 | 7. 每次切换路由都到路由顶部 47 | * 在目标组件中设置,methods:{resetTo(){window.scrollTo(0,0)}} 48 | · created(){this.resetTo()} 49 | 14. 倒计时 50 | * 当点击重新发送时候,背景颜色转换为禁止点击状态延迟,后期选用vue插件vue-countdown 51 | 52 | # 遗留的问题 53 | 1. 倒计时处理 54 | 55 | 2. 登录注册没有设置后台服务器 56 | 57 | # 前台正则验证 58 | 1. 验证手机号码 59 | * (/^1[1|3|4|5|7|8][0-9]{9}$/).test(phone) 60 | 61 | # 优化项目 62 | 1. 刚开始图片没收到显示loading图-(待完成) 63 | * 下载 vue-lazyloader 64 | * main.js 中引入 65 | * 然后引入需要的loading 66 | * 注册 --全局有了v-lazy标签 67 | * 那个图片需要懒加载就将src标签换成v-lazy标签 68 | * 注册使用 vueLazyload 69 | Vue.use(VueLazyload,{ 70 | loading 71 | }) 全局组件 有了v-lazy指令 72 | 2. 路由懒加载(其他方法,下次用这个) 73 | * 在index.js中 74 | * const FirstPage = () => import('../components/FirstPage/FirstPage') 75 | 76 | 3. 设置浏览器title旁边的图标 77 | * build -> webpack.dev.conf.js 78 | new HtmlWebpackPlugin({ 79 | filename: '目标页面' 80 | template: ‘目标页面’ 81 | inject: true 82 | favicon: 'icon address' 83 | } 84 | * static 放需要的图标 85 | 4. npm run build -report 86 | * 可视化图,查看项目打包情况各插件所占体积 87 | * 从而优化,换小体积库 88 | 5. 保存数据的方法 89 | * 给router-link添加标签 keep-alive 90 | * sessionStorage 缓存路由组件对象 -- 不需要重新获取数据 91 | 6. * IconSvg图标组件 92 | 93 | 7. * 钩子函数beforeEach()对路由进行判断 94 | 8. * 随机验证码 95 | 96 | 97 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 98 | -------------------------------------------------------------------------------- /DangDang/src/components/loadmore.vue: -------------------------------------------------------------------------------- 1 | 13 | 76 | 90 | -------------------------------------------------------------------------------- /DangDang/src/common/stylus/mixin.styl: -------------------------------------------------------------------------------- 1 | mainColor = #FE4070 //主体红色 2 | mainTint = #F5F5F5 // 背景浅色 与 浅色分割线 3 | 4 | fontColor = rgba(7, 17, 27, .8) //字体颜色 5 | 6 | fontTint = #999 // 浅色字体 一般这个 7 | fontMain = #7A7A7A //购物车主要的浅色字体的颜色 8 | 9 | borderColor = #e0e0e0 //边框的淡色 10 | 11 | numFont = .3675rem //数字的字体大小 12 | mainFont = .4rem //主要字体大小 13 | 14 | bgColor = #F6F6F6 15 | //购物车的高度 1.5625rem 16 | 17 | 18 | // 小号字体 19 | smallFont($size=0.90) 20 | font-size 12px 21 | transform-origin 0 0 22 | transform scale(.9) 23 | 24 | 25 | // 细线分割 在下方 26 | border-1px($width = 100%, $left=0) 27 | position relative 28 | &:after 29 | display block 30 | position absolute 31 | bottom 0 32 | left $left 33 | width $width 34 | border-top 1px solid fontTint 35 | transform scaleY(.1) 36 | transform-origin 0 100% 37 | content '' 38 | 39 | // 细线分割在上方 40 | border-1px-top() 41 | &:after 42 | display block 43 | position absolute 44 | top 0 45 | left 0 46 | width 100% 47 | border-top 1px solid borderColor 48 | transform scaleY(.5) 49 | transform-origin 0 100% 50 | content '' 51 | 52 | border-none() 53 | &:after 54 | display none 55 | 56 | // 粗线分割 57 | border-line($height = 0.2rem, $scale = 1) 58 | position relative 59 | &:after 60 | content '' 61 | position absolute 62 | left 0 63 | right 0 64 | bottom 0 65 | height $height 66 | width 10rem 67 | transform scaleY($scale) 68 | transform-origin 0 100% 69 | background mainTint 70 | 71 | // 价格横线 72 | price-line($color, $size) 73 | &:after 74 | position absolute 75 | content '' 76 | right 0 77 | top 50% 78 | width .8rem 79 | height 1px 80 | background $color 81 | transform scaleY($size) 82 | 83 | arrow-right($width,$top=.15rem,$left=0.8rem, $color=fontTint ) 84 | 85 | &:after 86 | display block 87 | position absolute 88 | left $left 89 | top $top 90 | width $width 91 | height $width 92 | border-color $color 93 | border-width .01rem .01rem 0 0 94 | border-style solid 95 | transform rotate(45deg) 96 | content '' 97 | 98 | // 我的页面 个人信息 99 | right-line() 100 | &:after 101 | display block 102 | position absolute 103 | right 0 104 | top 27% 105 | bottom 0 106 | height .7rem 107 | width 1.5px 108 | background rgba(1,1,1,.1) 109 | content '' 110 | -------------------------------------------------------------------------------- /DangDang/src/components/contain/tuozhuai.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 39 | 40 | 41 | 97 | -------------------------------------------------------------------------------- /DangDang/src/components/header/hsearch.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 40 | 41 | 42 | 109 | -------------------------------------------------------------------------------- /DangDang/src/components/product/ptopbar.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 62 | 63 | 64 | 92 | -------------------------------------------------------------------------------- /DangDang/config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | // Use Eslint Loader? 24 | // If true, your code will be linted during bundling and 25 | // linting errors and warnings will be shown in the console. 26 | useEslint: true, 27 | // If true, eslint errors and warnings will also be shown in the error overlay 28 | // in the browser. 29 | showEslintErrorsInOverlay: false, 30 | 31 | /** 32 | * Source Maps 33 | */ 34 | 35 | // https://webpack.js.org/configuration/devtool/#development 36 | devtool: 'cheap-module-eval-source-map', 37 | 38 | // If you have problems debugging vue-files in devtools, 39 | // set this to false - it *may* help 40 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 41 | cacheBusting: true, 42 | 43 | cssSourceMap: true 44 | }, 45 | 46 | build: { 47 | // Template for index.html 48 | index: path.resolve(__dirname, '../dist/index.html'), 49 | 50 | // Paths 51 | assetsRoot: path.resolve(__dirname, '../dist'), 52 | assetsSubDirectory: 'static', 53 | assetsPublicPath: '/', 54 | 55 | /** 56 | * Source Maps 57 | */ 58 | 59 | productionSourceMap: true, 60 | // https://webpack.js.org/configuration/devtool/#production 61 | devtool: '#source-map', 62 | 63 | // Gzip off by default as many popular static hosts such as 64 | // Surge or Netlify already gzip all static assets for you. 65 | // Before setting to `true`, make sure to: 66 | // npm install --save-dev compression-webpack-plugin 67 | productionGzip: false, 68 | productionGzipExtensions: ['js', 'css'], 69 | 70 | // Run the build command with an extra argument to 71 | // View the bundle analyzer report after build finishes: 72 | // `npm run build --report` 73 | // Set to `true` or `false` to always turn it on or off 74 | bundleAnalyzerReport: process.env.npm_config_report 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /DangDang/src/components/topbar.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 73 | 74 | 75 | 110 | -------------------------------------------------------------------------------- /DangDang/src/components/contain/daojishi.vue: -------------------------------------------------------------------------------- 1 | 10 | 72 | 73 | 74 | 75 | 92 | -------------------------------------------------------------------------------- /DangDang/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | const createLintingRule = () => ( 12 | { 13 | // test: /\.(js|vue)$/, 14 | // loader: 'eslint-loader', 15 | // enforce: 'pre', 16 | // include: [resolve('src'), resolve('test')], 17 | // options: { 18 | // formatter: require('eslint-friendly-formatter'), 19 | // emitWarning: !config.dev.showEslintErrorsInOverlay 20 | // } 21 | } 22 | ) 23 | 24 | module.exports = { 25 | context: path.resolve(__dirname, '../'), 26 | entry: { 27 | app: './src/main.js' 28 | }, 29 | output: { 30 | path: config.build.assetsRoot, 31 | filename: '[name].js', 32 | publicPath: process.env.NODE_ENV === 'production' 33 | ? config.build.assetsPublicPath 34 | : config.dev.assetsPublicPath 35 | }, 36 | resolve: { 37 | extensions: ['.js', '.vue', '.json'], 38 | alias: { 39 | 'vue$': 'vue/dist/vue.esm.js', 40 | '@': resolve('src'), 41 | } 42 | }, 43 | module: { 44 | rules: [ 45 | ...(config.dev.useEslint ? [createLintingRule()] : []), 46 | { 47 | test: /\.vue$/, 48 | loader: 'vue-loader', 49 | options: vueLoaderConfig 50 | }, 51 | { 52 | test: /\.js$/, 53 | loader: 'babel-loader', 54 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 55 | }, 56 | { 57 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 58 | loader: 'url-loader', 59 | options: { 60 | limit: 10000, 61 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 62 | } 63 | }, 64 | { 65 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 66 | loader: 'url-loader', 67 | options: { 68 | limit: 10000, 69 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 70 | } 71 | }, 72 | { 73 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 74 | loader: 'url-loader', 75 | options: { 76 | limit: 10000, 77 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 78 | } 79 | } 80 | ] 81 | }, 82 | node: { 83 | // prevent webpack from injecting useless setImmediate polyfill because Vue 84 | // source contains it (although only uses it if it's native). 85 | setImmediate: false, 86 | // prevent webpack from injecting mocks to Node native modules 87 | // that does not make sense for the client 88 | dgram: 'empty', 89 | fs: 'empty', 90 | net: 'empty', 91 | tls: 'empty', 92 | child_process: 'empty' 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /DangDang/src/components/header/hsearchtwo.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 51 | 52 | 53 | 124 | -------------------------------------------------------------------------------- /DangDang/build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const px2remLoader = { 26 | loader: 'px2rem-loader', 27 | options: { 28 | remUnit: 75 29 | } 30 | } 31 | 32 | const postcssLoader = { 33 | loader: 'postcss-loader', 34 | options: { 35 | sourceMap: options.sourceMap 36 | } 37 | } 38 | 39 | // generate loader string to be used with extract text plugin 40 | function generateLoaders (loader, loaderOptions) { 41 | const loaders = [cssLoader, px2remLoader] 42 | 43 | if (loader) { 44 | loaders.push({ 45 | loader: loader + '-loader', 46 | options: Object.assign({}, loaderOptions, { 47 | sourceMap: options.sourceMap 48 | }) 49 | }) 50 | } 51 | 52 | // Extract CSS when that option is specified 53 | // (which is the case during production build) 54 | if (options.extract) { 55 | return ExtractTextPlugin.extract({ 56 | use: loaders, 57 | fallback: 'vue-style-loader' 58 | }) 59 | } else { 60 | return ['vue-style-loader'].concat(loaders) 61 | } 62 | } 63 | 64 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 65 | return { 66 | css: generateLoaders(), 67 | postcss: generateLoaders(), 68 | less: generateLoaders('less'), 69 | sass: generateLoaders('sass', { indentedSyntax: true }), 70 | scss: generateLoaders('sass'), 71 | stylus: generateLoaders('stylus'), 72 | styl: generateLoaders('stylus') 73 | } 74 | } 75 | 76 | // Generate loaders for standalone style files (outside of .vue) 77 | exports.styleLoaders = function (options) { 78 | const output = [] 79 | const loaders = exports.cssLoaders(options) 80 | 81 | for (const extension in loaders) { 82 | const loader = loaders[extension] 83 | output.push({ 84 | test: new RegExp('\\.' + extension + '$'), 85 | use: loader 86 | }) 87 | } 88 | 89 | return output 90 | } 91 | 92 | exports.createNotifierCallback = () => { 93 | const notifier = require('node-notifier') 94 | 95 | return (severity, errors) => { 96 | if (severity !== 'error') return 97 | 98 | const error = errors[0] 99 | const filename = error.file && error.file.split('!').pop() 100 | 101 | notifier.notify({ 102 | title: packageConfig.name, 103 | message: severity + ': ' + error.name, 104 | subtitle: filename || '', 105 | icon: path.join(__dirname, 'logo.png') 106 | }) 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /DangDang/src/components/product/index.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 86 | 87 | 88 | 132 | -------------------------------------------------------------------------------- /DangDang/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true 59 | }), 60 | // copy custom static assets 61 | new CopyWebpackPlugin([ 62 | { 63 | from: path.resolve(__dirname, '../static'), 64 | to: config.dev.assetsSubDirectory, 65 | ignore: ['.*'] 66 | } 67 | ]) 68 | ] 69 | }) 70 | 71 | module.exports = new Promise((resolve, reject) => { 72 | portfinder.basePort = process.env.PORT || config.dev.port 73 | portfinder.getPort((err, port) => { 74 | if (err) { 75 | reject(err) 76 | } else { 77 | // publish the new Port, necessary for e2e tests 78 | process.env.PORT = port 79 | // add port to devServer config 80 | devWebpackConfig.devServer.port = port 81 | 82 | // Add FriendlyErrorsPlugin 83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 84 | compilationSuccessInfo: { 85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 86 | }, 87 | onErrors: config.dev.notifyOnErrors 88 | ? utils.createNotifierCallback() 89 | : undefined 90 | })) 91 | 92 | resolve(devWebpackConfig) 93 | } 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /DangDang/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dangdang", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "yangkaiyangyi <393495797@qq.com>", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "unit": "jest --config test/unit/jest.conf.js --coverage", 11 | "e2e": "node test/e2e/runner.js", 12 | "test": "npm run unit && npm run e2e", 13 | "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", 14 | "build": "node build/build.js" 15 | }, 16 | "dependencies": { 17 | "better-scroll": "^1.13.2", 18 | "jquery": "^3.3.1", 19 | "lib-flexible": "^0.3.2", 20 | "mint-ui": "^2.2.13", 21 | "mock": "^0.1.1", 22 | "mockjs": "^1.0.1-beta3", 23 | "px2rem-loader": "^0.1.9", 24 | "vue": "^2.5.2", 25 | "vue-router": "^3.0.1", 26 | "vuex": "^3.0.1" 27 | }, 28 | "devDependencies": { 29 | "autoprefixer": "^7.1.2", 30 | "babel-core": "^6.22.1", 31 | "babel-eslint": "^8.2.1", 32 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 33 | "babel-jest": "^21.0.2", 34 | "babel-loader": "^7.1.1", 35 | "babel-plugin-dynamic-import-node": "^1.2.0", 36 | "babel-plugin-syntax-jsx": "^6.18.0", 37 | "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", 38 | "babel-plugin-transform-runtime": "^6.22.0", 39 | "babel-plugin-transform-vue-jsx": "^3.5.0", 40 | "babel-preset-env": "^1.3.2", 41 | "babel-preset-stage-2": "^6.22.0", 42 | "babel-register": "^6.22.0", 43 | "chalk": "^2.0.1", 44 | "chromedriver": "^2.27.2", 45 | "copy-webpack-plugin": "^4.0.1", 46 | "cross-spawn": "^5.0.1", 47 | "css-loader": "^0.28.11", 48 | "eslint": "^4.15.0", 49 | "eslint-config-standard": "^10.2.1", 50 | "eslint-friendly-formatter": "^3.0.0", 51 | "eslint-loader": "^1.7.1", 52 | "eslint-plugin-import": "^2.7.0", 53 | "eslint-plugin-node": "^5.2.0", 54 | "eslint-plugin-promise": "^3.4.0", 55 | "eslint-plugin-standard": "^3.0.1", 56 | "eslint-plugin-vue": "^4.0.0", 57 | "extract-text-webpack-plugin": "^3.0.0", 58 | "file-loader": "^1.1.4", 59 | "friendly-errors-webpack-plugin": "^1.6.1", 60 | "html-webpack-plugin": "^2.30.1", 61 | "jest": "^22.0.4", 62 | "jest-serializer-vue": "^0.3.0", 63 | "nightwatch": "^0.9.12", 64 | "node-notifier": "^5.1.2", 65 | "optimize-css-assets-webpack-plugin": "^3.2.0", 66 | "ora": "^1.2.0", 67 | "portfinder": "^1.0.13", 68 | "postcss-import": "^11.0.0", 69 | "postcss-loader": "^2.0.8", 70 | "postcss-px2rem": "^0.3.0", 71 | "postcss-url": "^7.2.1", 72 | "px2rem-loader": "^0.1.9", 73 | "rimraf": "^2.6.0", 74 | "selenium-server": "^3.0.1", 75 | "semver": "^5.3.0", 76 | "shelljs": "^0.7.6", 77 | "style-loader": "^0.23.1", 78 | "uglifyjs-webpack-plugin": "^1.1.1", 79 | "url-loader": "^0.5.8", 80 | "vue-jest": "^1.0.2", 81 | "vue-loader": "^13.3.0", 82 | "vue-style-loader": "^3.0.1", 83 | "vue-template-compiler": "^2.5.2", 84 | "webpack": "^3.6.0", 85 | "webpack-bundle-analyzer": "^2.9.0", 86 | "webpack-dev-server": "^2.9.1", 87 | "webpack-merge": "^4.1.0" 88 | }, 89 | "engines": { 90 | "node": ">= 6.0.0", 91 | "npm": ">= 3.0.0" 92 | }, 93 | "browserslist": [ 94 | "> 1%", 95 | "last 2 versions", 96 | "not ie <= 8" 97 | ] 98 | } 99 | -------------------------------------------------------------------------------- /DangDang/src/components/header/sousuo.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 53 | 54 | 55 | 137 | -------------------------------------------------------------------------------- /DangDang/src/components/login/identify.vue: -------------------------------------------------------------------------------- 1 | 6 | 117 | -------------------------------------------------------------------------------- /DangDang/src/components/contain/activelist.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 86 | 87 | 88 | 145 | -------------------------------------------------------------------------------- /DangDang/src/components/contain/conbar.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 70 | 71 | 72 | 150 | -------------------------------------------------------------------------------- /DangDang/src/components/banner/lunbo1.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 86 | 87 | 88 | 154 | -------------------------------------------------------------------------------- /DangDang/src/container/Vtest.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 120 | 121 | 122 | 176 | -------------------------------------------------------------------------------- /DangDang/src/components/loadfresh.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 133 | -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/demo_fontclass.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 10 | 11 |
12 |

IconFont 图标

13 |
    14 | 15 |
  • 16 | 17 |
    18 |
    .icon-ren-copy
    19 |
  • 20 | 21 |
  • 22 | 23 |
    房子
    24 |
    .icon-fangzi
    25 |
  • 26 | 27 |
  • 28 | 29 |
    购物车满
    30 |
    .icon-shopping-cart-full
    31 |
  • 32 | 33 |
  • 34 | 35 |
    值得买2
    36 |
    .icon-zhidemai2
    37 |
  • 38 | 39 |
  • 40 | 41 |
    房子
    42 |
    .icon-dvt-home
    43 |
  • 44 | 45 |
  • 46 | 47 |
    48 |
    .icon-cloud-lock
    49 |
  • 50 | 51 |
  • 52 | 53 |
    购物车空
    54 |
    .icon-gouwuchekong
    55 |
  • 56 | 57 |
  • 58 | 59 |
    放大镜
    60 |
    .icon-fangdajing
    61 |
  • 62 | 63 |
  • 64 | 65 |
    购物车空
    66 |
    .icon-cart-copy
    67 |
  • 68 | 69 |
  • 70 | 71 |
    分类图标-01
    72 |
    .icon-fenleitubiao-
    73 |
  • 74 | 75 |
  • 76 | 77 |
    分类图标
    78 |
    .icon-fenleitubiao
    79 |
  • 80 | 81 |
  • 82 | 83 |
    三点
    84 |
    .icon-sandian
    85 |
  • 86 | 87 |
  • 88 | 89 |
    房子
    90 |
    .icon-home-o
    91 |
  • 92 | 93 |
94 | 95 |

font-class引用

96 |
97 | 98 |

font-class是unicode使用方式的一种变种,主要是解决unicode书写不直观,语意不明确的问题。

99 |

与unicode使用方式相比,具有如下特点:

100 |
    101 |
  • 兼容性良好,支持ie8+,及所有现代浏览器。
  • 102 |
  • 相比于unicode语意明确,书写更直观。可以很容易分辨这个icon是什么。
  • 103 |
  • 因为使用class来定义图标,所以当要替换图标时,只需要修改class里面的unicode引用。
  • 104 |
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
  • 105 |
106 |

使用步骤如下:

107 |

第一步:引入项目下面生成的fontclass代码:

108 | 109 | 110 |
<link rel="stylesheet" type="text/css" href="./iconfont.css">
111 |

第二步:挑选相应图标并获取类名,应用于页面:

112 |
<i class="iconfont icon-xxx"></i>
113 |
114 |

"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。

115 |
116 |
117 | 118 | 119 | -------------------------------------------------------------------------------- /DangDang/src/components/contain/cmiaosa.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 120 | 121 | 122 | 178 | -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1539773340998'); /* IE9*/ 4 | src: url('iconfont.eot?t=1539773340998#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAwcAAsAAAAAEfQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY7eEkTY21hcAAAAYAAAAC8AAACaOZBSWZnbHlmAAACPAAAB04AAAoglrRYk2hlYWQAAAmMAAAAMQAAADYTKa00aGhlYQAACcAAAAAgAAAAJAgPA7xobXR4AAAJ4AAAABwAAAA4OD//+GxvY2EAAAn8AAAAHgAAAB4TbBBKbWF4cAAAChwAAAAfAAAAIAEfAIxuYW1lAAAKPAAAAUUAAAJtPlT+fXBvc3QAAAuEAAAAlQAAAM5/24eseJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWGcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMj6XZW7438AQw9zA0AgUZgTJAQDgtAwGeJzlkkEOgkAMRf8AMyJCYGmM3MCjsOIwHMKzuHblRTjAfC7AHtupG6OewDZvkrZJ8/M7ADyAXLgIBeAecNC4S9elfo4q9QtcpT6ik04Zs+jpGNhy4MiJM9el3zYgujTxn5Ov4WTjKeX5LYESe+xkXuGATHTmqNEgJJXhx7Z/ijq9t1fVqPOGOIeYGeIhojfETdAZelt6Q+/LYIjXYGuI6+Bg6D/haOh/4WSoCs6GauBqyJ2w9AaKJ6CiQaF4nJVWfWxbVxW/516/b7/7bL8vO3Wd+PMlTeokdmwrSZOqa7KSNGlhS2gqqgFqEV8qWwURg25rpREBHROilK1sAjJaFgYaLVDBKF/tpAHbPx1iokJU5Q+kVarUSWPSpKL5mXPtbCud+AO/984599xzv87H75pIhLReY/uZT3xSIEVSJw1CgIOSAR+p41XqtUlo4FuGII4fSp2uYb/EwfMz4LaNRkrBMLQOrDCYnTj0KNVjBjv3lf0rjK3sX7yP0vsWFwRduCxbGpW3bDNi+vummEdXDuw4tDH33GFV19Uvn4tg+8AKDXejZcce6YxETUsqPzwnbBaPjxAg+GO/of8mOiHFeFU8GlTjsPazqyvhVDi1ooAevgn74evhofA7RGrbX6RvEIckSZZsIltwXLYUsHyuNFIfB68bshlQmFzM2lnbkYW24kkcOgLkyrAVJqEbPA6lQVBkZoY/jcu/eMzg3PhhXNlKd+IOTyrhz2Hzw83rJ1OFVKqYBAOSRSGE5zQLlDOKp5xXwLLVte8qJyFGk9zlEDsPXjQ8xYdgIJy2k2JAosPgGe6oFxRQL6g2Dn/2WVUcI9I+S42+iSfpJneQBYwWRiWPH8Ykz8UpfK+arTTqAWCg8pMAcj6bC8pQsydhHNwMVOqNWrUdtQmoVjzf9hiO68zg+MN+oz5SYkqkLz1J50bH5ujExr5IP7W9PPwj79k0/OPAGFzCqSZMN8y6ZkTqp8n4BKhchZdVrk3GkrQfXrd8WfEtdwNEF+d4mvZmemF0DmBuFHozYT3tJpNumt4P4/39482DnDNThxcTyT2ypsl7OjSZCBsWpMGKRi2AtJvgexZ5X5qwtg++RJ8nO8kBcoSQRqkxUscAeorsNeq+V6+VaiP1qteoeK7zti5AI8xj33PjnpwvKXKpJrJWkYOS7ynvqNBR9QY+no/uk0sBPrIiWyBDpVpXHNeR0ZMjtbqSy7edWq9WqtcAlLQM+DOszWUrCoY5u9MyALhV3swN0UEzEQa6s7DATdCixZJPUSnaaP2BqG5oZ35iWCos6VbSUZ/6nm6pdy+sKrS3O+OCnpTByeUMQ9VZIttzdmoqmoRU9HPLPAqU4pozM2IR09qxI9ZezDCXlw3DYui48F+2jpqoNbvTEH3Un52xNRBbm74MCVs9dUqX1PB3qpPi2rce00DdveuEBtvAqdeMGMT0bNbBRTQ9Qdb9fhiZqKJhzLx8rZM1rkg8zCw/i/CAumIHJdwsIgkmXylADMGc9HxmT9PlpT3LdHpgHGB8gAYDY5SOhQ3YNTa+C8IbcAFsq/k3ywbkNBB87djSMsVRx2Bs4BKmXoc9Mj5P6fz4sfAly7atS9xx+Lv1wehBEsM9zpH3Y6VXMtThNFemI5PUv7VhVzLgWO09+tkKhhb3WqaDkEeKCeRXsb9boINU9CX4vp7gqsoTbsJUVTNx3XinqWlm4mNWTKF9imuFryoQS+lWeM3gukyHelVDwUjUDVOhDECCfeHZBKRewynWZxIMOlzM1G4Oq1FTWnbjQx4iZSyhtlTDlAwOsi5pEbUwBB8FEY/WFfYU24DxKJGAEEnODUKnlDsBcLAEPUcZXgf0DoqPAvu25qqXy/duPfFCJPLCCaRD/ZcVJQweXGNs7cGHnmbs6YfSivJKoRcizx8/fjESuXh8+3L5L6qrMWCnDz9wmrHTDxw+zUikdbP1DLvBptr+3k3uvs3f0u3+lm/1d9Dxdym43eO07fF5O99lWV353pxgOfi9XRBCIei0L6R7OETmee/G5qucysNOunnNSdsGG7JT85ZrSmn/426KM4nSiEwfbx4pUP+TPJUPOrMG+RSnvCv3djPXxemdlp/Sr/b17NvkdIO9MW+1PnHE8pI6wpiZ0OOqlQk+RH+FF5DSarVeiWisQgySIn2kRraRebIXayIDk7RMFQ4CQzzEjhLCBKIwUnH0bjQQlwlkKwizQZaD49n/Q5ayOdkRYI4a+FP/k798ZHTo0bN33Tv753t+Xdm8Zd+Hz1d8JbMV/rCgprlmavKigpxrb3XBN81YzAwPRuPxKGxqy39ty0fb8lGUWf6ta0YMr+lU1LLg83d90PrMmR/d7/Rt+efrnanLE/sGPnLPbHPXD7imRHAFwSUlTa/HUzHAHI+HN98rXYp5MXxFGcrtWlylf0cf+SRPBsk42UGIjZeVuHUrniNLWSELaHBkWL+NhdzXvnpv1TeqWKvr+kZWyFeXYq4bE4R+rdkUMmVImwv/n55+A5we1+1xYJ2HL7qCr7/hS7d0tfk6Dj4BLxOVxEkXnkgESwQp+x7hudzg4HQZETFfLt+5zqcHB/H+FGx68L9ZG2NbRyINdhRnToma1gD/cIDfiHfQtRb3EXUn0Um+9C76xjWINJpNxTWab1QCKG5gsKG4Kfz0j2FoZgigcIXu3X7HXnoFvghfgK/CDUlioTlSCqfTBexNw2/7ws+uFoaHC6ur25coXdq+CjfhU+Hj5D9u9LL3AAB4nGNgZGBgAGJ7Jm62eH6brwzcLAwgcP2tyRwY/f/n/3oWc+YGIJeDgQkkCgAUkwtpAAAAeJxjYGRgYG7438AQw2L2/+f/7yzmDEARFMAHAKjjBtJ4nGNhYGBgwYVZYPT/nywM///Dxc0YGABFfgRtAAAAAABaAHIA2AFaAhYCaALeAyADnAQuBJoEyAUQAAB4nGNgZGBg4GNoYGBnAAEmIOYCQgaG/2A+AwAW5QGsAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nG2MuxKCMBAAc6g8IuCM/3GNf3QmIYmEHANER75e0cbC7bbYFZn4IsV/WshgB3s4QA4FlFCBhCPU0EALJ1FOJqLi8Zl3FO3qz7PjcfTRoqJpwS6FUK3OazOQv5T6vqDjwUgVOGkMrPracnok5UzP0cptoun27qtPv52bzsRg/JKunhjrXytmitpTzLcpshAvFcM0aAAAAA==') format('woff'), 6 | url('iconfont.ttf?t=1539773340998') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1539773340998#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-ren-copy:before { content: "\e601"; } 19 | 20 | .icon-fangzi:before { content: "\e60f"; } 21 | 22 | .icon-shopping-cart-full:before { content: "\e652"; } 23 | 24 | .icon-zhidemai2:before { content: "\e71d"; } 25 | 26 | .icon-dvt-home:before { content: "\e64c"; } 27 | 28 | .icon-cloud-lock:before { content: "\e6f4"; } 29 | 30 | .icon-gouwuchekong:before { content: "\e505"; } 31 | 32 | .icon-fangdajing:before { content: "\e501"; } 33 | 34 | .icon-cart-copy:before { content: "\e502"; } 35 | 36 | .icon-fenleitubiao-:before { content: "\e605"; } 37 | 38 | .icon-fenleitubiao:before { content: "\e606"; } 39 | 40 | .icon-sandian:before { content: "\e676"; } 41 | 42 | .icon-home-o:before { content: "\e6d9"; } 43 | 44 | -------------------------------------------------------------------------------- /DangDang/static/css/reset.css: -------------------------------------------------------------------------------- 1 | html { 2 | -ms-text-size-adjust: 100%; 3 | -webkit-text-size-adjust: 100%; 4 | -webkit-tap-highlight-color: transparent; 5 | height: 100%; 6 | } 7 | 8 | body { 9 | margin: 0; 10 | font-size: 16px; 11 | font-family: "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif; 12 | line-height: 1.5; 13 | color: #333; 14 | background-color: #fff; 15 | min-height: 100%; 16 | } 17 | 18 | article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { 19 | display: block; 20 | } 21 | 22 | audio, canvas, progress, video { 23 | display: inline-block; 24 | } 25 | 26 | audio:not([controls]) { 27 | display: none; 28 | height: 0; 29 | } 30 | 31 | progress { 32 | vertical-align: baseline; 33 | } 34 | 35 | [hidden], template { 36 | display: none; 37 | } 38 | 39 | a { 40 | background: transparent; 41 | text-decoration: none; 42 | color: #08c; 43 | } 44 | 45 | a:active { 46 | outline: 0; 47 | } 48 | 49 | abbr[title] { 50 | border-bottom: 1px dotted; 51 | } 52 | 53 | b, strong { 54 | font-weight: bold; 55 | } 56 | 57 | dfn { 58 | font-style: italic; 59 | } 60 | 61 | mark { 62 | background: #ff0; 63 | color: #000; 64 | } 65 | 66 | small { 67 | font-size: 80%; 68 | } 69 | 70 | sub, sup { 71 | font-size: 75%; 72 | line-height: 0; 73 | position: relative; 74 | vertical-align: baseline; 75 | } 76 | 77 | sup { 78 | top: -0.5em; 79 | } 80 | 81 | sub { 82 | bottom: -0.25em; 83 | } 84 | 85 | img { 86 | max-width: 100%; 87 | border: 0; 88 | vertical-align: middle; 89 | } 90 | 91 | svg:not(:root) { 92 | overflow: hidden; 93 | } 94 | 95 | pre { 96 | overflow: auto; 97 | white-space: pre; 98 | white-space: pre-wrap; 99 | word-wrap: break-word; 100 | } 101 | 102 | code, kbd, pre, samp { 103 | font-family: monospace, monospace; 104 | font-size: 1em; 105 | } 106 | 107 | button, input, optgroup, select, textarea { 108 | color: inherit; 109 | font: inherit; 110 | margin: 0; 111 | vertical-align: middle; 112 | } 113 | 114 | button, input, select { 115 | overflow: visible; 116 | } 117 | 118 | button, select { 119 | text-transform: none; 120 | } 121 | 122 | button, html input[type="button"], input[type="reset"], input[type="submit"] { 123 | -webkit-appearance: button; 124 | cursor: pointer; 125 | } 126 | 127 | [disabled] { 128 | cursor: default; 129 | } 130 | 131 | button::-moz-focus-inner, input::-moz-focus-inner { 132 | border: 0; 133 | padding: 0; 134 | } 135 | 136 | input { 137 | line-height: normal; 138 | } 139 | 140 | input[type="text"] { 141 | box-sizing: border-box; 142 | padding: 0; 143 | } 144 | 145 | input[type="checkbox"], input[type="radio"] { 146 | box-sizing: border-box; 147 | padding: 0; 148 | } 149 | 150 | input::-webkit-input-placeholder { /* WebKit browsers */ 151 | font-size: 1rem; 152 | } 153 | input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 154 | font-size: 1rem; 155 | } 156 | input::-moz-placeholder { /* Mozilla Firefox 19+ */ 157 | font-size: 1rem; 158 | } 159 | input:-ms-input-placeholder { /* Internet Explorer 10+ */ 160 | font-size: 1rem; 161 | } 162 | 163 | input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { 164 | height: auto; 165 | } 166 | 167 | input[type="search"] { 168 | -webkit-appearance: textfield; 169 | box-sizing: border-box; 170 | } 171 | 172 | input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { 173 | -webkit-appearance: none; 174 | } 175 | 176 | fieldset { 177 | border: 1px solid #c0c0c0; 178 | margin: 0 2px; 179 | padding: 0.35em 0.625em 0.75em; 180 | } 181 | 182 | legend { 183 | border: 0; 184 | padding: 0; 185 | } 186 | 187 | textarea { 188 | overflow: auto; 189 | resize: vertical; 190 | vertical-align: top; 191 | } 192 | 193 | optgroup { 194 | font-weight: bold; 195 | } 196 | 197 | input, select, textarea { 198 | outline: 0; 199 | } 200 | 201 | textarea, input { 202 | -webkit-user-modify: read-write-plaintext-only; 203 | } 204 | 205 | input::-ms-clear, input::-ms-reveal { 206 | display: none; 207 | } 208 | 209 | input::-moz-placeholder, textarea::-moz-placeholder { 210 | color: #999; 211 | } 212 | 213 | input:-ms-input-placeholder, textarea:-ms-input-placeholder { 214 | color: #999; 215 | } 216 | 217 | input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { 218 | color: #999; 219 | } 220 | 221 | .placeholder { 222 | color: #999; 223 | } 224 | 225 | table { 226 | border-collapse: collapse; 227 | border-spacing: 0; 228 | } 229 | 230 | td, th { 231 | padding: 0; 232 | } 233 | 234 | h1, h2, h3, h4, h5, h6, p, figure, form, blockquote { 235 | margin: 0; 236 | } 237 | 238 | ul, ol, li, dl, dd { 239 | margin: 0; 240 | padding: 0; 241 | } 242 | 243 | ul, ol { 244 | list-style: none outside none; 245 | } 246 | 247 | h1, h2, h3 { 248 | line-height: 2; 249 | font-weight: normal; 250 | } 251 | 252 | h1 { 253 | font-size: 18px; 254 | } 255 | 256 | h2 { 257 | font-size: 16px; 258 | } 259 | 260 | h3 { 261 | font-size: 14px; 262 | } 263 | 264 | i { 265 | font-style: normal; 266 | } 267 | 268 | * { 269 | box-sizing: border-box; 270 | } 271 | 272 | .clearfix::before, .clearfix::after { 273 | content: ""; 274 | display: table; 275 | } 276 | 277 | .clearfix::after { 278 | clear: both; 279 | } -------------------------------------------------------------------------------- /DangDang/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = process.env.NODE_ENV === 'testing' 15 | ? require('../config/test.env') 16 | : require('../config/prod.env') 17 | 18 | const webpackConfig = merge(baseWebpackConfig, { 19 | module: { 20 | rules: utils.styleLoaders({ 21 | sourceMap: config.build.productionSourceMap, 22 | extract: true, 23 | usePostCSS: true 24 | }) 25 | }, 26 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 27 | output: { 28 | path: config.build.assetsRoot, 29 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 30 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 31 | }, 32 | plugins: [ 33 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 34 | new webpack.DefinePlugin({ 35 | 'process.env': env 36 | }), 37 | new UglifyJsPlugin({ 38 | uglifyOptions: { 39 | compress: { 40 | warnings: false 41 | } 42 | }, 43 | sourceMap: config.build.productionSourceMap, 44 | parallel: true 45 | }), 46 | // extract css into its own file 47 | new ExtractTextPlugin({ 48 | filename: utils.assetsPath('css/[name].[contenthash].css'), 49 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 50 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 51 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 52 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 53 | allChunks: true, 54 | }), 55 | // Compress extracted CSS. We are using this plugin so that possible 56 | // duplicated CSS from different components can be deduped. 57 | new OptimizeCSSPlugin({ 58 | cssProcessorOptions: config.build.productionSourceMap 59 | ? { safe: true, map: { inline: false } } 60 | : { safe: true } 61 | }), 62 | // generate dist index.html with correct asset hash for caching. 63 | // you can customize output by editing /index.html 64 | // see https://github.com/ampedandwired/html-webpack-plugin 65 | new HtmlWebpackPlugin({ 66 | filename: process.env.NODE_ENV === 'testing' 67 | ? 'index.html' 68 | : config.build.index, 69 | template: 'index.html', 70 | inject: true, 71 | minify: { 72 | removeComments: true, 73 | collapseWhitespace: true, 74 | removeAttributeQuotes: true 75 | // more options: 76 | // https://github.com/kangax/html-minifier#options-quick-reference 77 | }, 78 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 79 | chunksSortMode: 'dependency' 80 | }), 81 | // keep module.id stable when vendor modules does not change 82 | new webpack.HashedModuleIdsPlugin(), 83 | // enable scope hoisting 84 | new webpack.optimize.ModuleConcatenationPlugin(), 85 | // split vendor js into its own file 86 | new webpack.optimize.CommonsChunkPlugin({ 87 | name: 'vendor', 88 | minChunks (module) { 89 | // any required modules inside node_modules are extracted to vendor 90 | return ( 91 | module.resource && 92 | /\.js$/.test(module.resource) && 93 | module.resource.indexOf( 94 | path.join(__dirname, '../node_modules') 95 | ) === 0 96 | ) 97 | } 98 | }), 99 | // extract webpack runtime and module manifest to its own file in order to 100 | // prevent vendor hash from being updated whenever app bundle is updated 101 | new webpack.optimize.CommonsChunkPlugin({ 102 | name: 'manifest', 103 | minChunks: Infinity 104 | }), 105 | // This instance extracts shared chunks from code splitted chunks and bundles them 106 | // in a separate chunk, similar to the vendor chunk 107 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 108 | new webpack.optimize.CommonsChunkPlugin({ 109 | name: 'app', 110 | async: 'vendor-async', 111 | children: true, 112 | minChunks: 3 113 | }), 114 | 115 | // copy custom static assets 116 | new CopyWebpackPlugin([ 117 | { 118 | from: path.resolve(__dirname, '../static'), 119 | to: config.build.assetsSubDirectory, 120 | ignore: ['.*'] 121 | } 122 | ]) 123 | ] 124 | }) 125 | 126 | if (config.build.productionGzip) { 127 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 128 | 129 | webpackConfig.plugins.push( 130 | new CompressionWebpackPlugin({ 131 | asset: '[path].gz[query]', 132 | algorithm: 'gzip', 133 | test: new RegExp( 134 | '\\.(' + 135 | config.build.productionGzipExtensions.join('|') + 136 | ')$' 137 | ), 138 | threshold: 10240, 139 | minRatio: 0.8 140 | }) 141 | ) 142 | } 143 | 144 | if (config.build.bundleAnalyzerReport) { 145 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 146 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 147 | } 148 | 149 | module.exports = webpackConfig 150 | -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/demo_unicode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 29 | 30 | 31 |
32 |

IconFont 图标

33 |
    34 | 35 |
  • 36 | 37 |
    38 |
    &#xe601;
    39 |
  • 40 | 41 |
  • 42 | 43 |
    房子
    44 |
    &#xe60f;
    45 |
  • 46 | 47 |
  • 48 | 49 |
    购物车满
    50 |
    &#xe652;
    51 |
  • 52 | 53 |
  • 54 | 55 |
    值得买2
    56 |
    &#xe71d;
    57 |
  • 58 | 59 |
  • 60 | 61 |
    房子
    62 |
    &#xe64c;
    63 |
  • 64 | 65 |
  • 66 | 67 |
    68 |
    &#xe6f4;
    69 |
  • 70 | 71 |
  • 72 | 73 |
    购物车空
    74 |
    &#xe505;
    75 |
  • 76 | 77 |
  • 78 | 79 |
    放大镜
    80 |
    &#xe501;
    81 |
  • 82 | 83 |
  • 84 | 85 |
    购物车空
    86 |
    &#xe502;
    87 |
  • 88 | 89 |
  • 90 | 91 |
    分类图标-01
    92 |
    &#xe605;
    93 |
  • 94 | 95 |
  • 96 | 97 |
    分类图标
    98 |
    &#xe606;
    99 |
  • 100 | 101 |
  • 102 | 103 |
    三点
    104 |
    &#xe676;
    105 |
  • 106 | 107 |
  • 108 | 109 |
    房子
    110 |
    &#xe6d9;
    111 |
  • 112 | 113 |
114 |

unicode引用

115 |
116 | 117 |

unicode是字体在网页端最原始的应用方式,特点是:

118 |
    119 |
  • 兼容性最好,支持ie6+,及所有现代浏览器。
  • 120 |
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • 121 |
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
  • 122 |
123 |
124 |

注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式

125 |
126 |

unicode使用步骤如下:

127 |

第一步:拷贝项目下面生成的font-face

128 |
@font-face {
129 |   font-family: 'iconfont';
130 |   src: url('iconfont.eot');
131 |   src: url('iconfont.eot?#iefix') format('embedded-opentype'),
132 |   url('iconfont.woff') format('woff'),
133 |   url('iconfont.ttf') format('truetype'),
134 |   url('iconfont.svg#iconfont') format('svg');
135 | }
136 | 
137 |

第二步:定义使用iconfont的样式

138 |
.iconfont{
139 |   font-family:"iconfont" !important;
140 |   font-size:16px;font-style:normal;
141 |   -webkit-font-smoothing: antialiased;
142 |   -webkit-text-stroke-width: 0.2px;
143 |   -moz-osx-font-smoothing: grayscale;
144 | }
145 | 
146 |

第三步:挑选相应图标并获取字体编码,应用于页面

147 |
<i class="iconfont">&#x33;</i>
148 | 149 |
150 |

"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。

151 |
152 |
153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/demo_symbol.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 10 | 24 | 25 | 26 |
27 |

IconFont 图标

28 |
    29 | 30 |
  • 31 | 34 |
    35 |
    #icon-ren-copy
    36 |
  • 37 | 38 |
  • 39 | 42 |
    房子
    43 |
    #icon-fangzi
    44 |
  • 45 | 46 |
  • 47 | 50 |
    购物车满
    51 |
    #icon-shopping-cart-full
    52 |
  • 53 | 54 |
  • 55 | 58 |
    值得买2
    59 |
    #icon-zhidemai2
    60 |
  • 61 | 62 |
  • 63 | 66 |
    房子
    67 |
    #icon-dvt-home
    68 |
  • 69 | 70 |
  • 71 | 74 |
    75 |
    #icon-cloud-lock
    76 |
  • 77 | 78 |
  • 79 | 82 |
    购物车空
    83 |
    #icon-gouwuchekong
    84 |
  • 85 | 86 |
  • 87 | 90 |
    放大镜
    91 |
    #icon-fangdajing
    92 |
  • 93 | 94 |
  • 95 | 98 |
    购物车空
    99 |
    #icon-cart-copy
    100 |
  • 101 | 102 |
  • 103 | 106 |
    分类图标-01
    107 |
    #icon-fenleitubiao-
    108 |
  • 109 | 110 |
  • 111 | 114 |
    分类图标
    115 |
    #icon-fenleitubiao
    116 |
  • 117 | 118 |
  • 119 | 122 |
    三点
    123 |
    #icon-sandian
    124 |
  • 125 | 126 |
  • 127 | 130 |
    房子
    131 |
    #icon-home-o
    132 |
  • 133 | 134 |
135 | 136 | 137 |

symbol引用

138 |
139 | 140 |

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 141 | 这种用法其实是做了一个svg的集合,与另外两种相比具有如下特点:

142 |
    143 |
  • 支持多色图标了,不再受单色限制。
  • 144 |
  • 通过一些技巧,支持像字体那样,通过font-size,color来调整样式。
  • 145 |
  • 兼容性较差,支持 ie9+,及现代浏览器。
  • 146 |
  • 浏览器渲染svg的性能一般,还不如png。
  • 147 |
148 |

使用步骤如下:

149 |

第一步:引入项目下面生成的symbol代码:

150 |
<script src="./iconfont.js"></script>
151 |

第二步:加入通用css代码(引入一次就行):

152 |
<style type="text/css">
153 | .icon {
154 |    width: 1em; height: 1em;
155 |    vertical-align: -0.15em;
156 |    fill: currentColor;
157 |    overflow: hidden;
158 | }
159 | </style>
160 |

第三步:挑选相应图标并获取类名,应用于页面:

161 |
<svg class="icon" aria-hidden="true">
162 |   <use xlink:href="#icon-xxx"></use>
163 | </svg>
164 |         
165 |
166 | 167 | 168 | -------------------------------------------------------------------------------- /DangDang/src/assets/iconfont/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main { 60 | padding: 30px 100px; 61 | width: 960px; 62 | margin: 0 auto; 63 | } 64 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 65 | 66 | .helps{margin-top:40px;} 67 | .helps pre{ 68 | padding:20px; 69 | margin:10px 0; 70 | border:solid 1px #e7e1cd; 71 | background-color: #fffdef; 72 | overflow: auto; 73 | } 74 | 75 | .icon_lists{ 76 | width: 100% !important; 77 | 78 | } 79 | 80 | .icon_lists li{ 81 | float:left; 82 | width: 100px; 83 | height:180px; 84 | text-align: center; 85 | list-style: none !important; 86 | } 87 | .icon_lists .icon{ 88 | font-size: 42px; 89 | line-height: 100px; 90 | margin: 10px 0; 91 | color:#333; 92 | -webkit-transition: font-size 0.25s ease-out 0s; 93 | -moz-transition: font-size 0.25s ease-out 0s; 94 | transition: font-size 0.25s ease-out 0s; 95 | 96 | } 97 | .icon_lists .icon:hover{ 98 | font-size: 100px; 99 | } 100 | 101 | 102 | 103 | .markdown { 104 | color: #666; 105 | font-size: 14px; 106 | line-height: 1.8; 107 | } 108 | 109 | .highlight { 110 | line-height: 1.5; 111 | } 112 | 113 | .markdown img { 114 | vertical-align: middle; 115 | max-width: 100%; 116 | } 117 | 118 | .markdown h1 { 119 | color: #404040; 120 | font-weight: 500; 121 | line-height: 40px; 122 | margin-bottom: 24px; 123 | } 124 | 125 | .markdown h2, 126 | .markdown h3, 127 | .markdown h4, 128 | .markdown h5, 129 | .markdown h6 { 130 | color: #404040; 131 | margin: 1.6em 0 0.6em 0; 132 | font-weight: 500; 133 | clear: both; 134 | } 135 | 136 | .markdown h1 { 137 | font-size: 28px; 138 | } 139 | 140 | .markdown h2 { 141 | font-size: 22px; 142 | } 143 | 144 | .markdown h3 { 145 | font-size: 16px; 146 | } 147 | 148 | .markdown h4 { 149 | font-size: 14px; 150 | } 151 | 152 | .markdown h5 { 153 | font-size: 12px; 154 | } 155 | 156 | .markdown h6 { 157 | font-size: 12px; 158 | } 159 | 160 | .markdown hr { 161 | height: 1px; 162 | border: 0; 163 | background: #e9e9e9; 164 | margin: 16px 0; 165 | clear: both; 166 | } 167 | 168 | .markdown p, 169 | .markdown pre { 170 | margin: 1em 0; 171 | } 172 | 173 | .markdown > p, 174 | .markdown > blockquote, 175 | .markdown > .highlight, 176 | .markdown > ol, 177 | .markdown > ul { 178 | width: 80%; 179 | } 180 | 181 | .markdown ul > li { 182 | list-style: circle; 183 | } 184 | 185 | .markdown > ul li, 186 | .markdown blockquote ul > li { 187 | margin-left: 20px; 188 | padding-left: 4px; 189 | } 190 | 191 | .markdown > ul li p, 192 | .markdown > ol li p { 193 | margin: 0.6em 0; 194 | } 195 | 196 | .markdown ol > li { 197 | list-style: decimal; 198 | } 199 | 200 | .markdown > ol li, 201 | .markdown blockquote ol > li { 202 | margin-left: 20px; 203 | padding-left: 4px; 204 | } 205 | 206 | .markdown code { 207 | margin: 0 3px; 208 | padding: 0 5px; 209 | background: #eee; 210 | border-radius: 3px; 211 | } 212 | 213 | .markdown pre { 214 | border-radius: 6px; 215 | background: #f7f7f7; 216 | padding: 20px; 217 | } 218 | 219 | .markdown pre code { 220 | border: none; 221 | background: #f7f7f7; 222 | margin: 0; 223 | } 224 | 225 | .markdown strong, 226 | .markdown b { 227 | font-weight: 600; 228 | } 229 | 230 | .markdown > table { 231 | border-collapse: collapse; 232 | border-spacing: 0px; 233 | empty-cells: show; 234 | border: 1px solid #e9e9e9; 235 | width: 95%; 236 | margin-bottom: 24px; 237 | } 238 | 239 | .markdown > table th { 240 | white-space: nowrap; 241 | color: #333; 242 | font-weight: 600; 243 | 244 | } 245 | 246 | .markdown > table th, 247 | .markdown > table td { 248 | border: 1px solid #e9e9e9; 249 | padding: 8px 16px; 250 | text-align: left; 251 | } 252 | 253 | .markdown > table th { 254 | background: #F7F7F7; 255 | } 256 | 257 | .markdown blockquote { 258 | font-size: 90%; 259 | color: #999; 260 | border-left: 4px solid #e9e9e9; 261 | padding-left: 0.8em; 262 | margin: 1em 0; 263 | font-style: italic; 264 | } 265 | 266 | .markdown blockquote p { 267 | margin: 0; 268 | } 269 | 270 | .markdown .anchor { 271 | opacity: 0; 272 | transition: opacity 0.3s ease; 273 | margin-left: 8px; 274 | } 275 | 276 | .markdown .waiting { 277 | color: #ccc; 278 | } 279 | 280 | .markdown h1:hover .anchor, 281 | .markdown h2:hover .anchor, 282 | .markdown h3:hover .anchor, 283 | .markdown h4:hover .anchor, 284 | .markdown h5:hover .anchor, 285 | .markdown h6:hover .anchor { 286 | opacity: 1; 287 | display: inline-block; 288 | } 289 | 290 | .markdown > br, 291 | .markdown > p > br { 292 | clear: both; 293 | } 294 | 295 | 296 | .hljs { 297 | display: block; 298 | background: white; 299 | padding: 0.5em; 300 | color: #333333; 301 | overflow-x: auto; 302 | } 303 | 304 | .hljs-comment, 305 | .hljs-meta { 306 | color: #969896; 307 | } 308 | 309 | .hljs-string, 310 | .hljs-variable, 311 | .hljs-template-variable, 312 | .hljs-strong, 313 | .hljs-emphasis, 314 | .hljs-quote { 315 | color: #df5000; 316 | } 317 | 318 | .hljs-keyword, 319 | .hljs-selector-tag, 320 | .hljs-type { 321 | color: #a71d5d; 322 | } 323 | 324 | .hljs-literal, 325 | .hljs-symbol, 326 | .hljs-bullet, 327 | .hljs-attribute { 328 | color: #0086b3; 329 | } 330 | 331 | .hljs-section, 332 | .hljs-name { 333 | color: #63a35c; 334 | } 335 | 336 | .hljs-tag { 337 | color: #333333; 338 | } 339 | 340 | .hljs-title, 341 | .hljs-attr, 342 | .hljs-selector-id, 343 | .hljs-selector-class, 344 | .hljs-selector-attr, 345 | .hljs-selector-pseudo { 346 | color: #795da3; 347 | } 348 | 349 | .hljs-addition { 350 | color: #55a532; 351 | background-color: #eaffea; 352 | } 353 | 354 | .hljs-deletion { 355 | color: #bd2c00; 356 | background-color: #ffecec; 357 | } 358 | 359 | .hljs-link { 360 | text-decoration: underline; 361 | } 362 | 363 | pre{ 364 | background: #fff; 365 | } 366 | 367 | 368 | 369 | 370 | 371 | -------------------------------------------------------------------------------- /DangDang/src/components/login/denlu.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 121 | 122 | 123 | 291 | -------------------------------------------------------------------------------- /DangDang/src/components/login/log.vue: -------------------------------------------------------------------------------- 1 | 102 | 103 | 117 | 118 | 119 | 295 | -------------------------------------------------------------------------------- /DangDang/src/components/product/bottombar.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /DangDang/src/container/Vbuy.vue: -------------------------------------------------------------------------------- 1 | 69 | 70 | 180 | 181 | 182 | 296 | -------------------------------------------------------------------------------- /DangDang/src/container/Vcart.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 165 | 166 | 167 | 340 | --------------------------------------------------------------------------------