Authored by ccbikai

Merge branch 'feature/channel' into develop

@@ -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',
@@ -39,14 +39,14 @@ @@ -39,14 +39,14 @@
39 "winston": "^2.2.0", 39 "winston": "^2.2.0",
40 "winston-daily-rotate-file": "^1.1.4", 40 "winston-daily-rotate-file": "^1.1.4",
41 "yoho-md5": "^2.0.0", 41 "yoho-md5": "^2.0.0",
42 - "yoho-node-lib": "0.0.21" 42 + "yoho-node-lib": "0.0.26"
43 }, 43 },
44 "devDependencies": { 44 "devDependencies": {
45 "autoprefixer": "^6.3.7", 45 "autoprefixer": "^6.3.7",
46 - "babel-core": "^6.10.4", 46 + "babel-core": "^6.11.4",
47 "babel-loader": "^6.2.4", 47 "babel-loader": "^6.2.4",
48 "babel-preset-es2015": "^6.9.0", 48 "babel-preset-es2015": "^6.9.0",
49 - "eslint": "^3.0.1", 49 + "eslint": "^3.1.1",
50 "eslint-config-yoho": "^1.0.1", 50 "eslint-config-yoho": "^1.0.1",
51 "eslint-plugin-html": "^1.5.1", 51 "eslint-plugin-html": "^1.5.1",
52 "extract-text-webpack-plugin": "^1.0.1", 52 "extract-text-webpack-plugin": "^1.0.1",
@@ -57,8 +57,8 @@ @@ -57,8 +57,8 @@
57 "gulp-sourcemaps": "^2.0.0-alpha", 57 "gulp-sourcemaps": "^2.0.0-alpha",
58 "gulp-util": "^3.0.7", 58 "gulp-util": "^3.0.7",
59 "handlebars-loader": "^1.3.0", 59 "handlebars-loader": "^1.3.0",
60 - "husky": "^0.11.4",  
61 - "nodemon": "1.9.2", 60 + "husky": "^0.11.6",
  61 + "nodemon": "^1.10.0",
62 "postcss-assets": "^4.0.1", 62 "postcss-assets": "^4.0.1",
63 "postcss-cachebuster": "^0.1.3", 63 "postcss-cachebuster": "^0.1.3",
64 "postcss-calc": "^5.2.1", 64 "postcss-calc": "^5.2.1",
@@ -68,10 +68,10 @@ @@ -68,10 +68,10 @@
68 "postcss-position": "^0.5.0", 68 "postcss-position": "^0.5.0",
69 "postcss-pxtorem": "^3.3.1", 69 "postcss-pxtorem": "^3.3.1",
70 "postcss-short": "^1.4.0", 70 "postcss-short": "^1.4.0",
71 - "postcss-sprites": "^3.1.2", 71 + "postcss-sprites": "^3.3.0",
72 "postcss-use": "^2.2.0", 72 "postcss-use": "^2.2.0",
73 "precss": "^1.4.0", 73 "precss": "^1.4.0",
74 - "shelljs": "^0.7.0", 74 + "shelljs": "^0.7.2",
75 "style-loader": "^0.13.1", 75 "style-loader": "^0.13.1",
76 "stylelint": "^6.9.0", 76 "stylelint": "^6.9.0",
77 "stylelint-config-yoho": "1.2.5", 77 "stylelint-config-yoho": "1.2.5",
@@ -19,8 +19,8 @@ @@ -19,8 +19,8 @@
19 }; 19 };
20 }, 20 },
21 components: { 21 components: {
22 - tab: tab,  
23 - resources: resources 22 + tab,
  23 + resources
24 }, 24 },
25 created() { 25 created() {
26 bus.$on('contentCode.change', (code) => { 26 bus.$on('contentCode.change', (code) => {
@@ -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 };