outlet-will-start.page.js 1009 Bytes
/**
 * Created by runner on 16/6/14.
 */
let $ = require('yoho-jquery'),
    tip = require('plugin/tip'),
    iscroll = require('./outlet/nav');

let $bgw = $('.back-ground-white'),
    $indexNav = $('#index_nav');

require('common');
require('./outlet/set-backurl');

// 导航滚动
if ($indexNav.length > 0) {
    iscroll({
        el: '#index_nav'
    }).goto($indexNav.find('.active').index());
}

if ($bgw.length < 1) {
    $('.empty').show();
}

$bgw.on('click', function() {
    tip.show('活动即将开始,敬请期待!');
    return false;
});

$.ajax({
    type: 'GET',
    url: '/product/outlet/activityTime',
    data: {
        type: window.queryString.type || 3
    },
    success: function(data) {
        let $cdMedium = $('.cd-medium');

        if (data) {
            $cdMedium.each(function(key, item) {
                $(item).html(data[key]);
            });

            $cdMedium.show();
        }
    },
    error: function() {
        tip.show('网络断开连接了~');
    }
});