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

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

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

var countDown = require('../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('网络断开连接了~');
    }
});