Commit 242e0047 by zhangquan

修复bug

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