Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fed232dc
authored
Dec 25, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:没有预览图就默认
1 parent
7715c095
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
7 deletions
pages/evaluationForm/addEvaluationFrom.vue
pages/evaluationForm/components/uploadMedia.vue
pages/evaluationForm/evaluationFormDetails.vue
pages/evaluationForm/addEvaluationFrom.vue
View file @
fed232d
...
...
@@ -1367,6 +1367,8 @@ export default {
if
(
res
.
data
.
code
==
0
)
{
uni
.
showToast
({
title
:
'行驶证信息识别完成,已自动填写到表单中'
,
icon
:
'none'
})
if
(
res
.
data
.
data
.
status
==
1
)
{
const
plateLocation
=
getPlateLocation
(
res
.
data
.
data
.
licensePlate
)
console
.
log
(
'plateLocation'
,
plateLocation
)
this
.
formData
.
carBaseReqDTO
.
engineNumber
=
res
.
data
.
data
.
engineNumber
if
(
this
.
title
==
'新增评估单'
)
{
this
.
formData
.
carBaseReqDTO
.
licensePlate
=
res
.
data
.
data
.
licensePlate
...
...
pages/evaluationForm/components/uploadMedia.vue
View file @
fed232d
...
...
@@ -20,8 +20,7 @@
<!-- 视频显示 -->
<view
v-else
class=
"video-container"
@
click
.
stop=
"previewMedia(media, 2)"
>
<!--
<video
:src=
"media.url || media"
mode=
"aspectFill"
controls
class=
"uploaded-media"
></video>
-->
<image
:src=
"media.url + videoProcess"
mode=
"aspectFill"
></image>
<image
:src=
"getVideoThumbnail(media)"
mode=
"aspectFill"
></image>
<view
class=
"video-play-icon"
>
<view
class=
"sprite-icon icon-upload-play"
></view>
</view>
...
...
@@ -69,7 +68,8 @@ export default {
},
data
()
{
return
{
videoProcess
:
'?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'
videoProcess
:
'?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'
,
videoDefaultImage
:
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/video_default.png'
}
},
methods
:
{
...
...
@@ -399,6 +399,26 @@ export default {
})
}
},
// 判断是否是阿里云链接
isAliyunUrl
(
url
)
{
if
(
!
url
)
return
false
const
urlStr
=
typeof
url
===
'string'
?
url
:
url
.
url
||
''
return
urlStr
.
includes
(
'aliyuncs.com'
)
||
urlStr
.
includes
(
'oss-cn-'
)
},
// 获取视频缩略图
getVideoThumbnail
(
media
)
{
const
videoUrl
=
media
.
url
||
media
if
(
!
videoUrl
)
return
this
.
videoDefaultImage
// 判断是否是阿里云链接
if
(
this
.
isAliyunUrl
(
videoUrl
))
{
// 阿里云链接,拼接 videoProcess
return
videoUrl
+
this
.
videoProcess
}
else
{
// 非阿里云链接(如小程序链接),显示默认图片
return
this
.
videoDefaultImage
}
},
previewMedia
(
media
,
type
)
{
const
url
=
`/pages/boutique/preview?tabName=预览&sourceType=
${
type
}
&detailUrl=
${
media
.
url
||
media
}
`
uni
.
navigateTo
({
...
...
pages/evaluationForm/evaluationFormDetails.vue
View file @
fed232d
...
...
@@ -104,7 +104,7 @@
<view
class=
"upload-images-wrapper"
v-if=
"getImageBySubtype(field.key)"
>
<view
class=
"uploaded-media-container"
>
<view
class=
"video-container"
>
<image
:src=
"get
ImageBySubtype(field.key).fileUrl + videoProcess
"
mode=
"aspectFill"
class=
"uploaded-media"
@
click
.
stop=
"previewMedia(getImageBySubtype(field.key).fileUrl, 2)"
></image>
<image
:src=
"get
VideoThumbnail(getImageBySubtype(field.key).fileUrl)
"
mode=
"aspectFill"
class=
"uploaded-media"
@
click
.
stop=
"previewMedia(getImageBySubtype(field.key).fileUrl, 2)"
></image>
<!-- <video :src="getImageBySubtype(field.key).fileUrl" mode="aspectFill" controls class="uploaded-media"></video> -->
<view
class=
"video-play-icon"
>
<view
class=
"sprite-icon icon-upload-play"
></view>
...
...
@@ -311,7 +311,7 @@
<image
@
click
.
stop=
"previewMedia(url, 1)"
v-for=
"(url, idx) in splitMediaUrls(formatValue(item, detailsInfo))"
:key=
"idx"
:src=
"url"
mode=
"aspectFill"
style=
"margin-right: 10px"
></image>
</
template
>
<
template
v-else
>
<image
v-if=
"formatValue(item, detailsInfo).includes('mp4')"
:src=
"
formatValue(item, detailsInfo) + videoProcess
"
@
click
.
stop=
"previewMedia(formatValue(item, detailsInfo), 2)"
></image>
<image
v-if=
"formatValue(item, detailsInfo).includes('mp4')"
:src=
"
getVideoThumbnail(formatValue(item, detailsInfo))
"
@
click
.
stop=
"previewMedia(formatValue(item, detailsInfo), 2)"
></image>
<image
v-else
:src=
"formatValue(item, detailsInfo)"
@
click
.
stop=
"previewMedia(formatValue(item, detailsInfo), 1)"
></image>
</
template
>
</view>
...
...
@@ -393,7 +393,7 @@
</
template
>
</view>
<view
v-else-if=
"item.fieldType == 'video'"
>
<image
@
click
.
stop=
"previewMedia(url, 2)"
v-for=
"(url, idx) in splitMediaUrls(item.fieldBeforeValue)"
:key=
"idx"
:src=
"
url + videoProcess
"
mode=
"aspectFill"
style=
"margin-right: 10px; width: 80px; height: 80px"
></image>
<image
@
click
.
stop=
"previewMedia(url, 2)"
v-for=
"(url, idx) in splitMediaUrls(item.fieldBeforeValue)"
:key=
"idx"
:src=
"
getVideoThumbnail(url)
"
mode=
"aspectFill"
style=
"margin-right: 10px; width: 80px; height: 80px"
></image>
</view>
</template>
</view>
...
...
@@ -409,7 +409,7 @@
</
template
>
</view>
<view
v-else-if=
"item.fieldType == 'video'"
>
<image
@
click
.
stop=
"previewMedia(url, 2)"
v-for=
"(url, idx) in splitMediaUrls(item.fieldAfterValue)"
:key=
"idx"
:src=
"
url + videoProcess
"
mode=
"aspectFill"
style=
"margin-right: 10px; width: 80px; height: 80px"
></image>
<image
@
click
.
stop=
"previewMedia(url, 2)"
v-for=
"(url, idx) in splitMediaUrls(item.fieldAfterValue)"
:key=
"idx"
:src=
"
getVideoThumbnail(url)
"
mode=
"aspectFill"
style=
"margin-right: 10px; width: 80px; height: 80px"
></image>
</view>
</template>
</view>
...
...
@@ -447,6 +447,7 @@ export default {
data
()
{
return
{
videoProcess
:
'?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'
,
videoDefaultImage
:
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/video_default.png'
,
imageDatas
:
{
carImageList
:
[
{
...
...
@@ -696,6 +697,25 @@ export default {
},
mounted
()
{},
methods
:
{
// 判断是否是阿里云链接
isAliyunUrl
(
url
)
{
if
(
!
url
)
return
false
const
urlStr
=
typeof
url
===
'string'
?
url
:
''
return
urlStr
.
includes
(
'aliyuncs.com'
)
||
urlStr
.
includes
(
'oss-cn-'
)
},
// 获取视频缩略图
getVideoThumbnail
(
url
)
{
if
(
!
url
)
return
this
.
videoDefaultImage
// 判断是否是阿里云链接
if
(
this
.
isAliyunUrl
(
url
))
{
// 阿里云链接,拼接 videoProcess
return
url
+
this
.
videoProcess
}
else
{
// 非阿里云链接(如小程序链接),显示默认图片
return
this
.
videoDefaultImage
}
},
backPage
()
{
uni
.
navigateBack
({
delta
:
1
...
...
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