discount-detail.page.js 805 Bytes
/**
 * 折扣专场详情
 * @author: wsl<shuiling.wang@yoho.cn>
 * @date: 2016/5/20
 */

require('scss/product/sale/discount-detail-index.page.scss');

let $ = require('yoho-jquery'),
    tip = require('js/plugin/tip'),
    lazyLoad = require('yoho-jquery-lazyload');

let countDown = require('js/plugin/countdown'),
    search = require('./sale/search');

search.start();

lazyLoad($('img.lazy'));

$.ajax({
    type: 'GET',
    url: '/product/sale/discount/getTime',
    data: {
        id: window.queryString.id
    },
    success: function(data) {
        if (data) {
            // $('.activity-time').attr('data-time-s', data);

            countDown({
                endTime: [data]
            });
        }
    },
    error: function() {
        tip.show('网络断开连接了~');
    }
});