Authored by ccbikai

Merge branch 'feature/channel' into develop

... ... @@ -15,8 +15,8 @@ module.exports = {
port: 6004,
siteUrl: '//m.yohoblk.com',
domains: {
api: 'http://devapi.yoho.cn:58078/',
service: 'http://devservice.yoho.cn:58077/'
api: 'http://192.168.102.205:8080/gateway/',
service: 'http://192.168.102.205:8080/gateway/'
},
subDomains: {
host: '.m.yohoblk.com',
... ...
... ... @@ -39,14 +39,14 @@
"winston": "^2.2.0",
"winston-daily-rotate-file": "^1.1.4",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "0.0.21"
"yoho-node-lib": "0.0.26"
},
"devDependencies": {
"autoprefixer": "^6.3.7",
"babel-core": "^6.10.4",
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"eslint": "^3.0.1",
"eslint": "^3.1.1",
"eslint-config-yoho": "^1.0.1",
"eslint-plugin-html": "^1.5.1",
"extract-text-webpack-plugin": "^1.0.1",
... ... @@ -57,8 +57,8 @@
"gulp-sourcemaps": "^2.0.0-alpha",
"gulp-util": "^3.0.7",
"handlebars-loader": "^1.3.0",
"husky": "^0.11.4",
"nodemon": "1.9.2",
"husky": "^0.11.6",
"nodemon": "^1.10.0",
"postcss-assets": "^4.0.1",
"postcss-cachebuster": "^0.1.3",
"postcss-calc": "^5.2.1",
... ... @@ -68,10 +68,10 @@
"postcss-position": "^0.5.0",
"postcss-pxtorem": "^3.3.1",
"postcss-short": "^1.4.0",
"postcss-sprites": "^3.1.2",
"postcss-sprites": "^3.3.0",
"postcss-use": "^2.2.0",
"precss": "^1.4.0",
"shelljs": "^0.7.0",
"shelljs": "^0.7.2",
"style-loader": "^0.13.1",
"stylelint": "^6.9.0",
"stylelint-config-yoho": "1.2.5",
... ...
... ... @@ -19,8 +19,8 @@
};
},
components: {
tab: tab,
resources: resources
tab,
resources
},
created() {
bus.$on('contentCode.change', (code) => {
... ...
... ... @@ -7,8 +7,14 @@
</template>
<script>
const cookie = require('yoho-cookie');
const bus = require('common/vue-bus');
const channelMap = {};
const channelMap = {
301: 'men',
302: 'women',
303: 'lifestyle'
};
module.exports = {
props: {
... ... @@ -30,14 +36,14 @@
$.ajax({
url: '/channel/channel.json'
}).then(res => {
if (res.code === 200) {
if (res.data.length) {
const channel = [];
res.data.forEach(c => {
channel.push[{
channel.push({
name: c.channelName,
channel: channelMap[c.channeId] || ''
}];
channel: channelMap[c.channelId] || ''
});
});
this.channel = channel;
... ... @@ -48,6 +54,7 @@
changeChannel(index) {
this.current = index;
bus.$emit('channel.change', this.page, this.channel[index].channel);
cookie.set('_Channel', this.channel[index].channel);
}
}
};
... ...