Commit 653f765b by 赵雅纹

种草视频显示

parent 37a24d40
<!--component/buyImageSwiper/buyImageSwiper.wxml--> <!--component/buyImageSwiper/buyImageSwiper.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<view class="image-wrap"> <view class="image-wrap">
<swiper <swiper
indicator-dots="{{indicatorDots}}" indicator-dots="{{indicatorDots}}"
...@@ -11,7 +12,8 @@ ...@@ -11,7 +12,8 @@
> >
<block wx:for="{{imageData}}" wx:key="{{item}}"> <block wx:for="{{imageData}}" wx:key="{{item}}">
<swiper-item class="swiper-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> </swiper-item>
</block> </block>
......
...@@ -87,6 +87,7 @@ wxService.page({ ...@@ -87,6 +87,7 @@ wxService.page({
// 获取关联商品 // 获取关联商品
getInitPro(productIds){ getInitPro(productIds){
if (productIds && productIds.length > 0){
wxService.post(`/sale/product/buyer/listPage?pageNo=${this.data.pageNo}&pageSize=${this.data.pageSize}`,{ wxService.post(`/sale/product/buyer/listPage?pageNo=${this.data.pageNo}&pageSize=${this.data.pageSize}`,{
productIds: productIds productIds: productIds
}).then(res => { }).then(res => {
...@@ -107,6 +108,7 @@ wxService.page({ ...@@ -107,6 +108,7 @@ wxService.page({
} }
}).finally(() => { }).finally(() => {
}) })
}
}, },
// 关联商品 // 关联商品
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"x-dialog": "/component/dialog/dialog", "x-dialog": "/component/dialog/dialog",
"card-modal": "/component/cardModal/cardModal", "card-modal": "/component/cardModal/cardModal",
"go-home": "/component/goHome/goHome", "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--> <!--subPackage/page/pages/myReleaseDetail.wxml-->
<view class="release-detail"> <view class="release-detail">
<view class="detail-img"> <!-- <view class="detail-img">
<image src="{{contentInfo.sspList[0].url}}" /> <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-content border_box">
<view class="detail-title">{{contentInfo.headline}}</view> <view class="detail-title">{{contentInfo.headline}}</view>
<view class="detail-desc"><x-html html="{{contentInfo.article}}" /></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