├── .browserslistrc
├── .eslintrc.js
├── .gitignore
├── .postcssrc.js
├── README.md
├── babel.config.js
├── get_data
├── cateList.js
├── cateList2.js
├── detail.js
├── item.js
├── maketDesc.js
├── manufacturer.js
└── topic.js
├── mock
├── banner_1.json
├── cateList.json
├── comment_1.json
├── comment_2.json
├── comment_3.json
├── comment_4.json
├── comment_tag.json
├── goodsDetail.json
├── index.js
├── indexPage_arrivals.json
├── indexPage_categoryGoods.json
├── indexPage_channels.json
├── indexPage_hotSellProduct.json
├── indexPage_popularRecommend.json
├── itemLists_1.json
├── itemLists_2.json
├── itemLists_3.json
├── itemLists_4.json
├── itemLists_5.json
├── itemLists_6.json
├── itemLists_7.json
├── itemLists_8.json
├── manufacturer.json
├── market_desc.json
├── rcmd.json
├── search_kds.json
├── topic.json
└── util.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── preset-default-vue-cli-3.js
├── public
├── favicon.ico
└── index.html
├── src
├── App.vue
├── api
│ ├── cateList.js
│ ├── comment.js
│ ├── common.js
│ ├── goodsDetail.js
│ ├── index.js
│ ├── items.js
│ ├── manufacturer.js
│ ├── marketDesc.js
│ ├── middleware.js
│ ├── search.js
│ ├── topic.js
│ └── user.js
├── assets
│ ├── css
│ │ ├── mixin.scss
│ │ ├── productList.scss
│ │ └── reset.scss
│ ├── font
│ │ ├── iconfont.css
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ └── iconfont.woff2
│ └── img
│ │ └── logo.png
├── components
│ ├── common
│ │ ├── Banner.vue
│ │ ├── CategoryGoodsBlock.vue
│ │ ├── CategoryNav.vue
│ │ ├── CommentModule.vue
│ │ ├── GoTop.vue
│ │ ├── ProductCard.vue
│ │ ├── ProductShowContainer.vue
│ │ ├── ProductTag.vue
│ │ ├── SpaceModule.vue
│ │ ├── SpecificationLabel.vue
│ │ └── ThroughLineTitle.vue
│ └── market
│ │ ├── GuessYouLike.vue
│ │ └── OptimalTo.vue
├── layout
│ ├── footer
│ │ ├── BuyFooter.vue
│ │ └── Footer.vue
│ └── header
│ │ ├── OnlySearchHeader.vue
│ │ ├── SimpleHeader.vue
│ │ └── TopHeader.vue
├── main.js
├── page
│ ├── cart
│ │ └── index.vue
│ ├── cateList
│ │ └── index.vue
│ ├── comment
│ │ ├── comment.vue
│ │ └── index.js
│ ├── goodsDetail
│ │ ├── GoodsArgument.vue
│ │ ├── GoodsComment.vue
│ │ ├── GoodsInfo.vue
│ │ ├── GoodsSpecification.vue
│ │ ├── goodsDetail.vue
│ │ └── index.js
│ ├── index
│ │ ├── BrandMade.vue
│ │ ├── FastArrival.vue
│ │ ├── FreshmanModule.vue
│ │ ├── HotSell.vue
│ │ ├── PopularRecommend.vue
│ │ ├── ShoppingChannle.vue
│ │ ├── index.js
│ │ └── index.vue
│ ├── items
│ │ ├── ItemProductBlock.vue
│ │ ├── index.js
│ │ └── items.vue
│ ├── login
│ │ └── index.vue
│ ├── manufacturer
│ │ └── index.vue
│ ├── marketDesc
│ │ └── index.vue
│ ├── notFound.vue
│ ├── search
│ │ ├── index.js
│ │ └── search.vue
│ └── topic
│ │ └── index.vue
├── router.js
├── store
│ ├── index.js
│ ├── modules
│ │ ├── cateList.js
│ │ ├── comment.js
│ │ ├── common.js
│ │ ├── goodsDetail.js
│ │ ├── home.js
│ │ ├── items.js
│ │ ├── manufacturer.js
│ │ ├── marketDesc.js
│ │ ├── search.js
│ │ └── topic.js
│ └── mutation-types.js
└── utils
│ └── index.js
├── static
└── img
│ ├── brand
│ ├── brand_1.png
│ ├── brand_2.png
│ ├── brand_3.png
│ └── brand_4.png
│ ├── group.png
│ ├── new_bag.png
│ └── well.png
├── tests
└── unit
│ ├── .eslintrc.js
│ └── example.spec.js
└── vue.config.js
/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 | not ie <= 8
4 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | extends: [
7 | "plugin:vue/essential",
8 | ],
9 | rules: {
10 | "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
11 | "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
12 | },
13 | parserOptions: {
14 | parser: "babel-eslint"
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw*
22 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | module.exports =
2 | {
3 | "postcss": {
4 | "cssnano": {
5 | "preset": "advanced",
6 | "autoprefixer": false,
7 | "postcss-zindex": false
8 | }
9 | },
10 | "plugins": {
11 | "postcss-import": {},
12 | "postcss-url": {},
13 | "postcss-aspect-ratio-mini": {},
14 | "postcss-write-svg": {
15 | utf8: false
16 | },
17 | "postcss-cssnext": {},
18 | "postcss-px-to-viewport": {
19 | viewportWidth: 375,
20 | viewportHeight: 1334,
21 | unitPrecision: 3,
22 | viewportUnit: 'vw',
23 | selectorBlackList: ['.ignore', '.hairlines'],
24 | minPixelValue: 1,
25 | mediaQuery: false
26 | },
27 | "postcss-viewport-units":{
28 | filterRule: rule => rule.nodes.findIndex(i => i.prop === 'content') === -1
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | ### 关于
3 | 适配多种设备视口是移动端所面对的场景,之前开发项目中多采用rem、media查询、flex百分比等布局,最近研究vw(视口单位)实现适配布局过程中,决定采用vue写仿网易严选项目练习下
4 | - - -
5 | 注:讲解几种适配大法比较好的文章[https://juejin.im/post/5bc07ebf6fb9a05d026119a9]
6 |
7 | ### 关于兼容
8 | 由于精力有限,只测试了vivo、6p、xr机型部分浏览器。由于vw针对视口逐步放大,暂未解决pc下字体和盒子元素过大的问题
9 |
10 | #### 关于后端
11 | 暂未开发后台,留待以后开发node + mongodb的简单后台。开发环境采用简单mock数据,生产环境采用axios请求固定数据源。目前跟登录、购物相关页面暂未开发
12 |
13 | ### 技术栈
14 | vue2 + vuex + vue-router + webpack + ES6 + axios + sass
15 |
16 | ### 运行
17 | ```
18 | git clone https://github.com/lusteng/vue-yanxuan.git
19 |
20 | cd vue-yanxuan
21 |
22 | npm i 或者 yarn
23 |
24 | npm run serve
25 |
26 | ```
27 |
28 | ### Demo
29 |
30 | [http://www.liubaitong.com/view/?site=yanxuan](http://www.liubaitong.com/view/?site=yanxuan)
31 |
32 | ### 部分页面截图
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | ### 目录结构
41 |
42 | ```
43 |
44 | ├── mock //dev 开发环境 mock数据
45 | ├── public
46 | ├── src
47 | | ├── api //请求接口集合
48 | | | ├── cateList.js
49 | | | ├── comment.js
50 | | | ├── common.js
51 | | | ├── goodsDetail.js
52 | | | ├── index.js
53 | | | ├── items.js
54 | | | ├── manufacturer.js
55 | | | ├── marketDesc.js
56 | | | ├── middleware.js
57 | | | ├── search.js
58 | | | ├── topic.js
59 | | | └── user.js
60 | | ├── App.vue
61 | | ├── assets //logo、样式、字体集合
62 | | | ├── css
63 | | | ├── font
64 | | | └── img
65 | | ├── components //公共组件
66 | | | ├── common
67 | | | └── market
68 | | ├── layout //布局组件
69 | | | ├── footer
70 | | | └── header
71 | | ├── main.js
72 | | ├── page //页面
73 | | | ├── cart
74 | | | ├── cateList
75 | | | ├── comment
76 | | | ├── goodsDetail
77 | | | ├── index
78 | | | ├── items
79 | | | ├── login
80 | | | ├── manufacturer
81 | | | ├── marketDesc
82 | | | ├── notFound.vue
83 | | | ├── search
84 | | | └── topic
85 | | ├── router.js
86 | | ├── store //数据源
87 | | | ├── index.js
88 | | | └── mutation-types.js
89 | | └── utils //工具方法
90 | | └── index.js
91 | ├── static //静态资源
92 | | └── img
93 | ├── tests
94 | ├── .postcssrc.js //配置vw文件
95 | .
96 | .
97 |
98 | ```
99 |
100 | ### TODO
101 | + node + mongodb 模仿数据后台
102 | + 登录系统、用户系统
103 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ["@vue/app"],
3 | plugins: [
4 | ['import', {
5 | libraryName: 'vant',
6 | libraryDirectory: 'es',
7 | style: true
8 | }, 'vant']
9 | ]
10 | };
11 |
--------------------------------------------------------------------------------
/get_data/cateList.js:
--------------------------------------------------------------------------------
1 | let
2 | json = {},
3 | nav = []
4 |
5 | $.each($('.m-cateNavVert .item'), function(){
6 | nav.push({
7 | name: $(this).find('a').text()
8 | })
9 | })
10 |
11 | json.nav = nav
12 |
13 | console.log(JSON.stringify(json))
--------------------------------------------------------------------------------
/get_data/cateList2.js:
--------------------------------------------------------------------------------
1 | let json = {};
2 | json.banner = $('.m-subCateContainer .banner').css('background-image').match(/url\(\"(\S*?)\"\)/)[1]
3 | let list = [];
4 |
5 | $.each($('.m-subCateContainer .cateList'), function(){
6 | let cates = [];
7 | $.each($(this).find('.cateItem'), function(){
8 | cates.push(
9 | {
10 | picUrl: $(this).find('img').attr('src'),
11 | text: $(this).find('.name').text()
12 | }
13 | )
14 | });
15 | list.push({
16 | til: $(this).find('.hd').length > 0 ? $(this).find('.hd').text() : '',
17 | cates
18 | })
19 | })
20 |
21 | json.list = list
22 |
23 | console.log(JSON.stringify(json))
--------------------------------------------------------------------------------
/get_data/detail.js:
--------------------------------------------------------------------------------
1 | var json = {}
2 |
3 | var banner = []
4 | $.each($('.swiper-wrapper .swiper-slide'), function(){
5 | banner.push({
6 | 'picUrl' : $(this).find('img').attr('src')
7 | })
8 | })
9 |
10 | json.banner = banner
11 |
12 | var characteristic = []
13 |
14 | $.each($('.m-characteristic .item'), function(){
15 | characteristic.push({
16 | picUrl: $(this).find('img').attr('src'),
17 | text1: $(this).find('.right .text:first').text(),
18 | text2: $(this).find('.right .text:last').text()
19 | })
20 | })
21 |
22 | json.characteristic = characteristic
23 |
24 | var price = {
25 | origin_p: $('.m-detailBaseInfo .currentPrice span:last').text(),
26 | super_p: $('.m-detailBaseInfo .spmcBanner span:first').text(),
27 | title: $('.m-detailBaseInfo .baseInfo .name').text(),
28 | desc: $('.m-detailBaseInfo .desc').text(),
29 | reputatio: $('.m-detailBaseInfo .wrap .num').text(),
30 | }
31 |
32 | json.price = price
33 |
34 | var comment = {
35 | comment_n: $('.m-detailComment').find('.title span:nth-of-type(2)').text(),
36 | rate: $('.m-detailComment').find('.comment-checkAll .rate').text(),
37 | result:[{
38 | "skuInfo": ["M", "黑色"],
39 | "frontUserName": "耳****",
40 | "content": "穿着非常有气质,显腿长,显腰细,哈哈,奥黛丽赫本风,超级喜欢",
41 | "createTime": 1525892551248,
42 | "picList": ["https://yanxuan.nosdn.127.net/5ef9c6bc390c823119ccf4a5cb759447.jpg", "https://yanxuan.nosdn.127.net/a9f8daa562d828349ad6eb5fd8982475.jpg", "https://yanxuan.nosdn.127.net/93bce4c659fd8804678b904dfae8b656.jpg", "https://yanxuan.nosdn.127.net/d6515036d240e0733aa5e172c1b0645b.jpg"],
43 | "frontUserAvatar": "http://thirdqq.qlogo.cn/qqapp/1104949895/3314E1893F4B4F5EF077B296EFFBFD2D/100",
44 | "commentReplyVO": null,
45 | "memberLevel": 2,
46 | "appendCommentVO": null,
47 | "star": 5,
48 | "itemId": 1447011,
49 | "commentItemTagVO": {
50 | "type": 1,
51 | "schemeUrl": "https://m.you.163.com/topic/v1/look/list"
52 | }
53 | }]
54 | }
55 | json.comment = comment
56 |
57 |
58 | var arg = []
59 | $.each($('.m-itemDetail .dt-section .item'), function(){
60 | arg.push({
61 | name: $(this).find('.left').text(),
62 | cnt: $(this).find('.right .con').text()
63 | })
64 | })
65 |
66 | json.arg = arg
67 |
68 | json.html = $('.m-detailHtml').html();
69 |
70 | console.log(JSON.stringify(json))
--------------------------------------------------------------------------------
/get_data/item.js:
--------------------------------------------------------------------------------
1 | var json = {}
2 | json.banner_img = $('.m-banner').css('background').match(/rgba\(0, 0, 0, 0\) url\(\"(\S*?)\"\) repeat scroll 50% 50% \/ cover padding-box border-box/)[1];
3 | var lists = [];
4 | $.each($('ul.list .f-mb20'), function(item, index){
5 | if(item > 3){
6 | return ;
7 | }
8 | var list = [];
9 | $.each($(this).find('.m-goodGrid').find('li.item'), function(){
10 | list.push({
11 | "title": $(this).find('.name span').text(),
12 | "sub_title": "",
13 | "picUrl": $(this).find('.m-lazyload img').attr('src'),
14 | "tag": $(this).find('.gradientPrice').text(),
15 | "spec": $(this).find('.specification').text(),
16 | "price": $(this).find('.priceInner span:first span:last').text(),
17 | "discount": $(this).find('.counterPrice span:last').text(),
18 | "desc": $(this).find('.desc span:last').text()
19 | })
20 | });
21 | lists.push({
22 | title: $(this).find('header.hd .name').text(),
23 | sub_title: $(this).find('header.hd .desc').text(),
24 | list
25 | })
26 | })
27 | json.list = lists;
28 | console.log(JSON.stringify(json))
29 |
30 |
--------------------------------------------------------------------------------
/get_data/maketDesc.js:
--------------------------------------------------------------------------------
1 |
2 | $('.cyclopes-module').html()
3 | //TODO: 去空格," 转成 '
--------------------------------------------------------------------------------
/get_data/manufacturer.js:
--------------------------------------------------------------------------------
1 | var json = {}
2 | json.mr = {
3 | img: $('.m-manufacturer-itemlist .imgWraper img').attr('src'),
4 | title: $('.m-manufacturer-itemlist .header .banner').text(),
5 | desc: [],
6 | }
7 |
8 | $.each($('.m-manufacturer-itemlist .desc div'), function(){
9 | json.mr.desc.push($(this).text())
10 | })
11 |
12 |
13 | var list = [];
14 | $.each($('.m-goodGrid li.item'), function(item, index){
15 | list.push({
16 | "title": $(this).find('.name span').text(),
17 | "sub_title": "",
18 | "picUrl": $(this).find('.m-lazyload img').attr('src'),
19 | "tag": $(this).find('.gradientPrice').text(),
20 | "spec": $(this).find('.specification').text(),
21 | "price": $(this).find('.priceInner span:first span:last').text(),
22 | "discount": $(this).find('.counterPrice span:last').text(),
23 | "desc": $(this).find('.desc span:last').text()
24 | })
25 | })
26 | json.list = list;
27 | console.log(JSON.stringify(json))
28 |
29 |
--------------------------------------------------------------------------------
/get_data/topic.js:
--------------------------------------------------------------------------------
1 | var json = {
2 | "errCode":"0",
3 | "data": []
4 | }
5 | $.each($('.m-main-content').find('.m-tpls'), function(){
6 | json.data.push(
7 | {
8 | til: $(this).find('.u-name span:last-child').text(),
9 | tip: $(this).find('.u-name span:first-child img').attr('src'),
10 | desc: $(this).find('.title').text(),
11 | pic: $(this).find('.u-pic img').attr('src'),
12 | look: $(this).find('.u-rcount span').text()
13 | }
14 | )
15 | })
16 |
17 | console.log(JSON.stringify(json))
--------------------------------------------------------------------------------
/mock/banner_1.json:
--------------------------------------------------------------------------------
1 | {
2 | "errCode": 0,
3 | "data": [
4 | {
5 | "src": "https://yanxuan.nosdn.127.net/9b48e1e9e3002bad26cec13d9d9febf4.jpg?imageView&quality=75&thumbnail=750x0",
6 | "link": ""
7 | },
8 | {
9 | "src": "https://yanxuan.nosdn.127.net/d12d444efc98621ad288352506740f07.jpg?imageView&quality=75&thumbnail=750x0",
10 | "link": ""
11 | },
12 | {
13 | "src": "https://yanxuan.nosdn.127.net/4e8dcdf8b85d240f505177d45db7b108.jpg?imageView&quality=75&thumbnail=750x0",
14 | "link": ""
15 | },
16 | {
17 | "src": "https://yanxuan.nosdn.127.net/f1ac500da5ce732ff3da189d5bb44efe.jpeg?imageView&quality=75&thumbnail=750x0",
18 | "link": ""
19 | },
20 | {
21 | "src": "https://yanxuan.nosdn.127.net/0266e997e1b26ce222d5f02d2a819350.jpg?imageView&quality=75&thumbnail=750x0",
22 | "link": ""
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/mock/comment_1.json:
--------------------------------------------------------------------------------
1 | {"errCode":"0","data":{"pagination":{"page":1,"size":10,"totalPage":43,"total":426,"lastPage":false},"result":[{"skuInfo":["M","黑色"],"frontUserName":"耳****","content":"穿着非常有气质,显腿长,显腰细,哈哈,奥黛丽赫本风,超级喜欢","createTime":1525892551248,"picList":["https://yanxuan.nosdn.127.net/5ef9c6bc390c823119ccf4a5cb759447.jpg","https://yanxuan.nosdn.127.net/a9f8daa562d828349ad6eb5fd8982475.jpg","https://yanxuan.nosdn.127.net/93bce4c659fd8804678b904dfae8b656.jpg","https://yanxuan.nosdn.127.net/d6515036d240e0733aa5e172c1b0645b.jpg"],"frontUserAvatar":"http://thirdqq.qlogo.cn/qqapp/1104949895/3314E1893F4B4F5EF077B296EFFBFD2D/100","commentReplyVO":null,"memberLevel":2,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":{"type":1,"schemeUrl":"https://m.you.163.com/topic/v1/look/list"}},{"skuInfo":["M","黑色"],"frontUserName":"A****","content":"被包装惊艳到了,裙子穿上特别显身材,面料略厚,空调房里可以穿","createTime":1527120142609,"picList":["https://yanxuan.nosdn.127.net/07beeb1cf6bf19797f0e6c49e360386c.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/dc4d89af2baeb53c8cbb36936559a9b0.jpg","commentReplyVO":{"id":20138940,"replyContent":"收到您的评价严选万分欣喜,您的需求与满意就是我们不断前进的动力,我们会继续努力给您带来更佳的购物体验,望您持续关注网易严选,祝开心快乐每一天!","createTime":"2018-05-24 10:04:33"},"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"w****c","content":"包装好,衣服质量超好,有质感垂感,穿在身上很有气质,两三百能买到这么好的衣服,真的性价比超高~不过衣服略厚,夏天太热肯定穿不了","createTime":1526877480962,"picList":["https://yanxuan.nosdn.127.net/484acbbbf0dc4334232d17c3c40a66b9.jpg","https://yanxuan.nosdn.127.net/8ee0b3e89d269d04266ee0fdf75c85d3.jpg","https://yanxuan.nosdn.127.net/43542baba46ce4c50641a12d36aed1d5.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/75ebaece30849c5df7acf171ba576f97.jpg","commentReplyVO":{"id":20137515,"replyContent":"o(≧v≦)o感谢您的支持与认可,严选竭力追求为客户提供超高性价比的商品,期待您的再次选购,祝您生活愉快!","createTime":"2018-05-21 21:00:11"},"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"p****1","content":"拿到手,感觉沉甸甸的啊。份量好重,厚实!款式简洁,不会过时。超赞!","createTime":1543913225907,"picList":["https://yanxuan.nosdn.127.net/be6bf64db89d3d0222d2241ebab5c1f9.jpg"],"frontUserAvatar":"http://yanxuan.nosdn.127.net/f23fab1b5a89ece5b5d9a57863dc2476","commentReplyVO":null,"memberLevel":3,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["XL","黑色"],"frontUserName":"霞****天","content":"请忽略拍照技术 实物好看 沉甸甸的 很有质感","createTime":1550490725462,"picList":["https://yanxuan.nosdn.127.net/d60d7d5c17835f986f12a847f1431042.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/6f6da8466319c869a26d9541fdee66e1.jpg","commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["L","黑色"],"frontUserName":"m****6","content":"非常显瘦!裙摆有垂感。稍厚,不会皱。总体评价100分!","createTime":1544349500374,"picList":["https://yanxuan.nosdn.127.net/160fbdbc7bc07e087e8ca704c67b9d07.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"张****玲","content":"裙子垂感不错,有赫本风,但有点厚,只能秋天再穿了。这包装实在太帅了","createTime":1528026892063,"picList":["https://yanxuan.nosdn.127.net/f8e8474ca42273922e929ce86a1173f7.jpg","https://yanxuan.nosdn.127.net/79520a48365baec229989974d77c6efb.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/68c7e61fef2dec8803f0c7810be30bc8","commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"扬****","content":"很厚实的针织裙。只是不知道洗过后如何整形处理。版型相当不错。显瘦,显腰细。高跟鞋效果应该更好。","createTime":1526979550957,"picList":["https://yanxuan.nosdn.127.net/4a59942ea8840c4c686e6cefe9fd5fe4.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/2a08fac3917cb13d88b90bee1660b0f0","commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"熊****仙","content":"款式很不错,束腰显瘦,今年的流行款,老婆穿着很nice。颜色可选只有黑色,少了点,期待更多的颜色","createTime":1526017551836,"picList":["https://yanxuan.nosdn.127.net/175e563d81ea4bac86af1800799e5538.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/aa722664acb5b3499f5f5f19d64c51f7.jpg","commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["XL","黑色"],"frontUserName":"f****","content":"小胖子穿上也很显瘦,严选质量太赞\uD83D\uDC4D\uD83C\uDFFB同事都被圈粉了 准备再入手个衬衫","createTime":1521958071787,"picList":["https://yanxuan.nosdn.127.net/1ed872874ed259fb7ab28c3bbd660760.jpg"],"frontUserAvatar":"http://yanxuan.nosdn.127.net/80ce726dc7380620c44bb55643a633ee","commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null}],"relatedItemCommentTag":null}}
--------------------------------------------------------------------------------
/mock/comment_2.json:
--------------------------------------------------------------------------------
1 | {"errCode":"0","data":{"pagination":{"page":2,"size":10,"totalPage":43,"total":430,"lastPage":false},"result":[{"skuInfo":["S","黑色"],"frontUserName":"ゞ****…","content":"裙子真的很好看,质量很好,穿上很显气质又修身。","createTime":1526269044801,"picList":["https://yanxuan.nosdn.127.net/c7c2e11d1acaabc6e81f6a46d619db4a.jpg","https://yanxuan.nosdn.127.net/9b98de44db5cde68f96a4da8f57b2c86.jpg"],"frontUserAvatar":"http://q.qlogo.cn/qqapp/1104949895/7BB2B6BB9E60854257F3E41D8878CBCC/100","commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"☆****ヤ","content":"这个包装惊艳了我,裙子质量很好。","createTime":1526425472843,"picList":["https://yanxuan.nosdn.127.net/ceff0fb4a126d17668f8d2b40627ecb1.jpg"],"frontUserAvatar":"http://q.qlogo.cn/qqapp/1104949895/C19124345A8C7E9CE27EAFD02D78C6A9/100","commentReplyVO":null,"memberLevel":3,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"m****1","content":"穿上真是太美了 本身宽肩 但穿上这件散摆的裙子 完全不显了 材质也超垂坠 超喜欢的 束腰的设计真是太美 现在每天都要看严选的新品推荐 已然成为了严选的死忠粉!","createTime":1526379771011,"picList":["https://yanxuan.nosdn.127.net/30b878c5729c8453595d259c806cda76.jpg","https://yanxuan.nosdn.127.net/e1f8c483fe0e04054eb8312461f752df.jpg","https://yanxuan.nosdn.127.net/9ac0244aeea05431ae39ac59be98d481.jpg","https://yanxuan.nosdn.127.net/ebb2be982694d832b9a50e87614c3ccf.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/8032e97cbc50052f7962a52810717224.jpg","commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"2****7","content":"天气还凉,暂时没试过后追评","createTime":1519570762183,"picList":[],"frontUserAvatar":"https://yanxuan.nosdn.127.net/177a143462646354c6703f4c488f8989.jpg","commentReplyVO":null,"memberLevel":6,"appendCommentVO":{"id":38816628,"createTime":1522389577691,"content":"今天天气不错终于有机会穿了,真的很好,修身显瘦,质量好","picList":["https://yanxuan.nosdn.127.net/13b4820ed6d7bd059482b4a9ebe43e78.jpg"],"commentReplyVO":null},"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"尘****","content":"包装的好,衣服漂亮,年轻好几岁。严选\uD83D\uDC4C","createTime":1525072811063,"picList":["https://yanxuan.nosdn.127.net/6af79e578466d7850b5e029d8dbd64df.jpg","https://yanxuan.nosdn.127.net/30170827d317b6e8b939efca519f21f9.jpg","https://yanxuan.nosdn.127.net/f0163a938e457290b7303ebd5a2d1abe.jpg","https://yanxuan.nosdn.127.net/e709acbbaff79cfd45314b4632a46656.jpg"],"frontUserAvatar":"http://q.qlogo.cn/qqapp/101330628/2B8CF1AB54991890F21A23B99D300FF6/100","commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"m****5","content":"很不错的一款裙子","createTime":1524994727338,"picList":["https://yanxuan.nosdn.127.net/7ff10450bb4455cdb39591864eb3acc1.jpg","https://yanxuan.nosdn.127.net/668c105ba9db7b63552cde8c15b89026.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"S****h","content":"衣服很漂亮,材质跟only类似的一款材质基本一样,很重","createTime":1524287083931,"picList":[],"frontUserAvatar":"https://yanxuan.nosdn.127.net/bae25552236c9812717cf81ff79efef5","commentReplyVO":null,"memberLevel":5,"appendCommentVO":{"id":39560089,"createTime":1524319340050,"content":"挺喜欢的","picList":["https://yanxuan.nosdn.127.net/49337683d1e22d12e0460035f7b5bfa0.jpg"],"commentReplyVO":null},"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"t****t","content":"老婆很喜欢,裙子比较显身材,很合身,材质也不错。","createTime":1523876777912,"picList":["https://yanxuan.nosdn.127.net/0d15c6f2460abb80d72ca9c0e564a2bc.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["L","黑色"],"frontUserName":"l****2","content":"看妈妈穿着多好看","createTime":1524018081632,"picList":["https://yanxuan.nosdn.127.net/9d7c5591465cc6da05389a1fa1dda32b.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["XL","黑色"],"frontUserName":"m****8","content":"这个裙子高挑的人穿起来真的很好看。","createTime":1522368222258,"picList":["https://yanxuan.nosdn.127.net/6f9f3b04b09dbeb92de61479d2d62cf3.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null}],"relatedItemCommentTag":null}}
--------------------------------------------------------------------------------
/mock/comment_3.json:
--------------------------------------------------------------------------------
1 | {"errCode": "0","data":{"pagination":{"page":3,"size":10,"totalPage":43,"total":430,"lastPage":false},"result":[{"skuInfo":["L","黑色"],"frontUserName":"y****0","content":"手感不错,质地柔软,穿上修身,挺满意的","createTime":1522678666440,"picList":["https://yanxuan.nosdn.127.net/ea6e88f16aaa8a5213937f2896312e2d.jpg","https://yanxuan.nosdn.127.net/51a94eb80ffab324b33e66fb32f03a7f.jpg","https://yanxuan.nosdn.127.net/5b8d901964a064c85eeac6e9e46b4364.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/9ed9e10d10179ecb0307f677afc31609.jpg","commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"丽****","content":"买了没试 应该不错","createTime":1522115034664,"picList":["https://yanxuan.nosdn.127.net/d888b628bfc2c7faf5786faaf1f3cc79.jpg"],"frontUserAvatar":"http://q.qlogo.cn/qqapp/101330628/9E04177F5DA722ED11BC88507077BB10/100","commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"m****1","content":"","createTime":1521728581740,"picList":["https://yanxuan.nosdn.127.net/dd6f461931cd232e9603fcb0a0699517.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"h****y","content":"棒棒哒","createTime":1521556436057,"picList":["https://yanxuan.nosdn.127.net/49e470c8b49bfec7a47c721a15c04202.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"m****6","content":"质量很不错 沉甸甸的 暖一点就可以穿了","createTime":1521184720990,"picList":["https://yanxuan.nosdn.127.net/de68fbbd71f6a934c767fd558b6c6bcd.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["L","黑色"],"frontUserName":"倩****","content":"这个还没穿,我们这里好热,试了试应该款式大小可以,就是不知道质量!穿过了再来评价!","createTime":1520831873405,"picList":["https://yanxuan.nosdn.127.net/6ca1bcf2e73dc0e01fbc3cb1a2c176af.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/ab54c449f5679f045f5260cb81ea5aa8.jpg","commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":4,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"m****3","content":"太棒了,客服推荐的尺码非常合适,身高160体重108M码。衣服弹性很好,垂感好,还没下水,希望不掉色。","createTime":1519182244726,"picList":["https://yanxuan.nosdn.127.net/ae155b1c5327c424602893e5cdd281f8.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["L","黑色"],"frontUserName":"周****","content":"哇,配上暗红色的高跟鞋,穿上人很精神。料子针织,很有分量,黑色和款式都遮住了我的游泳圈。\uD83D\uDC4D","createTime":1520088589008,"picList":["https://yanxuan.nosdn.127.net/d204b1fcc3ef63a51a36b994230fb02e.jpg"],"frontUserAvatar":"http://yanxuan.nosdn.127.net/5a4068ff0d0adff3a3b43dbe429c9ebb","commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"m****1","content":"和nine west一款一样除了小圆领,最好搭配的小黑裙随便都能配","createTime":1519564503000,"picList":["https://yanxuan.nosdn.127.net/f6aceea8126173078f09c41a0f63f6f7.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"y****1","content":"刚刚收到货就迫不及待的拆开来看,裙子有垂坠质感,值得拥有的小黑裙","createTime":1519349855482,"picList":["https://yanxuan.nosdn.127.net/654426cd05d44477aaf594146c270375.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null}],"relatedItemCommentTag":null}}
--------------------------------------------------------------------------------
/mock/comment_4.json:
--------------------------------------------------------------------------------
1 | {"errCode": "0","data":{"pagination":{"page":4,"size":10,"totalPage":43,"total":430,"lastPage":false},"result":[{"skuInfo":["L","黑色"],"frontUserName":"1****9","content":"很漂亮的裙子,我买了平时穿的号小了换了,建议买大一号穿着更舒服一些","createTime":1551588467821,"picList":[],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"s****j","content":"买的东西太多,评价不过来了。总之,在网易严选买东西省时省力,质量一如既往的好、价格实惠,看到自己需要的装车。","createTime":1552059028234,"picList":[],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"m****7","content":"心仪很久的裙子,这次碰到活动就下手了,质量很好,穿起来藏肚子,显腰身,很漂亮。","createTime":1546602109717,"picList":[],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"再****娆","content":"这件绝对好评,穿上后气质一下就体现出来了,想买的下手吧,不用犹豫","createTime":1546871166764,"picList":[],"frontUserAvatar":"http://q.qlogo.cn/qqapp/101330628/2816A757A7BB1C437F614DCF9F8FEE73/100","commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"C****","content":"很棒很棒很棒很棒很棒很棒很棒,老婆说可以的","createTime":1553196064049,"picList":[],"frontUserAvatar":"https://yanxuan.nosdn.127.net/c53b73a789d921c35f8f6f5dc1db9622.jpg","commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"m****8","content":"还是很有质感的裙子,穿上效果不错,必购小黑裙,留下了~","createTime":1552185956185,"picList":[],"frontUserAvatar":"null","commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["M","黑色"],"frontUserName":"马****","content":"修身,质量不错,就是裙摆有点大","createTime":1520518659204,"picList":["https://yanxuan.nosdn.127.net/a38acefdd769ad5723ce407e3379eec2.png"],"frontUserAvatar":"http://yanxuan.nosdn.127.net/be035df09038595be8a2fd64c48a1097","commentReplyVO":null,"memberLevel":4,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["S","黑色"],"frontUserName":"W****i","content":"不错 很大牌 很修身 老公也说好看","createTime":1520087590368,"picList":["https://yanxuan.nosdn.127.net/29620e828cbf6e15752f62800057b657.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/aa461b2f3125bbbc21746dbbbb96a8e1","commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["L","黑色"],"frontUserName":"z****1","content":"很修身!~买大了一码","createTime":1519965449622,"picList":["https://yanxuan.nosdn.127.net/36148bd22e9af199cc0aaa17cf9438d1.jpg"],"frontUserAvatar":null,"commentReplyVO":null,"memberLevel":5,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null},{"skuInfo":["L","黑色"],"frontUserName":"D****","content":"光线有点暗,衣服很舒服,167,57公斤,L码合适。","createTime":1518624580315,"picList":["https://yanxuan.nosdn.127.net/4cf251c9a242e031d640d8f4986868a0.jpg"],"frontUserAvatar":"https://yanxuan.nosdn.127.net/451a16df9d390464b0c9391e6eeca6de.jpg","commentReplyVO":null,"memberLevel":6,"appendCommentVO":null,"star":5,"itemId":1447011,"commentItemTagVO":null}],"relatedItemCommentTag":null}}
--------------------------------------------------------------------------------
/mock/comment_tag.json:
--------------------------------------------------------------------------------
1 | {
2 | "errCode": "0",
3 | "data": [{
4 | "name": "全部",
5 | "strCount": "522",
6 | "type": "1"
7 | }, {
8 | "name": "有图",
9 | "strCount": "39",
10 | "type": "0"
11 | }, {
12 | "name": "追评",
13 | "strCount": "11",
14 | "type": "0"
15 | }, {
16 | "name": "漂亮精致",
17 | "strCount": "53",
18 | "type": "0"
19 | }, {
20 | "name": "质量上乘",
21 | "strCount": "40",
22 | "type": "0"
23 | }, {
24 | "name": "显瘦",
25 | "strCount": "21",
26 | "type": "0"
27 | }, {
28 | "name": "款式不错",
29 | "strCount": "9",
30 | "type": "0"
31 | }, {
32 | "name": "修身",
33 | "strCount": "8",
34 | "type": "0"
35 | }, {
36 | "name": "厚重",
37 | "strCount": "6",
38 | "type": "0"
39 | }]
40 | }
--------------------------------------------------------------------------------
/mock/index.js:
--------------------------------------------------------------------------------
1 | const Mock = require('mockjs')
2 | const util = require('./util')
3 | const url = require('url')
4 | const qs = require('querystring')
5 |
6 |
7 | module.exports = function(app){
8 | //监听http请求
9 | app.get('/banner', function (req, res) {
10 | let
11 | index = qs.parse(url.parse(req.url).query)['index'],
12 | json = util.getJsonFile(`./banner_${index}.json`);
13 | //将json传入 Mock.mock 方法中,生成的数据返回给浏览器
14 | res.json(Mock.mock(json));
15 | });
16 |
17 | app.get('/channels', function (req, res) {
18 | let
19 | json = util.getJsonFile(`./indexPage_channels.json`);
20 | res.json(Mock.mock(json));
21 | });
22 |
23 | app.get('/hotSalls', function(req, res){
24 | let
25 | json = util.getJsonFile(`./indexPage_hotSellProduct.json`);
26 | res.json(Mock.mock(json));
27 | })
28 |
29 | app.get('/populars', function(req, res){
30 | let
31 | json = util.getJsonFile(`./indexPage_popularRecommend.json`);
32 | res.json(Mock.mock(json));
33 | })
34 |
35 | app.get('/arrival', function(req, res){
36 | let
37 | json = util.getJsonFile(`./indexPage_arrivals.json`);
38 | res.json(Mock.mock(json));
39 | })
40 |
41 | app.get('/categoryGoods', function(req, res){
42 | let
43 | json = util.getJsonFile(`./indexPage_categoryGoods.json`);
44 | res.json(Mock.mock(json));
45 | })
46 |
47 | app.get('/items', function(req, res){
48 | let
49 | index = qs.parse(url.parse(req.url).query)['index'],
50 | json = util.getJsonFile(`./itemLists_${index}.json`);
51 | res.json(Mock.mock(json));
52 | })
53 |
54 | app.get('/detail', function(req, res){
55 | let
56 | json = util.getJsonFile(`./goodsDetail.json`);
57 | res.json(Mock.mock(json));
58 | })
59 |
60 | app.get('/rcmd', function(req, res){
61 | let
62 | json = util.getJsonFile(`./rcmd.json`);
63 | res.json(Mock.mock(json));
64 | })
65 |
66 | app.get('/comments', function(req, res){
67 | let
68 | page = qs.parse(url.parse(req.url).query)['page'],
69 | json = util.getJsonFile(`./comment_${page}.json`);
70 | res.json(Mock.mock(json));
71 | })
72 |
73 | app.get('/tags', function(req, res){
74 | let
75 | json = util.getJsonFile(`./comment_tag.json`);
76 | res.json(Mock.mock(json));
77 | })
78 |
79 | app.get('/search_kds', function(req, res){
80 | let
81 | json = util.getJsonFile(`./search_kds.json`);
82 | res.json(Mock.mock(json));
83 | })
84 |
85 | app.get('/cate_list', function(req, res){
86 | let
87 | json = util.getJsonFile(`./cateList.json`);
88 | res.json(Mock.mock(json));
89 | })
90 |
91 | app.get('/market_desc', function(req, res){
92 | let
93 | json = util.getJsonFile(`./market_desc.json`);
94 | res.json(Mock.mock(json));
95 | })
96 |
97 | app.get('/topic', function(req, res){
98 | let
99 | json = util.getJsonFile(`./topic.json`);
100 | res.json(Mock.mock(json));
101 | })
102 |
103 | app.get('/manufacturer', function(req, res){
104 | let
105 | json = util.getJsonFile(`./manufacturer.json`);
106 | res.json(Mock.mock(json));
107 | })
108 | }
109 |
--------------------------------------------------------------------------------
/mock/indexPage_arrivals.json:
--------------------------------------------------------------------------------
1 | {
2 | "errCode": 0,
3 | "data": [
4 | {
5 | "title": "网易智造低压海盐热敷腰带",
6 | "sub_title": "",
7 | "picUrl": "http://yanxuan.nosdn.127.net/f642d93131227b12600ef3b9c60e3c59.png?imageView&quality=65&thumbnail=330x330",
8 | "tag": "",
9 | "price":"199"
10 | },
11 | {
12 | "title": "2019明前特级西湖龙井 ...",
13 | "sub_title": "",
14 | "picUrl": "http://yanxuan.nosdn.127.net/24320570a1ea380d50deb1e509afb522.png?imageView&quality=65&thumbnail=330x330",
15 | "tag": "预售好价",
16 | "price":"159"
17 | },
18 | {
19 | "title": "3色可选 日本制造 吸附...",
20 | "sub_title": "",
21 | "picUrl": "http://yanxuan.nosdn.127.net/d9e41913161dd7a12dd21d70058a6e69.png?imageView&quality=65&thumbnail=330x330",
22 | "tag": "",
23 | "price":"139",
24 | "spec": "日本制造"
25 | },
26 | {
27 | "title": "男式经典三防商务休闲裤",
28 | "sub_title": "",
29 | "picUrl": "http://yanxuan.nosdn.127.net/7ee4a33a4448721ae5ccfcaad6d9a400.png?imageView&quality=65&thumbnail=330x330",
30 | "tag": "",
31 | "price":"199",
32 | "spec": "3色可选"
33 | },
34 | {
35 | "title": "男士舒软透气商务便鞋",
36 | "sub_title": "",
37 | "picUrl": "http://yanxuan.nosdn.127.net/52168d5019d95ab60aad6876a5960541.png?imageView&quality=65&thumbnail=330x330",
38 | "tag": "",
39 | "price":"339",
40 | "spec": "2色可选"
41 | },
42 | {
43 | "title": "网易智造2U充电器+苹果数...",
44 | "sub_title": "",
45 | "picUrl": "http://yanxuan.nosdn.127.net/4513dccee6c97b78f4b391a2866d3130.png?imageView&quality=65&thumbnail=330x330",
46 | "tag": "",
47 | "price":"69"
48 | }
49 | ]
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/mock/indexPage_channels.json:
--------------------------------------------------------------------------------
1 | {
2 | "errCode": 0,
3 | "data": [
4 | {
5 | "name": "居家生活",
6 | "picUrl": "http://yanxuan.nosdn.127.net/fede8b110c502ec5799702d5ec824792.png",
7 | "sequen": 1
8 | },
9 | {
10 | "name": "服饰鞋包",
11 | "picUrl": "http://yanxuan.nosdn.127.net/fb9dde0c1593536c18c8e12b6f49eb17.png",
12 | "sequen": 2
13 | },
14 | {
15 | "name": "美食酒水",
16 | "picUrl": "http://yanxuan.nosdn.127.net/d916591adea776351e084016335e5820.png",
17 | "sequen": 3
18 | },
19 | {
20 | "name": "个护清洁",
21 | "picUrl": "http://yanxuan.nosdn.127.net/6c3bd9d885c818b1f73e497335a68b47.png",
22 | "sequen": 4
23 | },{
24 | "name": "母婴亲子",
25 | "picUrl": "http://yanxuan.nosdn.127.net/559d2a240ec20b096590a902217009ff.png",
26 | "sequen": 5
27 | },{
28 | "name": "运动旅行",
29 | "picUrl": "http://yanxuan.nosdn.127.net/23be40a05926faf2f2a81a08a1c53164.png",
30 | "sequen": 6
31 | },{
32 | "name": "数码家电",
33 | "picUrl": "http://yanxuan.nosdn.127.net/fbca8e1f2948f0c09fc7672c2c125384.png",
34 | "sequen": 7
35 | },{
36 | "name": "礼品特色",
37 | "picUrl": "http://yanxuan.nosdn.127.net/e83bd330713b66a8d4e8eb0cefed8996.png",
38 | "sequen": 8
39 | },
40 | {
41 | "name": "限时购",
42 | "picUrl": "http://yanxuan.nosdn.127.net/63682bd2df06963251b2715e20f98a75.png",
43 | "sequen": 9
44 | },
45 | {
46 | "name": "超级会员",
47 | "picUrl": "http://yanxuan.nosdn.127.net/51f5a91f10ba745ec68340b98315acf5.png",
48 | "sequen": 10
49 | }
50 | ]
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/mock/indexPage_hotSellProduct.json:
--------------------------------------------------------------------------------
1 | {
2 | "errCode": 0,
3 | "data": {
4 | "hot": [
5 | {
6 | "name": "热销榜",
7 | "picUrl": "http://yanxuan.nosdn.127.net/3e18c31adcdbb08cc69e46afb46d084e.png?imageView&quality=65&thumbnail=200x200"
8 | },
9 | {
10 | "name": "好评榜",
11 | "picUrl": "http://yanxuan.nosdn.127.net/a5fd7f29a950a7ef996a4ff49d8e68bb.png?imageView&quality=65&thumbnail=200x200"
12 | }
13 | ],
14 | "ranks": [
15 | {
16 | "name": "居家生活榜",
17 | "picUrl": "http://yanxuan.nosdn.127.net/d78a90f7f496656b79e4559935031958.png?imageView&quality=65&thumbnail=200x200"
18 | },
19 | {
20 | "name": "服饰鞋包榜",
21 | "picUrl": "http://yanxuan.nosdn.127.net/63c5f749c41c193731ffec74cb846642.png?imageView&quality=65&thumbnail=200x200"
22 | },
23 | {
24 | "name": "美食酒水榜",
25 | "picUrl": "http://yanxuan.nosdn.127.net/1979054e3a1c8409f10191242165e674.png?imageView&quality=65&thumbnail=200x200"
26 | },
27 | {
28 | "name": "个护清洁榜",
29 | "picUrl": "http://yanxuan.nosdn.127.net/dfe93936f47b66f4b8a4f1869f0ce828.png?imageView&quality=65&thumbnail=200x200"
30 | },
31 | {
32 | "name": "母婴亲子榜",
33 | "picUrl": "http://yanxuan.nosdn.127.net/914ba4d6fbacf9a4a143f1d10e16eb3f.png?imageView&quality=65&thumbnail=200x200"
34 | },
35 | {
36 | "name": "运动旅行榜",
37 | "picUrl": "http://yanxuan.nosdn.127.net/8d7a619fe512f9a100bd3b3ebe20ae9c.png?imageView&quality=65&thumbnail=200x200"
38 | },
39 | {
40 | "name": "数码家电榜",
41 | "picUrl": "http://yanxuan.nosdn.127.net/da8ba5cd1fb0cfd689ebbe905a330913.png?imageView&quality=65&thumbnail=200x200"
42 | },
43 | {
44 | "name": "礼品特色榜",
45 | "picUrl": "http://yanxuan.nosdn.127.net/55425f24345d01992d61a1646325ac94.png?imageView&quality=65&thumbnail=200x200"
46 | }
47 | ]
48 | }
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/mock/indexPage_popularRecommend.json:
--------------------------------------------------------------------------------
1 | {
2 | "errCode": 0,
3 | "data": {
4 | "main_d": {
5 | "title": "网易智造R1智能折叠跑步机",
6 | "sub_title": "App智跑,家庭私人教练",
7 | "picUrl": "http://yanxuan.nosdn.127.net/0d551bd5cee1656127985e1003926672.png?imageView&quality=65&thumbnail=280x280",
8 | "tag": "满折",
9 | "price":"1200"
10 | },
11 | "sub_d": [
12 | {
13 | "title": "酸牛奶",
14 | "sub_title": "",
15 | "picUrl": "http://yanxuan.nosdn.127.net/605c286e89e479a969c74ed2af3c3f00.png?imageView&quality=65&thumbnail=330x330",
16 | "tag": "",
17 | "price":"95"
18 | },
19 | {
20 | "title": "智能马桶盖",
21 | "sub_title": "",
22 | "picUrl": "http://yanxuan.nosdn.127.net/73a065d6fc8c32197b54421808c54788.png?imageView&quality=65&thumbnail=330x330",
23 | "tag": "超级闪购",
24 | "price":"1199"
25 | },
26 | {
27 | "title": "酸牛奶",
28 | "sub_title": "升级款95%白鹅绒秋冬加厚",
29 | "picUrl": "http://yanxuan.nosdn.127.net/fb53b989d34b32366f138b5e563ccd0a.png?imageView&quality=65&thumbnail=330x330",
30 | "tag": "女王节特惠",
31 | "price":"896"
32 | }
33 | ]
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/mock/manufacturer.json:
--------------------------------------------------------------------------------
1 | {
2 | "errCode": 0,
3 | "data": {
4 | "mr": {
5 | "img": "https://yanxuan.nosdn.127.net/f023a22559b81374d3bd5cb563b9af0b.png",
6 | "title": "Nine West制造商",
7 | "desc": ["为打造一双优雅舒适的高跟鞋,", "严选选择美国Nine West玖熙品牌的制造商,", "让美丽绽放在足尖。"]
8 | },
9 | "list": [{
10 | "title": "女式凡尔赛典雅高跟鞋",
11 | "sub_title": "",
12 | "picUrl": "https://yanxuan.nosdn.127.net/4a75f2f819c31f689cee44295b88ee78.png?imageView&quality=65&thumbnail=330x330",
13 | "tag": "7月画册特惠",
14 | "spec": "2色可选",
15 | "price": "212",
16 | "discount": "259",
17 | "desc": "优雅小牛皮,7cm的风度"
18 | }, {
19 | "title": "女式日系蝴蝶结平底鞋",
20 | "sub_title": "",
21 | "picUrl": "https://yanxuan.nosdn.127.net/baa1ff8b6c8dc764b60d4384cf44ff1d.png?imageView&quality=65&thumbnail=330x330",
22 | "tag": "",
23 | "spec": "3色可选",
24 | "price": "219",
25 | "discount": "",
26 | "desc": "甜美通勤,轻松搭配"
27 | }, {
28 | "title": "女式羊反绒复古粗跟鞋",
29 | "sub_title": "",
30 | "picUrl": "https://yanxuan.nosdn.127.net/5baeedd69bc9bb3e670d9231cfdce62e.png?imageView&quality=65&thumbnail=330x330",
31 | "tag": "奥莱特惠",
32 | "spec": "3色可选",
33 | "price": "114",
34 | "discount": "229",
35 | "desc": "时尚小方头,体验不一样的风情"
36 | }, {
37 | "title": "女式丝感雪花扣平底鞋",
38 | "sub_title": "",
39 | "picUrl": "https://yanxuan.nosdn.127.net/d877cdc0c980e1ae080e1d5f24f92265.png?imageView&quality=65&thumbnail=330x330",
40 | "tag": "奥莱特惠",
41 | "spec": "3色可选",
42 | "price": "179",
43 | "discount": "219",
44 | "desc": "如真丝般鞋面,视觉顺滑触感温柔"
45 | }, {
46 | "title": "丝感雪花扣高跟女鞋",
47 | "sub_title": "",
48 | "picUrl": "https://yanxuan.nosdn.127.net/629901d0718ab0c069ad45c3a169b18e.png?imageView&quality=65&thumbnail=330x330",
49 | "tag": "奥莱特惠",
50 | "spec": "4色可选",
51 | "price": "188",
52 | "discount": "239",
53 | "desc": "闪烁星光,女人必备的“战鞋”"
54 | }, {
55 | "title": "女式英伦牛皮乐福鞋",
56 | "sub_title": "",
57 | "picUrl": "https://yanxuan.nosdn.127.net/d84f357ca19b4fc79865c420c2804a00.png?imageView&quality=65&thumbnail=330x330",
58 | "tag": "7月画册特惠",
59 | "spec": "2色可选",
60 | "price": "271",
61 | "discount": "339",
62 | "desc": "进口头层牛皮,经典中性风"
63 | }, {
64 | "title": "女式一字带粗跟凉鞋",
65 | "sub_title": "",
66 | "picUrl": "https://yanxuan.nosdn.127.net/2a72165059c26cf269a2e1f18e1faef4.png?imageView&quality=65&thumbnail=330x330",
67 | "tag": "奥莱特惠",
68 | "spec": "2色可选",
69 | "price": "188",
70 | "discount": "269",
71 | "desc": "优雅一字带,清凉整个夏天"
72 | }, {
73 | "title": "女式尖头搭带粗跟凉鞋",
74 | "sub_title": "",
75 | "picUrl": "https://yanxuan.nosdn.127.net/6a0ac2df86a0aa4f9959b63be4eaa5a7.png?imageView&quality=65&thumbnail=330x330",
76 | "tag": "奥莱特惠",
77 | "spec": "2色可选",
78 | "price": "149",
79 | "discount": "299",
80 | "desc": "4.5cm小方根,稳稳的幸福感"
81 | }, {
82 | "title": "女式羊皮方头粗跟凉鞋",
83 | "sub_title": "",
84 | "picUrl": "https://yanxuan.nosdn.127.net/7c125dc74f73e1bf3f4240266d659d1a.png?imageView&quality=65&thumbnail=330x330",
85 | "tag": "7月画册特惠",
86 | "spec": "3色可选",
87 | "price": "215",
88 | "discount": "269",
89 | "desc": "稳稳小粗跟,时尚小方头"
90 | }, {
91 | "title": "女式舒雅方扣平底凉拖鞋",
92 | "sub_title": "",
93 | "picUrl": "https://yanxuan.nosdn.127.net/45837d5a753d27117a89e68250adc195.png?imageView&quality=65&thumbnail=330x330",
94 | "tag": "奥莱特惠",
95 | "spec": "2色可选",
96 | "price": "121",
97 | "discount": "269",
98 | "desc": "牛皮鞋面,有质感的慵懒随意"
99 | }, {
100 | "title": "丝感清凉 女式珍珠粗跟凉鞋",
101 | "sub_title": "",
102 | "picUrl": "https://yanxuan.nosdn.127.net/627322159fc246da932847cb21dd9576.png?imageView&quality=65&thumbnail=330x330",
103 | "tag": "满2免1",
104 | "spec": "2色可选",
105 | "price": "269",
106 | "discount": "",
107 | "desc": "柔滑细腻丝绸布,7cm平稳粗跟"
108 | }, {
109 | "title": "女式尖头后空猫跟女巫鞋",
110 | "sub_title": "",
111 | "picUrl": "https://yanxuan.nosdn.127.net/8d3a1a8735579be8129f3e9e8229821d.png?imageView&quality=65&thumbnail=330x330",
112 | "tag": "奥莱特惠",
113 | "spec": "2色可选",
114 | "price": "134",
115 | "discount": "299",
116 | "desc": "深V女巫鞋,拉长腿型利器"
117 | }, {
118 | "title": "女式蝴蝶结羊皮穆勒鞋",
119 | "sub_title": "",
120 | "picUrl": "https://yanxuan.nosdn.127.net/a756da0a19de3e4e74c3ba8289d469cd.png?imageView&quality=65&thumbnail=330x330",
121 | "tag": "奥莱特惠",
122 | "spec": "2色可选",
123 | "price": "134",
124 | "discount": "299",
125 | "desc": "真丝般的触感,如轻风拂过脚面"
126 | }, {
127 | "title": "女式羊皮搭带高跟鞋",
128 | "sub_title": "",
129 | "picUrl": "https://yanxuan.nosdn.127.net/26f6c88549db78f4100ae91b694f4f3c.png?imageView&quality=65&thumbnail=330x330",
130 | "tag": "满2免1",
131 | "spec": "2色可选",
132 | "price": "319",
133 | "discount": "",
134 | "desc": "柔软羊皮搭带,行走不易掉跟"
135 | }, {
136 | "title": "女式经典尖头搭带高跟鞋",
137 | "sub_title": "",
138 | "picUrl": "https://yanxuan.nosdn.127.net/794a9f41a2cd6c0f92783de99b10b4b4.png?imageView&quality=65&thumbnail=330x330",
139 | "tag": "7月画册特惠",
140 | "spec": "3色可选",
141 | "price": "209",
142 | "discount": "299",
143 | "desc": "羊反绒鞋面,温柔贴己也懂你"
144 | }, {
145 | "title": "女式金属环尖头平底鞋",
146 | "sub_title": "",
147 | "picUrl": "https://yanxuan.nosdn.127.net/0579f60980fcf3704a3e2388e31f1d3c.png?imageView&quality=65&thumbnail=330x330",
148 | "tag": "奥莱特惠",
149 | "spec": "3色可选",
150 | "price": "191",
151 | "discount": "319",
152 | "desc": "隐藏小粗跟,显高不累"
153 | }, {
154 | "title": "女式羊皮尖头女巫凉鞋",
155 | "sub_title": "",
156 | "picUrl": "https://yanxuan.nosdn.127.net/831d7e5379e0b265391d8717e4645de4.png?imageView&quality=65&thumbnail=330x330",
157 | "tag": "奥莱特惠",
158 | "spec": "2色可选",
159 | "price": "134",
160 | "discount": "299",
161 | "desc": "头层羊皮,气场全开女巫鞋"
162 | }, {
163 | "title": "女式蝴蝶结尖头平底鞋",
164 | "sub_title": "",
165 | "picUrl": "https://yanxuan.nosdn.127.net/69839d1684af3942f10cc404167c771e.png?imageView&quality=65&thumbnail=330x330",
166 | "tag": "满2免1",
167 | "spec": "2色可选",
168 | "price": "319",
169 | "discount": "",
170 | "desc": "人手一双的尖头平底鞋"
171 | }, {
172 | "title": "女式金属跟高跟鞋2.0",
173 | "sub_title": "",
174 | "picUrl": "https://yanxuan.nosdn.127.net/bda93db0acb80a919985926ee44324db.png?imageView&quality=65&thumbnail=330x330",
175 | "tag": "奥莱特惠",
176 | "spec": "3色可选",
177 | "price": "191",
178 | "discount": "319",
179 | "desc": "5cm金属跟,羊猄触感温柔"
180 | }, {
181 | "title": "女式花边羊皮圆头平底鞋",
182 | "sub_title": "",
183 | "picUrl": "https://yanxuan.nosdn.127.net/8ac01db0cb08f206dc2d67a21bdde3be.png?imageView&quality=65&thumbnail=330x330",
184 | "tag": "满2免1",
185 | "spec": "2色可选",
186 | "price": "299",
187 | "discount": "",
188 | "desc": "每个女孩心中的梦"
189 | }, {
190 | "title": "女式尖头蝴蝶结高跟鞋",
191 | "sub_title": "",
192 | "picUrl": "https://yanxuan.nosdn.127.net/022522c4fa1ab5691954bc309f96e117.png?imageView&quality=65&thumbnail=330x330",
193 | "tag": "奥莱特惠",
194 | "spec": "2色可选",
195 | "price": "213",
196 | "discount": "329",
197 | "desc": "细腻羊猄皮,给你温柔守护"
198 | }, {
199 | "title": "女式满天星尖头平底鞋",
200 | "sub_title": "",
201 | "picUrl": "https://yanxuan.nosdn.127.net/47df469f85c3f32df9fadfef54c8db51.png?imageView&quality=65&thumbnail=330x330",
202 | "tag": "奥莱特惠",
203 | "spec": "2色可选",
204 | "price": "143",
205 | "discount": "319",
206 | "desc": "羊猄材料,星星点点带你入秋"
207 | }, {
208 | "title": "女式韩国绒羊皮搭带粗跟鞋",
209 | "sub_title": "",
210 | "picUrl": "https://yanxuan.nosdn.127.net/deba421cbb5051e4c10f9c6418fc4d3c.png?imageView&quality=65&thumbnail=330x330",
211 | "tag": "奥莱特惠",
212 | "spec": "2色可选",
213 | "price": "144",
214 | "discount": "289",
215 | "desc": "头层羊皮搭带,5cm舒适中跟"
216 | }, {
217 | "title": "女式捷克水钻高跟鞋",
218 | "sub_title": "",
219 | "picUrl": "https://yanxuan.nosdn.127.net/51004260c2cf1182ff2de58f22c8a3a9.png?imageView&quality=65&thumbnail=330x330",
220 | "tag": "",
221 | "spec": "",
222 | "price": "329",
223 | "discount": "",
224 | "desc": "楦头热销几万双"
225 | }, {
226 | "title": "女式头层牛反绒乐福鞋",
227 | "sub_title": "",
228 | "picUrl": "https://yanxuan.nosdn.127.net/6db387891ec460c10bead5f48758d2d5.png?imageView&quality=65&thumbnail=330x330",
229 | "tag": "奥莱特惠",
230 | "spec": "4色可选",
231 | "price": "194",
232 | "discount": "299",
233 | "desc": "色彩优美,触感轻、柔、软"
234 | }]
235 | }
236 | }
--------------------------------------------------------------------------------
/mock/util.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');//引入文件系统模块
2 | const path = require('path');//引入path模块
3 |
4 | module.exports = {
5 | //读取json文件
6 | getJsonFile:function (filePath) {
7 | //读取指定json文件
8 | var json = fs.readFileSync(path.resolve(__dirname,filePath), 'utf-8');
9 | //解析并返回
10 | return JSON.parse(json);
11 | }
12 | };
13 |
14 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-pinduoduo",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint",
9 | "test:unit": "vue-cli-service test:unit"
10 | },
11 | "dependencies": {
12 | "axios": "^0.18.0",
13 | "better-scroll": "^1.15.1",
14 | "cssnano": "^4.1.8",
15 | "cssnano-preset-advanced": "^4.0.6",
16 | "fastclick": "^1.0.6",
17 | "moment": "^2.24.0",
18 | "postcss-aspect-ratio-mini": "^1.0.1",
19 | "postcss-cssnext": "^3.1.0",
20 | "postcss-discard-unused": "^4.0.1",
21 | "postcss-import": "^12.0.1",
22 | "postcss-px-to-viewport": "0.0.3",
23 | "postcss-url": "^8.0.0",
24 | "postcss-viewport-units": "^0.1.6",
25 | "postcss-zindex": "^4.0.1",
26 | "vant": "^1.6.5",
27 | "vue": "^2.5.21",
28 | "vue-awesome-swiper": "^3.1.3",
29 | "vue-router": "^3.0.1",
30 | "vuex": "^3.0.1"
31 | },
32 | "devDependencies": {
33 | "@vue/cli-plugin-babel": "^3.2.2",
34 | "@vue/cli-plugin-eslint": "^3.2.2",
35 | "@vue/cli-plugin-unit-mocha": "^3.2.2",
36 | "@vue/cli-service": "^3.2.3",
37 | "@vue/eslint-config-prettier": "^4.0.1",
38 | "@vue/test-utils": "^1.0.0-beta.20",
39 | "babel-eslint": "^10.0.1",
40 | "babel-plugin-import": "^1.11.0",
41 | "chai": "^4.1.2",
42 | "eslint": "^5.8.0",
43 | "eslint-plugin-vue": "^5.0.0",
44 | "mockjs": "^1.0.1-beta3",
45 | "node-sass": "^4.9.0",
46 | "postcss-write-svg": "^3.0.1",
47 | "sass-loader": "^7.0.1",
48 | "sass-resources-loader": "^2.0.1",
49 | "vue-template-compiler": "^2.5.21"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/preset-default-vue-cli-3.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/vue-yanxuan/a6bf67952d2742e26026488c50380d8a9ba82c66/preset-default-vue-cli-3.js
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/vue-yanxuan/a6bf67952d2742e26026488c50380d8a9ba82c66/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
全部频道
24 | {{item.name}} 30 |Wait TODO 购物
6 |{{liItem.text}}
29 |{{item.text1}}
32 |{{item.text2}}
33 |{{price.reputatio}}
62 |好评率
63 |新人专享礼包
11 |¥524
23 |¥699
24 |¥1
40 |¥14.9
41 |30 | {{item.name}} 31 |
32 |29 | {{item.name}} 30 |
31 |Wait TODO 登陆
6 |亲,你走得太远了
10 |好的生活,没那么贵,更没那么远
11 |