Showing
4 changed files
with
16 additions
and
9 deletions
@@ -15,8 +15,8 @@ module.exports = { | @@ -15,8 +15,8 @@ module.exports = { | ||
15 | port: 6004, | 15 | port: 6004, |
16 | siteUrl: '//m.yohoblk.com', | 16 | siteUrl: '//m.yohoblk.com', |
17 | domains: { | 17 | domains: { |
18 | - api: 'http://devapi.yoho.cn:58078/', | ||
19 | - service: 'http://devservice.yoho.cn:58077/' | 18 | + api: 'http://192.168.102.205:8080/gateway/', |
19 | + service: 'http://192.168.102.205:8080/gateway/' | ||
20 | }, | 20 | }, |
21 | subDomains: { | 21 | subDomains: { |
22 | host: '.m.yohoblk.com', | 22 | host: '.m.yohoblk.com', |
@@ -7,8 +7,14 @@ | @@ -7,8 +7,14 @@ | ||
7 | </template> | 7 | </template> |
8 | 8 | ||
9 | <script> | 9 | <script> |
10 | + const cookie = require('yoho-cookie'); | ||
10 | const bus = require('common/vue-bus'); | 11 | const bus = require('common/vue-bus'); |
11 | - const channelMap = {}; | 12 | + |
13 | + const channelMap = { | ||
14 | + 301: 'men', | ||
15 | + 302: 'women', | ||
16 | + 303: 'lifestyle' | ||
17 | + }; | ||
12 | 18 | ||
13 | module.exports = { | 19 | module.exports = { |
14 | props: { | 20 | props: { |
@@ -30,14 +36,14 @@ | @@ -30,14 +36,14 @@ | ||
30 | $.ajax({ | 36 | $.ajax({ |
31 | url: '/channel/channel.json' | 37 | url: '/channel/channel.json' |
32 | }).then(res => { | 38 | }).then(res => { |
33 | - if (res.code === 200) { | 39 | + if (res.data.length) { |
34 | const channel = []; | 40 | const channel = []; |
35 | 41 | ||
36 | res.data.forEach(c => { | 42 | res.data.forEach(c => { |
37 | - channel.push[{ | 43 | + channel.push({ |
38 | name: c.channelName, | 44 | name: c.channelName, |
39 | - channel: channelMap[c.channeId] || '' | ||
40 | - }]; | 45 | + channel: channelMap[c.channelId] || '' |
46 | + }); | ||
41 | }); | 47 | }); |
42 | 48 | ||
43 | this.channel = channel; | 49 | this.channel = channel; |
@@ -48,6 +54,7 @@ | @@ -48,6 +54,7 @@ | ||
48 | changeChannel(index) { | 54 | changeChannel(index) { |
49 | this.current = index; | 55 | this.current = index; |
50 | bus.$emit('channel.change', this.page, this.channel[index].channel); | 56 | bus.$emit('channel.change', this.page, this.channel[index].channel); |
57 | + cookie.set('_Channel', this.channel[index].channel); | ||
51 | } | 58 | } |
52 | } | 59 | } |
53 | }; | 60 | }; |
public/vue/pages/products-list.vue
deleted
100644 → 0
-
Please register or login to post a comment