Commit 242e0047 by zhangquan

修复bug

1 parent c645bc0a
......@@ -180,6 +180,7 @@ const WxConfig = {
shareToExternalMoments (params) {
return new Promise((resolve, reject) => {
wx.invoke('shareToExternalMoments', params, res => {
util.hideLoading()
if (res.err_msg == 'shareToExternalMoments:ok') {
resolve()
} else {
......
......@@ -10,16 +10,16 @@
<template v-if="item.materialType == 1">
<div class="sprite-icon icon-pdf"></div>
</template>
<template v-else-if="item.materialType == 2">链接</template>
<template v-else-if="item.materialType == 3">
<!-- <template v-else-if="item.materialType == 2">链接</template> -->
<template v-else>
<div @click="goDetailPage(item)" class="gr-ctx">
<div class="sprite-icon icon-grctx"></div>
查看图文
</div>
</template>
<template v-else>
<!-- <template v-else>
<div v-html="decodeURIComponent(item.materialUrl)" class="hide"></div>
</template>
</template> -->
</div>
<div class="bottom flex">
<div class="num flex">
......
......@@ -74,13 +74,15 @@ export default {
},
getList () {
let { materialName, businessType, groupId, sort } = this
marketingApi.getPsdList({ materialName, businessType, groupId }).then(data => {
console.log('素材列表', data)
if (sort != 0 && data && data.materialToCRpcResponses && data.materialToCRpcResponses.length) data.materialToCRpcResponses = this.sortList(data.materialToCRpcResponses, sort == 1 ? 'sendNum' : 'readNum')
this.list = data.materialToCRpcResponses || []
this.flag = true
this.hideLoading()
})
setTimeout(()=>{
marketingApi.getPsdList({ materialName, businessType, groupId }).then(data => {
console.log('素材列表', data)
if (sort != 0 && data && data.materialToCRpcResponses && data.materialToCRpcResponses.length) data.materialToCRpcResponses = this.sortList(data.materialToCRpcResponses, sort == 1 ? 'sendNum' : 'readNum')
this.list = data.materialToCRpcResponses || []
this.flag = true
this.hideLoading()
})
},500)
}
}
}
\ No newline at end of file
......@@ -28,9 +28,9 @@ export default {
const { merchantId, uuid, sapCode, userName } = this.getLocalStorage('dj_scrm_userInfo')
const { entry } = this
const { materialName, id, titleUrl, materialTitle, description, videoUrl, imageUrlList } = i
let fisrtFrame = videoUrl && await this.getVideoFirstFrame(videoUrl)
// let fisrtFrame = videoUrl && await this.getVideoFirstFrame(videoUrl)
const imgUrl = 'https://img01.glsx.com.cn/weapp/resource/scrm-mobile/test/test.jpg'
let frameUrl = (imageUrlList && imageUrlList.length) ? imageUrlList[0] : (videoUrl && fisrtFrame && fisrtFrame.dataURL) ? fisrtFrame.dataURL : imgUrl
let frameUrl = (imageUrlList && imageUrlList.length) ? imageUrlList[0] : imgUrl
let query = `merchantId=${merchantId}&id=${id}&staffUuid=${uuid}&shareTime=${Date.now()}`
if (sapCode) query = `${query}&storeCode=${sapCode}`
......
......@@ -4,7 +4,7 @@
<template v-if="(info.imageUrlList && info.imageUrlList.length) || info.videoUrl">
<van-swipe @change="changeSwiper" height="210" show-indicators>
<van-swipe-item v-if="info.videoUrl">
<video id="swiper_video" :autoplay="autoplay" :poster="poster" controls controlslist="nodownload" disablepictureinpicture playsinline="true" :src="info.videoUrl"></video>
<video id="swiper_video" :autoplay="autoplay" controls controlslist="nodownload" disablepictureinpicture playsinline="true" :src="info.videoUrl"></video>
</van-swipe-item>
<van-swipe-item v-for="(item, index) in info.imageUrlList" :key="index">
<van-image width="100%" height="100%" fit="cover" :src="item" />
......@@ -87,9 +87,9 @@ export default {
this.info = data
this.loaded = true
if(!data.videoUrl) return;
this.getVideoFirstFrame(data.videoUrl).then(res => {
this.poster = res.dataURL
})
// this.getVideoFirstFrame(data.videoUrl).then(res => {
// this.poster = res.dataURL
// })
this.$nextTick(()=>{
const video = document.getElementById('swiper_video')
video.addEventListener('play', ()=> {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!