Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
60bc3998
Great Teamwork
项目概览
_milo
/
Great Teamwork
通知
13
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Great Teamwork
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
60bc3998
编写于
5月 22, 2023
作者:
赵十四
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加图片左右滑动手势操作
上级
14443cb0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
21 deletion
+19
-21
teamwork/pages/post/post-detail.vue
teamwork/pages/post/post-detail.vue
+6
-8
teamwork/pages/post/post.vue
teamwork/pages/post/post.vue
+13
-13
未找到文件。
teamwork/pages/post/post-detail.vue
浏览文件 @
60bc3998
...
...
@@ -17,8 +17,8 @@
<text
class=
"text-content"
>
{{
postDetail
.
content
}}
</text>
<view
class=
"img-conetent"
>
<!-- 多张图片 -->
<view
class=
"one-img"
v-for=
"
img in postDetail
.pictureList"
>
<view
class=
"post-pic"
@
click.stop=
"showPic(img)"
<view
class=
"one-img"
v-for=
"
(img,imgIndex) in item
.pictureList"
>
<view
class=
"post-pic"
@
click.stop=
"showPic(img
Index,item.pictureList
)"
:style=
"'background: url('+img+') no-repeat center/cover #eeeeee;'"
></view>
</view>
...
...
@@ -209,13 +209,11 @@
})
},
// 图片放大
showPic
(
imgUrl
)
{
let
arr
=
[];
arr
.
push
(
imgUrl
)
console
.
log
(
arr
,
'
图片的地址
'
)
showPic
(
index
,
list
)
{
uni
.
previewImage
({
current
:
0
,
urls
:
arr
current
:
index
,
urls
:
list
});
},
//点赞状态改变
...
...
teamwork/pages/post/post.vue
浏览文件 @
60bc3998
...
...
@@ -26,13 +26,13 @@
<text
class=
"text-content"
>
{{
item
.
content
}}
</text>
<view
class=
"img-conetent"
>
<!-- 多张图片 -->
<view
v-if=
"item.pictureList.length!=1"
class=
"one-img"
v-for=
"
img
in item.pictureList"
>
<view
class=
"post-pic"
@
click.stop=
"showPic(img)"
<view
v-if=
"item.pictureList.length!=1"
class=
"one-img"
v-for=
"
(img,imgIndex)
in item.pictureList"
>
<view
class=
"post-pic"
@
click.stop=
"showPic(img
Index,item.pictureList
)"
:style=
"'background: url('+img+') no-repeat center/cover #eeeeee;'"
></view>
</view>
<!-- 单张图片 -->
<view
v-if=
"item.pictureList.length == 1"
class=
"single-pic"
@
click.stop=
"showPic(
item.pictureList[0]
)"
@
click.stop=
"showPic(
0,item.pictureList
)"
:style=
"'background: url('+item.pictureList[0]+') no-repeat center/cover #eeeeee;'"
>
</view>
</view>
...
...
@@ -68,13 +68,13 @@
<text
class=
"text-content"
>
{{
item
.
content
}}
</text>
<view
class=
"img-conetent"
>
<!-- 多张图片 -->
<view
v-if=
"item.pictureList.length!=1"
class=
"one-img"
v-for=
"
img
in item.pictureList"
>
<view
class=
"post-pic"
@
click.stop=
"showPic(img)"
<view
v-if=
"item.pictureList.length!=1"
class=
"one-img"
v-for=
"
(img,imgIndex)
in item.pictureList"
>
<view
class=
"post-pic"
@
click.stop=
"showPic(img
Index,item.pictureList
)"
:style=
"'background: url('+img+') no-repeat center/cover #eeeeee;'"
></view>
</view>
<!-- 单张图片 -->
<view
v-if=
"item.pictureList.length == 1"
class=
"single-pic"
@
click.stop=
"showPic(
item.pictureList[0]
)"
@
click.stop=
"showPic(
0,item.pictureList
)"
:style=
"'background: url('+item.pictureList[0]+') no-repeat center/cover #eeeeee;'"
>
</view>
</view>
...
...
@@ -101,6 +101,7 @@
<
script
>
export
default
{
//下拉刷新
onPullDownRefresh
()
{
this
.
getAllPost
();
this
.
getMyPost
();
...
...
@@ -182,15 +183,14 @@
});
},
// 图片放大
showPic
(
imgUrl
)
{
let
arr
=
[];
arr
.
push
(
imgUrl
)
console
.
log
(
arr
,
'
图片的地址
'
)
showPic
(
index
,
list
)
{
uni
.
previewImage
({
current
:
0
,
urls
:
arr
current
:
index
,
urls
:
list
});
},
//点赞状态改变
changeAllPostLike
(
index
)
{
if
(
this
.
btnDisabled
)
{
...
...
@@ -233,7 +233,7 @@
});
}
},
//点赞状态改变
//点赞状态改变
(我的帖子部分)
changeMyPostLike
(
index
)
{
if
(
this
.
btnDisabled
)
{
return
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录