Blame view

public/js/product/vip.page.js 1.37 KB
郝肖肖 authored
1 2 3

require('../../scss/product/sale/_vip-index.css');
郝肖肖 authored
4
var Swiper = require('yoho-swiper2');
biao authored
5 6
var search = require('./sale/search');
7 8 9 10 11 12 13 14 15 16 17 18
// 获取频道页
var getChannel = function() {
    var name = window.cookie('_Channel');

    return {
        boys: 1,
        girls: 2,
        kids: 3,
        lifestyle: 4
    }[name] || 1;
};
biao authored
19
search.start();
20
zzzzzzz authored
21
$('.goods-container').on('click', '.good-info', function() {
22
    var C_ID = getChannel(),
zhangxiaoru authored
23
        UDID = window.queryString.anbiudid || window.queryString.udid || '',
24 25 26 27 28 29 30 31 32 33 34 35 36 37
        SID = window.queryString.session_id || '',
        skn = $(this).attr('data-id');

    if (window._yas && window._yas.sendCustomInfo) {
        window._yas.sendCustomInfo({
            op: 'YB_MEM_DAY_GDS_LIST_C',
            param: JSON.stringify({
                C_ID: C_ID,
                UDID: UDID,
                SID: SID,
                PRD_SKN: skn,
            }),
        }, true);
    }
zhangxiaoru authored
38
});
郝肖肖 authored
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

setTimeout(function() {
    if ($('.banner-swiper .swiper-slide').length > 1) {
        new Swiper('.swiper-container', {
            observer: true,
            observeParents: true,
            lazyLoading: true,
            lazyLoadingInPrevNext: true,
            loop: true,
            autoplay: 3000,
            autoplayDisableOnInteraction: true,
            paginationClickable: true,
            pagination: '.banner-top .pagination-inner'
        });
    }
}, 50);