商品详情改为直接加载
This commit is contained in:
parent
8c287a4de8
commit
6f8f88a7b5
@ -20,8 +20,6 @@ Page({
|
|||||||
openAttr: false,
|
openAttr: false,
|
||||||
soldout: false,
|
soldout: false,
|
||||||
disabled: '',
|
disabled: '',
|
||||||
is_show: 0,
|
|
||||||
endLoad: true,
|
|
||||||
alone_text: '单独购买',
|
alone_text: '单独购买',
|
||||||
userId: 0,
|
userId: 0,
|
||||||
priceChecked: false,
|
priceChecked: false,
|
||||||
@ -69,17 +67,6 @@ Page({
|
|||||||
current: current
|
current: current
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDetailInfo: function() {
|
|
||||||
let that = this;
|
|
||||||
let goods = that.data.goods;
|
|
||||||
WxParse.wxParse('goodsDetail', 'html', goods.goods_desc, that);
|
|
||||||
that.setData({
|
|
||||||
is_show: 1
|
|
||||||
});
|
|
||||||
that.setData({
|
|
||||||
endLoad: false
|
|
||||||
});
|
|
||||||
},
|
|
||||||
inputNumber(event) {
|
inputNumber(event) {
|
||||||
let number = event.detail.value;
|
let number = event.detail.value;
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -138,6 +125,7 @@ Page({
|
|||||||
galleryImages: galleryImages,
|
galleryImages: galleryImages,
|
||||||
loading:1
|
loading:1
|
||||||
});
|
});
|
||||||
|
WxParse.wxParse('goodsDetail', 'html', res.data.info.goods_desc, that);
|
||||||
wx.setStorageSync('goodsImage', res.data.info.https_pic_url);
|
wx.setStorageSync('goodsImage', res.data.info.https_pic_url);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -554,19 +542,5 @@ Page({
|
|||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onReachBottom: function() {
|
|
||||||
let that = this;
|
|
||||||
let endLoad = that.data.endLoad;
|
|
||||||
if (endLoad == true) {
|
|
||||||
let goods = that.data.goods;
|
|
||||||
WxParse.wxParse('goodsDetail', 'html', goods.goods_desc, that);
|
|
||||||
that.setData({
|
|
||||||
is_show: 1
|
|
||||||
});
|
|
||||||
that.setData({
|
|
||||||
endLoad: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block wx:if="{{gallery.length > 0}}">
|
<block wx:if="{{gallery.length > 0}}">
|
||||||
<swiper bindchange="bindchange" class="banner banner-style1" indicator-dots="{{false}}" autoplay="{{autoplay}}" current="{{current}}" circular="{{true}}" interval="3000" duration="1000" display-multiple-items="1">
|
<swiper bindchange="bindchange" class="banner banner-style1" indicator-dots="{{false}}" autoplay="{{false}}" current="{{current}}" circular="{{true}}" interval="3000" duration="1000" display-multiple-items="1">
|
||||||
<swiper-item class="item" wx:for="{{gallery}}" wx:key="id">
|
<swiper-item class="item" wx:for="{{gallery}}" wx:key="id">
|
||||||
<image bindtap="previewImage" data-src="{{item.img_url}}" src="{{item.img_url}}" class="slide-image" mode="aspectFill" />
|
<image bindtap="previewImage" data-src="{{item.img_url}}" src="{{item.img_url}}" class="slide-image" mode="aspectFill" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@ -55,10 +55,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class='details-wrap'>
|
<view class='details-wrap'>
|
||||||
<view class="title">商品详情</view>
|
<view class="title">商品详情</view>
|
||||||
<!-- <ad unit-id="adunit-abf12db5663f60e0" ad-type="video" ad-theme="white"></ad> -->
|
|
||||||
<view class="show">
|
<view class="show">
|
||||||
<view class='details-image-wrap'>
|
<view class='details-image-wrap'>
|
||||||
<view class='show-detail' bindtap='getDetailInfo' wx:if="{{is_show == 0}}">点击显示详情</view>
|
|
||||||
<import src="../../lib/wxParse/wxParse.wxml" />
|
<import src="../../lib/wxParse/wxParse.wxml" />
|
||||||
<template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
|
<template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -266,7 +266,7 @@ form {
|
|||||||
/* font-weight: bold; */
|
/* font-weight: bold; */
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
/* white-space: nowrap; 群友ef发现的问题*/
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user