Authored by 王水玲

单品日

... ... @@ -16,20 +16,22 @@ module.exports = {
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
domains: {
//api: 'http://api.yoho.yohoops.org/',
// api: 'http://api.yoho.yohoops.org/',
// service: 'http://service.yoho.yohoops.org/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
//api: 'http://api-test1.yohops.com:9999/',
service: 'http://service-test1.yohops.com:9999/',
//liveApi: 'http://testapi.live.yohops.com:9999/',
//singleApi: 'http://api-test1.yohops.com:9999/'
// api: 'http://api-test1.yohops.com:9999/',
service: 'http://service-test1.yohops.com:9999/',
api: 'http://dev-api.yohops.com:9999/',
//service: 'http://dev-service.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test1.yohops.com:9999/'
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test1.yohops.com:9999/'
api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test1.yohops.com:9999/'
},
subDomains: {
... ...
... ... @@ -54,9 +54,9 @@ var getInitData = function() {
type: 'GET',
url: '/activity/single-day/getSingleData',
success: function(data) {
var i = 0, $swiperTab;
var i = 0, $swiperTab, $productTab;
//data[1] = ['限定名额', '首发', '热卖', '明星单品'];
// data[1] = ['限定名额', '首发', '热卖', '明星单品'];
if (data[0]) {
$('.banner').append(banner(data[0][0]));
... ... @@ -87,6 +87,8 @@ var getInitData = function() {
$productList.append('<ul class="product-tab"></ul>');
}
$productTab = $('.product-tab');
getProductData(hash, tabName(hash));
$swiperTab.eq(hash).addClass('active');
... ... @@ -95,8 +97,8 @@ var getInitData = function() {
$swiperTab.removeClass('active').eq(index).addClass('active');
if ($('.product-tab').eq(index).find('li').length > 0) {
return false;
if ($productTab.eq(index).find('li').length > 0) {
$productTab.hide().eq(index).show();
} else {
getProductData(index, tabName(index));
}
... ...