shoppingList.js 1.25 KB
define(function( require, exports, module ) {
/*
	引入包
*/
var _Tools = require("tools"),
    _Droll = require( "droll" );

    require( 'timeDown' );

$(function(){

	/**
	 * 界面显示
	 */
	var rolling = _Tools.sollView({
		leftBtn : $(".page-left"),
		rightBtn : $(".page-right"),
		sollView : $("#move-list ul"),
		view : $("#move-list"),
		callBack : function(index, max){
			$(".page-num").html(((-index)+1)+"/"+max);
		}
	});

    /*
     * 集采计时器
     */
     if( $( '.count-down' ).length ){
     	$( '.count-down' ).each( function(){
            var _runtime = parseFloat( $( this ).attr( 'runtime' ) );
            $( this ).timeDown({
                runTime:_runtime,
                daysText:'天',
                sign:['<span>:</span>','<span>:</span>','']
            });
        });
     }

    //轮播
    if ( $( ".shopping-promo" ).length ){
        $( ".shopping-promo" ).each( function(){
			new _Droll( this,{
				step        : $( ".shopping-promo" ).width(),
				moveNum     : 1,
                auto        : true,
                indexButton : true,
                btnHoverActive: true,
				showNum: false,
                Media: true  // 轮播图适应响应式
            });
        } );
    };

});

});