var HomeDivView = {// 多图滑动 mySwiper : new Map(), addSwiper : function(id) { debugger; if (HomeDivView.mySwiper.containsKey(id)) { var swiper = HomeDivView.mySwiper.get(id); // swiper.destroy(false); swiper.reInit(); swiper.resizeFix(); HomeDivView.showSlideDesc(swiper); return; }else { } var swiper = new Swiper("#" + id, { slidesPerView :7, loop : false, visibilityFullFit : true, // Enable 3D Flow tdFlow : { rotate : 0, stretch : 0, depth : 520, modifier : 0, shadows : true }, onTouchEnd : function(swiper) { HomeDivView.showSlideDesc(swiper); }, onSlideClick : function(swiper) { debugger; var obj = swiper.clickedSlide; var phone = $(obj).find("a[name=goPhoneDetail]"); var mktResID = $(phone).attr("mktResID"); var mktResName= $(phone).attr("mktResName"); var mktResPrice= $(phone).attr("mktResPrice"); var pictureUrl= $(phone).attr("pictureUrl"); queryPhoneDetail(mktResID,mktResName,mktResPrice,pictureUrl,"phoneIndex","phonePage"); }, onSlideTouch : function(swiper) { debugger; if (swiper.clickedSlideIndex == 2 || swiper.clickedSlideIndex == 3) { var activeIndex = swiper.activeIndex; if ((activeIndex + 1) == swiper.clickedSlideIndex) { debugger; var obj = swiper.clickedSlide; var phone = $(obj).find("a[name=goPhoneDetail]"); var mktResID = $(phone).attr("mktResID"); var mktResName= $(phone).attr("mktResName"); var mktResPrice= $(phone).attr("mktResPrice"); var pictureUrl= $(phone).attr("pictureUrl"); queryPhoneDetail(mktResID,mktResName,mktResPrice,pictureUrl,"phoneIndex","phonePage"); } } } }); HomeDivView.showSlideDesc(swiper); HomeDivView.mySwiper.put(id, swiper); }, showSlideDesc : function(swiper) {// 显示终端下面说明 console.log("----"+swiper); } };