update 反馈修改

This commit is contained in:
zengBin 2024-10-21 17:52:43 +08:00
parent 4f32673322
commit e5262370df
6 changed files with 169 additions and 28 deletions

View File

@ -13,6 +13,12 @@
z-index: 2222;
}
.ui-triangle-icon{
width: 8rpx;
height: 16rpx;
margin-left: 10rpx;
}
.ui-no-data{
text-align: center;
padding-top: 200rpx;
@ -76,14 +82,6 @@
display: block;
}
.referencesIcon {
width: 124rpx;
height: 36rpx;
display: block;
margin-left: 16rpx;
margin-top: 2rpx;
}
.ui-content{
word-break: break-all;
}
@ -204,10 +202,55 @@
border-radius: 12rpx;
}
}
.dialogs {
width: 100%;
z-index: 1111;
max-height: 670rpx;
background: #FFFFFF;
position: relative;
border-radius: 24rpx 24rpx 0rpx 0rpx!important;
.cancelIcon{
width: 28rpx;
height: 28rpx;
position: absolute;
right: 30rpx;
top: 30rpx;
}
.ui-container{
height: 600rpx;
padding: 30rpx 30rpx 100rpx 30rpx;
overflow-x: hidden;
overflow-y: scroll;
.ui-like-member-pic{
width: 70rpx;
height: 70rpx;
border-radius: 50%;
display: block;
}
.ui-references-icon{
width: 124rpx;
height: 36rpx;
display: block;
margin-left: 16rpx;
margin-top: 2rpx;
}
}
}
</style>
<template>
<view class="~ui-pl-30 ~ui-pr-30 ~ui-pt-20">
<view class="~font_32 ~color333">评论 · {{ list.length || 0 }}</view>
<view class="~f-fbc">
<view class="~font_32 ~color333">评论 · {{ list.length || 0 }}</view>
<view class="~f-fcr ~font_26" @tap="getLikes" v-if="detail.liker_count > 0 && userInfo.id == detail.user_id">
{{detail.liker_count}}人赞过
<image class="ui-triangle-icon ~ui-ml-14" src="https://images.ufutx.com/202102/05/db0c6dd88d9b624f52bee0ed1892d913.png" mode="widthFix"></image>
</view>
</view>
<view class="operation_mask" v-if="showOperation" @tap="hiddenOperation"></view>
<view v-if="list && list.length == 0" class="ui-no-data">
<view class="color333">还没有人<span @tap="handlsInput" class="~color-theme">评论</span>,快来抢沙发吧</view>
@ -235,7 +278,6 @@
<view class="ui-name">{{ item.nickname || '未设置名称' }}</view>
<image v-if="item.sex == 1" class="ui-sex-icon ~ui-ml-10" src="https://images.ufutx.com/202103/23/3e7ac93e7bff26a9b62fe3232c776a96.png" lazy-load="false"></image>
<image v-else class="ui-sex-icon ~ui-ml-10" src="https://images.ufutx.com/202103/23/4fd7a85e7073152fde91190b8957910e.png" lazy-load="false"></image>
<!-- <image class="referencesIcon" src="https://image.fulllinkai.com/202207/19/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix" v-if="item.user.type != 'single'"></image>-->
</view>
<view class="~color999 ~font_24 ~f-fb ~ui-pt-4">{{ item.created_at }}</view>
<view class="~color333 ~font_30 ui-content">
@ -272,6 +314,21 @@
</view>
</view>
</view>
<view class="~cu-modal ~bottom-modal {{ modalName == 'viewLike' ? '~show' : ''}}">
<view class="~cu-dialog dialogs">
<view class="~font_32 ~bold ~text-center ~ui-pt-36">赞过的人</view>
<image class="cancelIcon" src="https://images.ufutx.com/202106/01/e536a423a145ae12ab4f6dc57f58588d.png" mode="widthFix" @tap="modalName = ''"></image>
<view class="ui-container">
<block v-for="(item,index) in likesMember" :key="index">
<view class="~f-fcl ~ui-mb-26">
<image class="ui-like-member-pic" :src="item.photo" mode="aspectFill" @tap.stop="jumpPath(`/pages/home/information?id=${item.id}`)"></image>
<view class="~font_28 ~color333 ~ui-pl-16">{{item.nickname}}</view>
<image class="ui-references-icon" src="https://image.fulllinkai.com/202207/15/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix" v-if="item.type != 'single'"></image>
</view>
</block>
</view>
</view>
</view>
</template>
<script>
import wepy from '@wepy/core'
@ -300,11 +357,13 @@
showOperation: false,
defaultAvatar: 'https://images.ufutx.com/202007/01/e0de60525143427d4dd19515a5b387ba.png',
gifurl: 'https://images.ufutx.com/202106/11/d40b92e053a693f30eb197bf6374af95.gif',
likesMember: [],
name: '',
replyId: 0,
inputVal: '',
showReplyView: true,
inputBoxH: 86
inputBoxH: 86,
modalName: ''
},
mixins: [https, base],
methods: {
@ -346,6 +405,25 @@
})
}
},
// 点赞列表
getLikes() {
let vm = this
if (vm.likesMember && vm.likesMember.length == 0) {
vm.$get({url: `${service.host}/moment/${vm.detail.id}/like/list`}).then(({code, data}) => {
if (code == 0) {
vm.likesMember = data
vm.modalName = 'viewLike'
}
wx.hideLoading()
vm.throttle = true
}).catch(() => {
vm.throttle = true
wx.hideLoading()
})
} else {
vm.modalName = 'viewLike'
}
},
// 评论点赞
commentLiker(e, index) {
let vm = this
@ -427,6 +505,9 @@
wx.navigateTo({url: url})
}
},
created() {}
created() {
let vm = this
vm.userInfo = wx.getStorageSync('userInfo')
}
})
</script>

