Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-app
Commits
4ae30353
Commit
4ae30353
authored
Feb 24, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改动态图片显示
parent
db441034
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
26 deletions
+26
-26
imageAdaptation.vue
components/images-adaptation/imageAdaptation.vue
+9
-3
Item.vue
pages/components/article/Item.vue
+3
-14
List.vue
pages/components/article/List.vue
+14
-9
No files found.
components/images-adaptation/imageAdaptation.vue
View file @
4ae30353
...
@@ -32,9 +32,15 @@
...
@@ -32,9 +32,15 @@
imgDisplay
:
'flex'
,
imgDisplay
:
'flex'
,
}
}
},
},
mounted
()
{
watch
:
{
this
.
judgeImg
();
imgList
:
{
},
handler
()
{
this
.
judgeImg
();
},
deep
:
true
,
immediate
:
true
}
},
methods
:
{
methods
:
{
// 预览图片
// 预览图片
previewImg
(
url
,
index
)
{
previewImg
(
url
,
index
)
{
...
...
pages/components/article/Item.vue
View file @
4ae30353
...
@@ -46,10 +46,10 @@
...
@@ -46,10 +46,10 @@
</
template
>
</
template
>
</view>
</view>
<view
class=
"contentImg"
>
<view
class=
"contentImg"
>
<imageAdaptation
:imgList=
"i
mgs
"
:imgLayout1=
"imgLayout1"
:imgLayout2=
"imgLayout2"
<imageAdaptation
:imgList=
"i
nfo.url
"
:imgLayout1=
"imgLayout1"
:imgLayout2=
"imgLayout2"
:imgLayout3=
"imgLayout3"
@
previewImg=
"preview"
></imageAdaptation>
:imgLayout3=
"imgLayout3"
@
previewImg=
"preview"
></imageAdaptation>
<q-previewImage
ref=
"previewImage"
:urls=
"i
mgs
"
@
onLongpress=
"onLongpress"
@
open=
"open"
<q-previewImage
ref=
"previewImage"
:urls=
"i
nfo.url
"
@
onLongpress=
"onLongpress"
@
open=
"open"
@
close=
"close"
></q-previewImage>
@
close=
"close"
></q-previewImage>
</view>
</view>
<view
class=
"time"
>
<view
class=
"time"
>
...
@@ -120,17 +120,6 @@
...
@@ -120,17 +120,6 @@
default
:
()
=>
{}
default
:
()
=>
{}
}
}
},
},
watch
:
{
info
:
{
handler
(
newValue
)
{
if
(
newValue
?.
url
?.
length
)
{
this
.
imgs
=
newValue
.
url
}
},
deep
:
true
,
immediate
:
true
}
},
mounted
()
{
mounted
()
{
if
(
this
.
$refs
.
uReadMore
)
{
if
(
this
.
$refs
.
uReadMore
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -228,7 +217,7 @@
...
@@ -228,7 +217,7 @@
})
{
})
{
uni
.
previewImage
({
uni
.
previewImage
({
current
:
index
,
current
:
index
,
urls
:
this
.
i
mgs
,
urls
:
this
.
i
nfo
.
url
,
longPressActions
:
{
longPressActions
:
{
// itemList: ['发送给朋友', '保存图片', '收藏'],
// itemList: ['发送给朋友', '保存图片', '收藏'],
success
:
function
(
data
)
{
success
:
function
(
data
)
{
...
...
pages/components/article/List.vue
View file @
4ae30353
...
@@ -183,16 +183,20 @@
...
@@ -183,16 +183,20 @@
//处理动态照片
//处理动态照片
if
(
item
.
pictureId
!=
null
){
if
(
item
.
pictureId
!=
null
){
const
urlArray
=
JSON
.
parse
(
item
.
pictureId
)
const
urlArray
=
JSON
.
parse
(
item
.
pictureId
)
let
arr
=
[]
console
.
log
(
'urlArray.id:'
,
urlArray
.
id
)
urlArray
.
id
.
forEach
(
item
=>
{
if
(
urlArray
.
id
.
length
>
0
){
getOssUrl
(
item
).
then
(
imgRes
=>
{
console
.
log
(
'11111111111111'
)
if
(
imgRes
.
data
.
data
!=
null
)
{
let
arr
=
[]
imgRes
.
data
.
data
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
urlArray
.
id
.
forEach
(
item
=>
{
arr
.
push
(
imgRes
.
data
.
data
)
getOssUrl
(
item
).
then
(
imgRes
=>
{
}
if
(
imgRes
.
data
.
data
!=
null
)
{
imgRes
.
data
.
data
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
arr
.
push
(
imgRes
.
data
.
data
)
}
})
})
})
})
item
.
url
=
arr
item
.
url
=
arr
}
}
}
//处理性别
//处理性别
if
(
item
.
memSex
!=
null
&&
item
.
memSex
!==
''
){
if
(
item
.
memSex
!=
null
&&
item
.
memSex
!==
''
){
...
@@ -213,6 +217,7 @@
...
@@ -213,6 +217,7 @@
}
}
})
})
this
.
$refs
.
paging
.
completeByTotal
(
list
,
res
.
data
.
total
);
this
.
$refs
.
paging
.
completeByTotal
(
list
,
res
.
data
.
total
);
console
.
log
(
'22222222'
,
this
.
dataList
)
})
})
// 组件加载时会自动触发此方法,因此默认页面加载时会自动触发,无需手动调用
// 组件加载时会自动触发此方法,因此默认页面加载时会自动触发,无需手动调用
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment