Showing
10 changed files
with
19 additions
and
20 deletions
@@ -6,7 +6,7 @@ Name | Path | Note | @@ -6,7 +6,7 @@ Name | Path | Note | ||
6 | 品类 | /cate | | 6 | 品类 | /cate | |
7 | 全部分类 | /cate-all | | 7 | 全部分类 | /cate-all | |
8 | 品牌店铺 | /product/shop?domain=sctest1 | | 8 | 品牌店铺 | /product/shop?domain=sctest1 | |
9 | -品牌店铺分享页面 | /product/brand-share?domain=colormad | | 9 | +品牌店铺分享页面 | /product/shop-share?domain=colormad | |
10 | 商品详情 | /product/{productId} | | 10 | 商品详情 | /product/{productId} | |
11 | 资讯列表 | /news | | 11 | 资讯列表 | /news | |
12 | 12 |
@@ -17,12 +17,13 @@ router.get('/', channel.index); // 首页 | @@ -17,12 +17,13 @@ router.get('/', channel.index); // 首页 | ||
17 | router.get('/channel/channel.json', channel.channel); // 查询所有频道 | 17 | router.get('/channel/channel.json', channel.channel); // 查询所有频道 |
18 | router.get('/channel/resources.json', channel.resources); // 资源位接口 | 18 | router.get('/channel/resources.json', channel.resources); // 资源位接口 |
19 | router.get('/channel/goods.json', channel.goods); // 首页查询商品列表 | 19 | router.get('/channel/goods.json', channel.goods); // 首页查询商品列表 |
20 | + | ||
20 | router.get('/brands', brand.brandList); // 品牌列表页 | 21 | router.get('/brands', brand.brandList); // 品牌列表页 |
21 | -router.get('/get-brand-list', brand.getBrandList); // 获取品牌列表数据 | 22 | +router.get('/brand/list.json', brand.getBrandList); // 获取品牌列表数据 |
22 | 23 | ||
23 | router.get('/cate', brand.cateResource); // 品类资源位页面 | 24 | router.get('/cate', brand.cateResource); // 品类资源位页面 |
24 | router.get('/cate-all', brand.cate); // 全部分类 | 25 | router.get('/cate-all', brand.cate); // 全部分类 |
25 | -router.get('/get-cate-list', brand.getCateList); // 全部分类数据列表 | 26 | +router.get('/cate/list.json', brand.getCateList); // 全部分类数据列表 |
26 | 27 | ||
27 | router.get('/sidebar', channel.sidebar); // 资源位接口 | 28 | router.get('/sidebar', channel.sidebar); // 资源位接口 |
28 | 29 |
@@ -19,6 +19,6 @@ router.get(/news_(\d+)\.json/, detail.news); | @@ -19,6 +19,6 @@ router.get(/news_(\d+)\.json/, detail.news); | ||
19 | const news = require(`${cRoot}/index`); | 19 | const news = require(`${cRoot}/index`); |
20 | 20 | ||
21 | router.get('', news.index); // 首页 | 21 | router.get('', news.index); // 首页 |
22 | -router.post('/get-news-list', news.getNewsList); // 获取资讯数据 | 22 | +router.post('/list.json', news.getNewsList); // 获取资讯数据 |
23 | 23 | ||
24 | module.exports = router; | 24 | module.exports = router; |
@@ -36,10 +36,10 @@ router.get('/sub-filter', subFilter.page); | @@ -36,10 +36,10 @@ router.get('/sub-filter', subFilter.page); | ||
36 | const shop = require(`${cRoot}/shop`); | 36 | const shop = require(`${cRoot}/shop`); |
37 | 37 | ||
38 | router.get('/shop', shop.index); // 店铺首页 | 38 | router.get('/shop', shop.index); // 店铺首页 |
39 | -router.get('/get-shop-info', shop.getShopInfo); // 店铺介绍 | ||
40 | -router.post('/get-brand-shop-goods', shop.getBrandShopGoods); // 店铺商品列表 | ||
41 | -router.post('/collect-shop', shop.collectShop); // 收藏品牌店铺 | ||
42 | -router.get('/shop-share', shop.shopShare); // 品牌店铺分享页面 | 39 | +router.get('/shop/info.json', shop.getShopInfo); // 店铺介绍 |
40 | +router.post('/shop/goods.json', shop.getBrandShopGoods); // 店铺商品列表 | ||
41 | +router.post('/shop/collect.json', shop.collectShop); // 收藏品牌店铺 | ||
42 | +router.get('/shop/share', shop.shopShare); // 品牌店铺分享页面 | ||
43 | 43 | ||
44 | // 商品详情controller | 44 | // 商品详情controller |
45 | const detail = require(`${cRoot}/detail`); | 45 | const detail = require(`${cRoot}/detail`); |
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | box-sizing: border-box; | 75 | box-sizing: border-box; |
76 | float: left; | 76 | float: left; |
77 | height: 100%; | 77 | height: 100%; |
78 | - padding: 20px 0px; | 78 | + padding: 20px 0; |
79 | width: 25%; | 79 | width: 25%; |
80 | text-align: center; | 80 | text-align: center; |
81 | color: #999; | 81 | color: #999; |
@@ -198,7 +198,6 @@ | @@ -198,7 +198,6 @@ | ||
198 | <script> | 198 | <script> |
199 | const $ = require('yoho-jquery'); | 199 | const $ = require('yoho-jquery'); |
200 | const tip = require('common/tip'); | 200 | const tip = require('common/tip'); |
201 | - const qs = require('yoho-qs'); | ||
202 | 201 | ||
203 | module.exports = { | 202 | module.exports = { |
204 | props: [], | 203 | props: [], |
@@ -219,13 +218,12 @@ | @@ -219,13 +218,12 @@ | ||
219 | }; | 218 | }; |
220 | 219 | ||
221 | $.ajax({ | 220 | $.ajax({ |
222 | - url: '/get-cate-list', | 221 | + url: '/cate/list.json', |
223 | data: data | 222 | data: data |
224 | }).then(result => { | 223 | }).then(result => { |
225 | - let len = result.length; | ||
226 | - if (len > 0) { | 224 | + if (result.length > 0) { |
227 | this.brandCate = result; | 225 | this.brandCate = result; |
228 | - this.widthli = 100 / len; | 226 | + this.widthli = 100 / result.length; |
229 | this.cateNavLeftData = this.brandCate[0].ca; | 227 | this.cateNavLeftData = this.brandCate[0].ca; |
230 | this.cateNavRightData = this.cateNavLeftData[0].sub; | 228 | this.cateNavRightData = this.cateNavLeftData[0].sub; |
231 | } | 229 | } |
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | /* 获取资讯列表数据 */ | 94 | /* 获取资讯列表数据 */ |
95 | getNewsList() { | 95 | getNewsList() { |
96 | $.post({ | 96 | $.post({ |
97 | - url: '/news/get-news-list', | 97 | + url: '/news/list.json', |
98 | data: { | 98 | data: { |
99 | sortId: this.crntCateId, | 99 | sortId: this.crntCateId, |
100 | page: this.page++, | 100 | page: this.page++, |
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | /* 获取店铺简介相关数据 */ | 69 | /* 获取店铺简介相关数据 */ |
70 | getShopInfo() { | 70 | getShopInfo() { |
71 | $.get({ | 71 | $.get({ |
72 | - url: '/product/get-shop-info', | 72 | + url: '/product/shop/info.json', |
73 | data: { domain: qs.domain } | 73 | data: { domain: qs.domain } |
74 | }).done(result => { | 74 | }).done(result => { |
75 | this.shopInfo = result; | 75 | this.shopInfo = result; |
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | filterConfig: {}, | 31 | filterConfig: {}, |
32 | 32 | ||
33 | // query | 33 | // query |
34 | - url: '/product/get-brand-shop-goods', | 34 | + url: '/product/shop/goods.json', |
35 | sort: '', | 35 | sort: '', |
36 | filter: { | 36 | filter: { |
37 | domain: qs.domain | 37 | domain: qs.domain |
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | /* 获取店铺简介相关数据 */ | 61 | /* 获取店铺简介相关数据 */ |
62 | getShopInfo() { | 62 | getShopInfo() { |
63 | $.get({ | 63 | $.get({ |
64 | - url: '/product/get-shop-info', | 64 | + url: '/product/shop/info.json', |
65 | data: { domain: this.domain } | 65 | data: { domain: this.domain } |
66 | }).done(result => { | 66 | }).done(result => { |
67 | if (result) { | 67 | if (result) { |
-
Please register or login to post a comment