Commit 653f765b by 赵雅纹

种草视频显示

parent 37a24d40
<!--component/buyImageSwiper/buyImageSwiper.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<view class="image-wrap">
<swiper
indicator-dots="{{indicatorDots}}"
......@@ -11,7 +12,8 @@
>
<block wx:for="{{imageData}}" wx:key="{{item}}">
<swiper-item class="swiper-item">
<image src="{{item.url}}" data-appid="{{item.id}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindtap='preview' class="slide-image" />
<image src="{{item.url}}" wx:if="{{!item.videoUrl}}" data-appid="{{item.id}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindtap='preview' class="slide-image" />
<video class="slide-image" src="{{utils.formateUrl(item.videoUrl,baseImgUrl)}}" wx:if="{{item.videoUrl}}" controls="true" autoplay="true"></video>
</swiper-item>
</block>
......
......@@ -87,26 +87,28 @@ wxService.page({
// 获取关联商品
getInitPro(productIds){
wxService.post(`/sale/product/buyer/listPage?pageNo=${this.data.pageNo}&pageSize=${this.data.pageSize}`,{
productIds: productIds
}).then(res => {
const { result, data } = res.data
if (result == 0 && data.content) {
this.setData({
proGoods: data.content
})
let stcList = []
for (var i in this.data.proGoods) {
stcList.push({
commodityId: this.data.proGoods[i].productId
})
if (productIds && productIds.length > 0){
wxService.post(`/sale/product/buyer/listPage?pageNo=${this.data.pageNo}&pageSize=${this.data.pageSize}`,{
productIds: productIds
}).then(res => {
const { result, data } = res.data
if (result == 0 && data.content) {
this.setData({
'params.stcList': stcList
proGoods: data.content
})
let stcList = []
for (var i in this.data.proGoods) {
stcList.push({
commodityId: this.data.proGoods[i].productId
})
this.setData({
'params.stcList': stcList
})
}
}
}
}).finally(() => {
})
}).finally(() => {
})
}
},
// 关联商品
......
......@@ -4,6 +4,7 @@
"x-dialog": "/component/dialog/dialog",
"card-modal": "/component/cardModal/cardModal",
"go-home": "/component/goHome/goHome",
"x-html": "/component/html2wxml/wxHtml"
"x-html": "/component/html2wxml/wxHtml",
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper"
}
}
\ No newline at end of file
<!--subPackage/page/pages/myReleaseDetail.wxml-->
<view class="release-detail">
<view class="detail-img">
<!-- <view class="detail-img">
<image src="{{contentInfo.sspList[0].url}}" />
</view>
</view> -->
<buy-image-swiper bind:updatePage="updatePage" image-data="{{contentInfo.sspList}}" />
<view class="detail-content border_box">
<view class="detail-title">{{contentInfo.headline}}</view>
<view class="detail-desc"><x-html html="{{contentInfo.article}}" /></view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment