|
@@ -8,7 +8,7 @@ var homeData = new Vue({
|
|
|
pageFloors: [],
|
|
|
advertising: [],
|
|
|
asideNav: [],
|
|
|
- productIdArr:[],
|
|
|
+ productIdArr:[]
|
|
|
},
|
|
|
methods: {
|
|
|
getBanners: function(){
|
|
@@ -16,40 +16,43 @@ var homeData = new Vue({
|
|
|
$.getJSON("/home/banner").done(function (r) {
|
|
|
if (r.code === 0 && r.data) {
|
|
|
_self.images = r.data;
|
|
|
- setTimeout(function(){
|
|
|
- if (isPC) {
|
|
|
- $('#swiper-container').slide({
|
|
|
- mainCell:".swiper-wrapper"
|
|
|
- ,titCell:".swiper-pagination span"
|
|
|
- ,effect: "leftLoop"
|
|
|
- ,prevCell:".swiper-button-prev"
|
|
|
- ,nextCell:".swiper-button-next"
|
|
|
- ,interTime: 2000
|
|
|
- ,autoPlay: true
|
|
|
- ,autoPage: false
|
|
|
- ,trigger: "mouseover"
|
|
|
- });
|
|
|
- } else {
|
|
|
- var swiper = new Swiper('#swiper-container', {
|
|
|
- loop : true,
|
|
|
- autoplay: {
|
|
|
- delay: 2000,
|
|
|
- disableOnInteraction: false
|
|
|
- },
|
|
|
- navigation: {
|
|
|
- nextEl: '.swiper-button-next',
|
|
|
- prevEl: '.swiper-button-prev'
|
|
|
- },
|
|
|
- pagination: {
|
|
|
- el: '.swiper-pagination',
|
|
|
- clickable :true
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },500);
|
|
|
+ _self.swiperNanner();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ swiperNanner: function(){
|
|
|
+ setTimeout(function(){
|
|
|
+ if (isPC) {
|
|
|
+ $('#swiper-container').slide({
|
|
|
+ mainCell:".swiper-wrapper"
|
|
|
+ ,titCell:".swiper-pagination span"
|
|
|
+ ,effect: "leftLoop"
|
|
|
+ ,prevCell:".swiper-button-prev"
|
|
|
+ ,nextCell:".swiper-button-next"
|
|
|
+ ,interTime: 2000
|
|
|
+ ,autoPlay: true
|
|
|
+ ,autoPage: false
|
|
|
+ ,trigger: "mouseover"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ var swiper = new Swiper('#swiper-container', {
|
|
|
+ loop : true,
|
|
|
+ autoplay: {
|
|
|
+ delay: 2000,
|
|
|
+ disableOnInteraction: false
|
|
|
+ },
|
|
|
+ navigation: {
|
|
|
+ nextEl: '.swiper-button-next',
|
|
|
+ prevEl: '.swiper-button-prev'
|
|
|
+ },
|
|
|
+ pagination: {
|
|
|
+ el: '.swiper-pagination',
|
|
|
+ clickable :true
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },500);
|
|
|
+ },
|
|
|
getRecommends: function(){
|
|
|
var _self = this;
|
|
|
$.getJSON("/home/recommend").done(function (r) {
|