Authored by 沈志敏

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

... ... @@ -9,13 +9,13 @@ const api = global.yoho.API;
const yhChannel = {
men: {
channel: '1'
channel: '301'
},
women: {
channel: '2'
channel: '302'
},
lifestyle: {
channel: '4'
channel: '303'
}
};
... ...
... ... @@ -30,7 +30,7 @@ const handleBrandList = origin => {
_.forEach(value, (subValue) => {
brands.push({
name: subValue.brand_name,
name: subValue.brand_name_en || subValue.brand_name_cn || subValue.brand_name,
logo: subValue.brand_ico,
domain: subValue.brand_domain
});
... ...
... ... @@ -272,7 +272,7 @@ const intercept = (url) => {
}
// 首页
if (/\/$/.test(path)) {
if (/\/$/.test(path) || !path) {
return yoho.goTab({
index: 0,
url: /^(https?:)?\/\//i.test(url) ? url : origin + url
... ...
... ... @@ -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]);
});
}
};
... ...
... ... @@ -90,7 +90,7 @@
title: result.shopName,
des: shareSubTitle,
url: shareUrl,
img: result.shopBg,
img: result.shopLogo ? result.shopLogo : '',
isBlkShop: result.isBlkShop,
domain: locationQuery.domain,
brandName: result.brandName,
... ...