|
@@ -224,7 +224,7 @@ var productDetail = new Vue({
|
|
|
_self.isHideButton = true
|
|
|
_self.handleShowProductType()
|
|
|
}
|
|
|
- // _self.getRecommends();
|
|
|
+ _self.getRecommends();
|
|
|
_self.getProdcutArchiveDetails(); //获取资料列表
|
|
|
// 获取路由hash标识,设置默认展开tab
|
|
|
var str = CAIMEI.getUrlParam('open');
|
|
@@ -461,52 +461,52 @@ var productDetail = new Vue({
|
|
|
window.location.href = '/shopping/confirm.html?type=2&productId='+_self.productId+'&count='+_self.number;
|
|
|
}
|
|
|
},
|
|
|
- // getRecommends: function () {
|
|
|
- // var _self = this;
|
|
|
- // if (!this.productId) {
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // ProductApi.GetProductDdtailsRecommend(
|
|
|
- // {
|
|
|
- // productId: _self.productId,
|
|
|
- // recommendType: _self.recommendType,
|
|
|
- // userId: _self.userId
|
|
|
- // },
|
|
|
- // function (response) {
|
|
|
- // if (response.code === 0 && response.data) {
|
|
|
- // if (response.data.length > 0) {
|
|
|
- // _self.recommends = response.data;
|
|
|
- // _self.recommendPage = isPC ? Math.ceil(response.data.length / 7) : Math.ceil(response.data.length / 3);
|
|
|
- // setTimeout(function () {
|
|
|
- // if (isPC) {
|
|
|
- // $('#productRecommend').slide({
|
|
|
- // mainCell: ".swiper-wrapper",
|
|
|
- // titCell: ".swiper-pagination span",
|
|
|
- // effect: "leftLoop",
|
|
|
- // interTime: 3000,
|
|
|
- // autoPlay: true,
|
|
|
- // scroll: 7,
|
|
|
- // vis: 7,
|
|
|
- // trigger: "mouseover"
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // var swiper = new Swiper('#productRecommend', {
|
|
|
- // slidesPerView: 3,
|
|
|
- // spaceBetween: 0,
|
|
|
- // autoplay: {
|
|
|
- // delay: 3000,
|
|
|
- // disableOnInteraction: false
|
|
|
- // },
|
|
|
- // pagination: {
|
|
|
- // el: '.swiper-pagination'
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }, 500);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- // },
|
|
|
+ getRecommends: function () {
|
|
|
+ var _self = this;
|
|
|
+ if (!this.productId) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ProductApi.GetProductDdtailsRecommend(
|
|
|
+ {
|
|
|
+ productId: _self.productId,
|
|
|
+ recommendType: _self.recommendType,
|
|
|
+ userId: _self.userId
|
|
|
+ },
|
|
|
+ function (response) {
|
|
|
+ if (response.code === 0 && response.data) {
|
|
|
+ if (response.data.length > 0) {
|
|
|
+ _self.recommends = response.data;
|
|
|
+ _self.recommendPage = isPC ? Math.ceil(response.data.length / 7) : Math.ceil(response.data.length / 3);
|
|
|
+ setTimeout(function () {
|
|
|
+ if (isPC) {
|
|
|
+ $('#productRecommend').slide({
|
|
|
+ mainCell: ".swiper-wrapper",
|
|
|
+ titCell: ".swiper-pagination span",
|
|
|
+ effect: "leftLoop",
|
|
|
+ interTime: 3000,
|
|
|
+ autoPlay: true,
|
|
|
+ scroll: 7,
|
|
|
+ vis: 7,
|
|
|
+ trigger: "mouseover"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ var swiper = new Swiper('#productRecommend', {
|
|
|
+ slidesPerView: 3,
|
|
|
+ spaceBetween: 0,
|
|
|
+ autoplay: {
|
|
|
+ delay: 3000,
|
|
|
+ disableOnInteraction: false
|
|
|
+ },
|
|
|
+ pagination: {
|
|
|
+ el: '.swiper-pagination'
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
queryProductDetilsCoupons: function() {// 初始化商品详情优惠券信息
|
|
|
var _self = this;
|
|
|
ProductApi.QueryProductDetilsCoupons(_self.couponParam, function (response) {
|