View File

@ -270,8 +270,8 @@ scroll-view {
{{ item.commenter_count }}
</view>
<view class="ui-like-icon-box ~ui-mr-40" @tap.stop="upvote(item ,index)">
<image v-if="item.is_like == false" lazy-load="true" class="ui-like-icon-v2" src="https://images.ufutx.com/202106/10/a97c7c76f3aaf7065e7f7a5fe2abc081.png"></image>
<image v-else class="ui-img2_gif" src="{{item.is_like ? gifurl : 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'}}"></image>
<image v-if="!item.is_like" class="ui-like-icon-v2" src="https://images.ufutx.com/202106/10/a97c7c76f3aaf7065e7f7a5fe2abc081.png"></image>
<image v-else class="ui-img2_gif" :src="item.likeGif"></image>
{{ item.liker_count }}
</view>
<view class="~ui-pl-20 ~ui-pr-20" style="margin-right: -16rpx" @tap.stop="changeOperation(item, index)">
@ -350,15 +350,10 @@ scroll-view {
vm.$emit('signInVerify')
return
}
let nowTime = new Date()
vm.$post({url: `${service.host}/moment/${e.id}/like`}).then(({code}) => {
wx.hideLoading()
if (code == 0) {
vm.list[index].is_like = !vm.list[index].is_like
vm.list[index].liker_count = vm.list[index].liker_count + (vm.list[index].is_like ? 1 : -1)
if (vm.list[index].is_like) {
vm.gifurl = `${vm.gifurl}?${nowTime}`
}
vm.$emit('changListLiker', index)
}
}).catch(() => {
wx.hideLoading()

View File

@ -7,7 +7,7 @@ page {
<template>
<view class="ui-dynamicDetail"></view>
<!--动态信息-->
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" :from="'dynamicDetail'"></dynamicList>
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" @changListLiker="changListLiker" :from="'dynamicDetail'"></dynamicList>
<!--动态操作功能selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件-->
<dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'home'" @hideModal="hideModal" @changeOperation="changeOperation"></dynamicOperation>
<!--评论数据-->
@ -50,9 +50,10 @@ wepy.page({
if (result.topic) {
result.mt_name = result.topic.name
}
result.likeGif = 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'
result.create_time = commentTimeHandle(result.create_time)
vm.detail = result
vm.dynamicList = [result]
vm.dynamicList = JSON.parse(JSON.stringify([result]))
}
wx.hideLoading()
}).catch(err => {
@ -73,7 +74,6 @@ wepy.page({
item.likeGif = 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'
})
vm.list = data
console.log(vm.list, '////')
}
}
wx.hideLoading()
@ -82,6 +82,14 @@ wepy.page({
console.log(err)
})
},
// 列表和详情点赞回调
changListLiker (index) {
let vm = this
let nowTime = new Date()
vm.dynamicList[index].is_like = !vm.dynamicList[index].is_like
vm.dynamicList[index].liker_count = vm.dynamicList[index].liker_count + (vm.dynamicList[index].is_like ? 1 : -1)
vm.dynamicList[index].likeGif = `${vm.dynamicList[index].likeGif}?${nowTime}`
},
// 评论点赞回调
changLiker(index) {
let vm = this

View File

@ -86,6 +86,27 @@ page {
position: relative;
z-index: 22;
}
.ui-suspend-box{
position: fixed;
right: 44rpx;
bottom: 360rpx;
text-align: center;
z-index: 1000;
.ui-suspend-icon {
height: 124rpx;
width: 124rpx;
display: block;
}
.ui-bookDetail-icon{
height: 120rpx;
width: 120rpx;
display: block;
margin-bottom: 12rpx;
}
}
</style>
<template>
<view class="cu-custom">
@ -113,6 +134,10 @@ page {
</view>
</scroll-view>
</view>
<view class="ui-suspend-box">
<image v-if="rulesPic" class="ui-bookDetail-icon" :src="rulesPic" mode="widthFix" @tap="jumpPath(rulesUrl, 'bookDetail')"></image>
<image class="ui-suspend-icon" src="https://images.ufutx.com/202101/26/7d9fbf93eedee6a87bc810a02add5bd2.png" mode="widthFix" @tap="jumpPath(`/pages/dynamic/issue?id=${detail.id}&title=${detail.name}&from=hotTopic`, 'issue')"></image>
</view>
<!--动态操作功能selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件-->
<dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'hotTopic'" @hideModal="hideModal" @changeOperation="changeOperation"></dynamicOperation>
<pageScroll ref="pageScroll" @BackTop="BackTop"></pageScroll>
@ -135,11 +160,13 @@ wepy.page({
admin: '1',
routerNum: 0, // 是否存在上一个页面路由
detail: {}, // 话题详情数据
rulesUrl: '',
rulesPic: '',
dynamicList: [], // 动态列表数据
selectData: {},
selectIndex: null,
scrollTopHandle: -1,
scrollTopHandle: 0,
showBackTopBtn: false,
triggered: false,
no_more: false,
@ -159,6 +186,10 @@ wepy.page({
vm.$get({url: `${service.host}/moment/topic/${vm.id}`}).then(({code, data}) => {
if (code === 0) {
vm.detail = data
if (data.moment_topics_activities) {
vm.rulesUrl = data.moment_topics_activities.goto_url
vm.rulesPic = data.moment_topics_activities.entrance_picture
}
vm.$nextTick(() => {
if (vm.detail.info) {
const query = wx.createSelectorQuery()
@ -279,6 +310,13 @@ wepy.page({
},
handleBack() {
wx.navigateBack({delta: 1})
},
jumpPath(url, type) {
if (type == 'issue') {
wx.navigateTo({url: url})
} else {
wx.navigateTo({url: '/pages/books/bookDetail?url=' + encodeURIComponent(url)})
}
}
},
// 上拉获取更多数据

View File

@ -327,6 +327,7 @@ wepy.page({
mixins: [https, base],
data: {
from: '', // 从哪个页面进入
id: 0,
title: '',
hot: 0,
@ -364,7 +365,9 @@ wepy.page({
// 发布成功后返回列表并且切换到最新tab
const pages = getCurrentPages()
const prevPage = pages[pages.length - 2]
prevPage.$wepy.dynamicTabsIndex = 1
if (vm.from == 'dynamic') {
prevPage.$wepy.dynamicTabsIndex = 1
}
prevPage.$wepy.page = 1
prevPage.$wepy.scrollTopHandle = -1
prevPage.$wepy.getList()
@ -498,7 +501,14 @@ wepy.page({
}
},
onShow() {},
onLoad() {}
onLoad(e) {
let vm = this
vm.from = e.from
if (e.title) {
vm.title = e.title
vm.id = e.id
}
}
})
</script>
<config>

View File

@ -194,13 +194,13 @@ page {
{{ item }}
</view>
</view>
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" @signInVerify="signInVerify" :from="'dynamic'"></dynamicList>
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" @signInVerify="signInVerify" @changListLiker="changListLiker" :from="'dynamic'"></dynamicList>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
<image lazy-load="true" class="ui-suspend" src="https://image.fulllinkai.com/202207/01/df8e2ac2ab24eeec52e9914bbab7cdb7.png" mode="widthFix" @tap="jumpPath('/pages/dynamic/issue')"></image>
<image lazy-load="true" class="ui-suspend" src="https://image.fulllinkai.com/202207/01/df8e2ac2ab24eeec52e9914bbab7cdb7.png" mode="widthFix" @tap="jumpPath('/pages/dynamic/issue?from=dynamic')"></image>
<view class="m_returnTop {{ showBackTopBtn ? 'show' : 'hide'}}">
<image class="u_returnTop_img" @tap.stop="BackTop" src="https://images.ufutx.com/202106/23/f0d10551dc5d3399cc7f15805cf04f4f.png" mode="scaleToFill" lazy-load="false"></image>
</view>
@ -262,6 +262,7 @@ wepy.page({
if (data.data && data.data.length > 0) {
data.data.forEach((item, index) => {
item.create_time = commentTimeHandle(item.create_time)
item.likeGif = 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'
let sty = typeof (item.photos)
if (sty == 'string') {
item.photos = JSON.parse(item.photos)
@ -305,6 +306,14 @@ wepy.page({
console.log(err)
})
},
// 列表和详情点赞回调
changListLiker (index) {
let vm = this
let nowTime = new Date()
vm.dynamicList[index].is_like = !vm.dynamicList[index].is_like
vm.dynamicList[index].liker_count = vm.dynamicList[index].liker_count + (vm.dynamicList[index].is_like ? 1 : -1)
vm.dynamicList[index].likeGif = `${vm.dynamicList[index].likeGif}?${nowTime}`
},
// 选择某条动态操作弹框
changeSelect(e, index) {
let vm = this