This commit is contained in:
yanran200730
2023-03-17 17:51:10 +08:00
parent 5698bfb695
commit b718727544
4 changed files with 128 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="Detail" v-if="isShow">
<div class="Detail" v-if="pageShow">
<div class="top">
<div class="item-top">
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
@@ -17,7 +17,7 @@
</div>
<p>{{ info.createTime }}</p>
<div class="item-bottom">
<div>
<div @click="isShow = true">
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
<i>{{ info.sharedCount }}</i>
</div>
@@ -43,7 +43,7 @@
<span>{{ item.createTime }}</span>
<div hover-class="text-hover" @click="commentId = item.id, replyName = item.createUserName, focus = true">回复</div>
</div>
<div class="replay-list">
<div class="replay-list" v-if="item.replyList.length">
<div class="replay-item" v-for="replay in item.replyList" :key="replay.id">
<image :src="replay.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
<div class="replay-item__right">
@@ -68,9 +68,32 @@
<input :placeholder="commentId ? '回复' + replyName : '请输入'" :focus="focus" v-model="content">
<div hover-class="hover-class" @click="send">发送</div>
</div>
<u-popup v-model="isShow" mode="bottom" hidden height="350rpx" border-radius="30">
<div class="popup">
<div class="popup-title">
<h2>请选择</h2>
<image @click="isShow = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png" />
</div>
<div class="popup-list">
<button open-type="share">
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-wechat.png" />
<span>微信</span>
</button>
<button>
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pyq.png" />
<span>朋友圈</span>
</button>
<button>
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-link.png" />
<span>复制链接</span>
</button>
</div>
</div>
</u-popup>
<AiLogin ref="login"/>
</div>
</template>
<script>
export default {
name: 'Detail',
@@ -89,6 +112,7 @@
current: 1,
content: '',
focus: false,
pageShow: false,
commentId: '',
replyName: ''
}
@@ -111,7 +135,7 @@
if (res.code === 0) {
this.info = res.data
this.isShow = true
this.pageShow = true
}
uni.hideLoading()
@@ -208,7 +232,21 @@
onReachBottom () {
this.getCommontList()
}
},
onShareTimeline () {
return {
title: this.title,
path: `/pages/AppCircle/Detail?id=${this.id}`
}
},
onShareAppMessage () {
return {
title: this.title,
path: `/pages/AppCircle/Detail?id=${this.id}`
}
},
}
</script>
@@ -221,6 +259,58 @@
box-sizing: border-box;
}
.popup {
height: 700px;
border-radius: 20px 20px 0 0;
.popup-title {
position: relative;
height: 98px;
line-height: 98px;
text-align: center;
image {
position: absolute;
right: 40px;
top: 50%;
z-index: 1;
width: 32px;
height: 32px;
transform: translateY(-50%);
}
h2 {
color: #333333;
font-size: 34px;
font-weight: 600;
}
}
.popup-list {
display: flex;
align-items: center;
margin-top: 30px;
button {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
flex-direction: column;
image {
width: 94px;
height: 94px;
margin-bottom: 8px;
}
span {
font-size: 26px;
color: #1D2229;
}
}
}
}
.footer {
display: flex;
align-items: center;