...
|
...
|
@@ -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);
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|