Authored by 郭成尧

品牌一览数据OK

... ... @@ -54,7 +54,7 @@ module.exports = {
getBrandList: (req, res) => {
brandModel.getBrandListData({
channel: req.query.channel || req.cookies._Channel || 'boys'
channel: req.query.channel || req.cookies._Channel || 'men'
}).then(result => {
res.json(result);
});
... ...
... ... @@ -8,15 +8,12 @@
const api = global.yoho.API;
const yhChannel = {
boys: {
men: {
channel: '1'
},
girls: {
women: {
channel: '2'
},
kids: {
channel: '3'
},
lifestyle: {
channel: '4'
}
... ...
... ... @@ -2,7 +2,7 @@
<tab v-bind:page="page"></tab>
<resources v-bind:content-code.sync="contentCode"></resources>
<letter-list></letter-list>
<brand-list v-bind:channel="'boys'"></brand-list>
<brand-list v-bind:channel="channel"></brand-list>
</template>
<script>
const contentCode = require('content-code');
... ... @@ -18,7 +18,8 @@
data() {
return {
page: 'brand',
contentCode: contentCode.brand[qs.brand || 'men']
contentCode: contentCode.brand[qs.brand || 'men'],
channel: qs.channel
};
},
components: {
... ...
... ... @@ -50,6 +50,7 @@
</style>
<script>
const $ = require('yoho-jquery');
const bus = require('common/vue-bus');
const tip = require('common/tip');
module.exports = {
... ... @@ -83,6 +84,9 @@
},
created() {
this.getBrandList();
bus.$on('channel.change', (page, channel) => {
this.channel = channel;
});
}
};
</script>
... ...