Blame view

public/js/product/outlet-will-start.page.js 1015 Bytes
runner authored
1 2 3 4
/**
 * Created by runner on 16/6/14.
 */
var $ = require('yoho-jquery'),
runner authored
5 6
    tip = require('../plugin/tip'),
    iscroll = require('./outlet/nav');
runner authored
7
8 9 10
var $bgw = $('.back-ground-white'),
    $indexNav = $('#index_nav');
biao authored
11
require('../common');
biao authored
12
require('./outlet/set-backurl');
runner authored
13
runner authored
14
// 导航滚动
15
if ($indexNav.length > 0) {
runner authored
16 17
    iscroll({
        el: '#index_nav'
18
    }).goto($indexNav.find('.active').index());
runner authored
19 20
}
21
if ($bgw.length < 1) {
runner authored
22
    $('.empty').show();
runner authored
23 24
}
25
$bgw.on('click', function() {
runner authored
26
    tip.show('活动即将开始,敬请期待!');
runner authored
27 28
    return false;
});
runner authored
29
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
$.ajax({
    type: 'GET',
    url: '/product/outlet/activityTime',
    data: {
        type: window.queryString.type || 3
    },
    success: function(data) {
        var $cdMedium = $('.cd-medium');

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

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