...
|
...
|
@@ -8,6 +8,8 @@ |
|
|
const tab = require('channel/tab.vue');
|
|
|
const $ = require('jquery');
|
|
|
const bus = require('common/vue-bus');
|
|
|
const qs = require('yoho-qs');
|
|
|
const cookie = require('yoho-cookie');
|
|
|
|
|
|
const channelTrans = {
|
|
|
men: {
|
...
|
...
|
@@ -29,7 +31,8 @@ |
|
|
return {
|
|
|
category: [],
|
|
|
categoryResult: {},
|
|
|
gender: '1,3'
|
|
|
gender: '1,3',
|
|
|
detaultChannel: qs.channel || cookie.get('_Channel') || 'men'
|
|
|
};
|
|
|
},
|
|
|
components: {
|
...
|
...
|
@@ -44,7 +47,7 @@ |
|
|
}).then(result => {
|
|
|
if (result.code === 200 && result.data) {
|
|
|
this.$set('categoryResult', result.data);
|
|
|
this.$set('category', this.categoryResult['MEN男士']);
|
|
|
this.$set('category', this.categoryResult[channelTrans[this.detaultChannel].key]);
|
|
|
}
|
|
|
}).fail(() => {
|
|
|
tip('网络错误');
|
...
|
...
|
@@ -55,8 +58,9 @@ |
|
|
this.getCateList();
|
|
|
|
|
|
bus.$on('channel.change', (page, channel) => {
|
|
|
this.$set('gender', channelTrans[channel].code);
|
|
|
this.$set('category', this.categoryResult[channelTrans[channel].key]);
|
|
|
this.$set('detaultChannel', channel || qs.channel || cookie.get('_Channel') || 'men');
|
|
|
this.$set('gender', channelTrans[this.detaultChannel].code);
|
|
|
this.$set('category', this.categoryResult[channelTrans[this.detaultChannel].key]);
|
|
|
});
|
|
|
}
|
|
|
};
|
...
|
...
|
|