Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-psd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 242e0047
authored
Dec 30, 2022
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
c645bc0a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
10 deletions
src/api/wxConfig.js
src/components/Psd.vue
src/mixins/pageMixin.js
src/mixins/shareMixin.js
src/views/psd/detail.vue
src/api/wxConfig.js
View file @
242e004
...
@@ -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
{
...
...
src/components/Psd.vue
View file @
242e004
...
@@ -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"
>
...
...
src/mixins/pageMixin.js
View file @
242e004
...
@@ -74,6 +74,7 @@ export default {
...
@@ -74,6 +74,7 @@ export default {
},
},
getList
()
{
getList
()
{
let
{
materialName
,
businessType
,
groupId
,
sort
}
=
this
let
{
materialName
,
businessType
,
groupId
,
sort
}
=
this
setTimeout
(()
=>
{
marketingApi
.
getPsdList
({
materialName
,
businessType
,
groupId
}).
then
(
data
=>
{
marketingApi
.
getPsdList
({
materialName
,
businessType
,
groupId
}).
then
(
data
=>
{
console
.
log
(
'素材列表'
,
data
)
console
.
log
(
'素材列表'
,
data
)
if
(
sort
!=
0
&&
data
&&
data
.
materialToCRpcResponses
&&
data
.
materialToCRpcResponses
.
length
)
data
.
materialToCRpcResponses
=
this
.
sortList
(
data
.
materialToCRpcResponses
,
sort
==
1
?
'sendNum'
:
'readNum'
)
if
(
sort
!=
0
&&
data
&&
data
.
materialToCRpcResponses
&&
data
.
materialToCRpcResponses
.
length
)
data
.
materialToCRpcResponses
=
this
.
sortList
(
data
.
materialToCRpcResponses
,
sort
==
1
?
'sendNum'
:
'readNum'
)
...
@@ -81,6 +82,7 @@ export default {
...
@@ -81,6 +82,7 @@ export default {
this
.
flag
=
true
this
.
flag
=
true
this
.
hideLoading
()
this
.
hideLoading
()
})
})
},
500
)
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
src/mixins/shareMixin.js
View file @
242e004
...
@@ -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
}
`
...
...
src/views/psd/detail.vue
View file @
242e004
...
@@ -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'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment