wangfukang 1 day ago
parent
commit
6f499720e7
  1. 2
      package1/campus/campusRelease.vue
  2. 457
      package1/campus/myCampusPosts.vue
  3. 4
      package1/order/orderDetail.vue
  4. 47
      package1/order/returnOrder.vue
  5. 13
      package1/post/postDetail.vue

2
package1/campus/campusRelease.vue

@ -461,7 +461,7 @@
.form-audit { position: relative; z-index: 1; margin: 18rpx 30rpx 0; } .form-audit { position: relative; z-index: 1; margin: 18rpx 30rpx 0; }
.mini-spinner { width: 26rpx; height: 26rpx; flex: 0 0 26rpx; border-radius: 50%; border: 4rpx solid #c9f2e8; border-top-color: #2fc49f; animation: spin .8s linear infinite; } .mini-spinner { width: 26rpx; height: 26rpx; flex: 0 0 26rpx; border-radius: 50%; border: 4rpx solid #c9f2e8; border-top-color: #2fc49f; animation: spin .8s linear infinite; }
.safe-tip { position: relative; z-index: 1; margin: 24rpx 30rpx; padding: 18rpx 22rpx; border-radius: 22rpx; background: rgba(235, 250, 246, .86); color: #6f837d; font-size: 23rpx; line-height: 1.6; } .safe-tip { position: relative; z-index: 1; margin: 24rpx 30rpx; padding: 18rpx 22rpx; border-radius: 22rpx; background: rgba(235, 250, 246, .86); color: #6f837d; font-size: 23rpx; line-height: 1.6; }
.bottom-space { height: 240rpx; } .bottom-space { height: 160rpx; }
.submit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 20rpx 28rpx 34rpx; background: rgba(255,255,255,.98); box-shadow: 0 -8rpx 28rpx rgba(31, 67, 59, .08); } .submit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 20rpx 28rpx 34rpx; background: rgba(255,255,255,.98); box-shadow: 0 -8rpx 28rpx rgba(31, 67, 59, .08); }
.submit-btn { height: 92rpx; line-height: 92rpx; text-align: center; border-radius: 999rpx; background: linear-gradient(135deg, #34d8ad, #25c6c5); color: #fff; font-size: 30rpx; font-weight: 900; box-shadow: 0 14rpx 30rpx rgba(38, 196, 169, .28); } .submit-btn { height: 92rpx; line-height: 92rpx; text-align: center; border-radius: 999rpx; background: linear-gradient(135deg, #34d8ad, #25c6c5); color: #fff; font-size: 30rpx; font-weight: 900; box-shadow: 0 14rpx 30rpx rgba(38, 196, 169, .28); }
.submit-btn.disabled { opacity: .65; } .submit-btn.disabled { opacity: .65; }

457
package1/campus/myCampusPosts.vue

@ -0,0 +1,457 @@
<template>
<view class="my-campus-page">
<view class="header" :style="{ paddingTop: statusBarTop + 'px' }">
<view class="back" @tap="back"><uni-icons type="left" size="22" color="#173b32"></uni-icons></view>
<view class="title">我的圈子</view>
<view class="tabs">
<view
class="tab"
:class="{ active: activeTab === item.key }"
v-for="item in tabs"
:key="item.key"
@tap="switchTab(item.key)"
>
<text>{{item.name}}</text>
<view class="tab-badge" v-if="item.key === 'messages' && commentUnread > 0">{{formatBadgeCount(commentUnread)}}</view>
</view>
</view>
</view>
<view class="search-bar">
<uni-icons type="search" size="18" color="#8d9693"></uni-icons>
<input
v-model.trim="keyword"
class="search-input"
confirm-type="search"
:placeholder="searchPlaceholder"
@confirm="handleSearch"
/>
<view class="search-clear" v-if="keyword" @tap="clearSearch">清空</view>
<view class="search-btn" @tap="handleSearch">搜索</view>
</view>
<view class="swipe-tip" v-if="activeTab === 'posts'">
<uni-icons type="info" size="15" color="#24b979"></uni-icons>
<text>左滑卡片可编辑上下架或删除</text>
</view>
<view class="swipe-tip" v-else-if="activeTab === 'messages'">
<uni-icons type="info" size="15" color="#24b979"></uni-icons>
<text>有人评论我的发布会显示角标点开详情后自动已读</text>
</view>
<scroll-view scroll-y class="list" :class="{ 'list--with-tip': activeTab !== 'comments' }" @scrolltolower="loadMore">
<u-swipe-action v-if="activeTab === 'posts'">
<u-swipe-action-item
v-for="(item,index) in list"
:key="item.id"
:name="index"
:options="swipeOptions(item)"
@click="handleSwipeAction"
>
<view class="card" @tap="openPost(item)">
<image class="cover" :src="coverText(item)" mode="aspectFill"></image>
<view class="main">
<view class="name">{{item.title || '校园圈发布'}}</view>
<view class="desc">{{descText(item)}}</view>
<view class="meta">
<text>{{typeText(item)}}</text>
<text v-if="item.categoryName">{{item.categoryName}}</text>
<text>{{item.createTime || ''}}</text>
</view>
</view>
<view class="status" :class="{ 'status--off': isOffShelf(item) }">{{statusText(item)}}</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
<block v-else-if="activeTab === 'messages'">
<view class="card message-card" v-for="item in list" :key="item.id" @tap="openMessagePost(item)">
<image class="cover" :src="coverText(item)" mode="aspectFill"></image>
<view class="main">
<view class="name-row">
<view class="name">{{item.title || '校园圈发布'}}</view>
<view class="card-badge" v-if="unreadCount(item) > 0">{{formatBadgeCount(unreadCount(item))}}</view>
</view>
<view class="desc">{{messageDesc(item)}}</view>
<view class="meta">
<text>{{typeText(item)}}</text>
<text>{{item.commentCount || 0}} 条评论</text>
<text>{{item.lastActiveTime || item.createTime || ''}}</text>
</view>
</view>
<view class="status status--action">查看</view>
</view>
</block>
<block v-else>
<view class="card" v-for="item in list" :key="item.id" @tap="openComment(item)">
<image class="cover" :src="commentCoverText(item)" mode="aspectFill"></image>
<view class="main">
<view class="name">{{item.displayTitle || '校园圈发布'}}</view>
<view class="desc">{{commentDesc(item)}}</view>
<view class="meta">
<text>我的评论</text>
<text>{{item.createTime || ''}}</text>
</view>
</view>
<view class="status status--danger" @tap.stop="deleteCommentItem(item)">删除</view>
</view>
</block>
<view class="empty" v-if="!list.length && !loading">{{emptyText}}</view>
<view class="load-more">{{loading ? '加载中...' : (hasMore ? '上滑加载更多' : (list.length ? '已经到底了' : ''))}}</view>
<view class="bottom-space"></view>
</scroll-view>
</view>
</template>
<script>
import {
pageMyCampusPosts,
pageMyCampusComments,
updateMyCampusPostStatus,
getCampusUnreadSummary,
deleteCampusComment
} from '@/common/campusApi.js'
export default {
data() {
return {
statusBarTop: 24,
activeTab: 'posts',
keyword: '',
list: [],
pageNum: 1,
pageSize: 10,
totalPages: 1,
loading: false,
loadedOnce: false,
chatUnread: 0,
commentUnread: 0,
defaultCover: '/static/images/img/songshu.png',
tabs: [
{ key: 'posts', name: '我的发布' },
{ key: 'messages', name: '我的消息' },
{ key: 'comments', name: '我的评论' }
]
}
},
computed: {
hasMore() {
return this.pageNum < this.totalPages
},
searchPlaceholder() {
if (this.activeTab === 'comments') return '按评论内容搜索'
return '按标题或内容搜索'
},
emptyText() {
if (this.activeTab === 'messages') return '暂无评论消息'
if (this.activeTab === 'comments') return '暂无我的评论'
return '暂无发布内容'
}
},
onLoad(options = {}) {
if (options.tab && this.tabs.some(item => item.key === options.tab)) this.activeTab = options.tab
if (uni.getMenuButtonBoundingClientRect) {
this.statusBarTop = uni.getMenuButtonBoundingClientRect().top || this.statusBarTop
}
this.load()
},
onShow() {
if (this.loadedOnce) this.reload()
},
methods: {
back() {
uni.navigateBack()
},
getArea() {
const area = uni.getStorageSync('area')
if (!area) return {}
if (typeof area === 'string') {
try { return JSON.parse(area) } catch (e) { return {} }
}
return area
},
switchTab(key) {
if (this.activeTab === key) return
this.activeTab = key
this.keyword = ''
this.reload()
},
swipeOptions(item) {
const offShelf = this.isOffShelf(item)
return [{
text: '编辑',
style: {
backgroundColor: '#24b979',
color: '#fff',
fontSize: '26rpx'
}
}, {
text: offShelf ? '上架' : '下架',
style: {
backgroundColor: offShelf ? '#2f8cff' : '#ff9f2d',
color: '#fff',
fontSize: '26rpx'
}
}, {
text: '删除',
style: {
backgroundColor: '#ef4c3f',
color: '#fff',
fontSize: '26rpx'
}
}]
},
handleSwipeAction(e) {
const item = this.list[Number(e.name)]
if (!item) return
if (e.index == 0) {
this.editItem(item)
return
}
if (e.index == 1) {
this.toggleShelf(item)
return
}
this.deleteItem(item)
},
handleSearch() {
uni.hideKeyboard()
this.reload()
},
clearSearch() {
this.keyword = ''
this.reload()
},
reload() {
this.pageNum = 1
this.totalPages = 1
this.list = []
this.load()
},
loadMore() {
if (this.loading || !this.hasMore) return
this.pageNum += 1
this.load()
},
load() {
if (this.loading) return
this.loading = true
this.loadUnreadSummary()
const area = this.getArea()
const query = {
pageNum: this.pageNum,
pageSize: this.pageSize,
regionId: area.id || '',
keyword: this.keyword,
sortType: 'latest'
}
const request = this.activeTab === 'comments' ? pageMyCampusComments(query) : pageMyCampusPosts(query)
request.then(page => {
const records = page && (page.records || page.content) ? (page.records || page.content) : []
this.totalPages = Number(page && (page.pages || page.totalPages)) || 1
const normalized = this.activeTab === 'messages' ? this.sortMessages(records) : records
this.list = this.pageNum === 1 ? normalized : this.list.concat(normalized)
}).finally(() => {
this.loading = false
this.loadedOnce = true
})
},
loadUnreadSummary() {
getCampusUnreadSummary().then(summary => {
this.chatUnread = 0
this.commentUnread = Number(summary && summary.campusCommentUnread) || 0
uni.$emit('campusUnreadChange', {
...summary,
campusChatUnread: 0,
myCircleUnread: this.commentUnread,
campusUnread: this.commentUnread
})
}).catch(() => {})
},
sortMessages(records) {
return (Array.isArray(records) ? records : []).slice().sort((a, b) => {
const unreadDiff = this.unreadCount(b) - this.unreadCount(a)
if (unreadDiff) return unreadDiff
return String(b.lastActiveTime || b.createTime || '').localeCompare(String(a.lastActiveTime || a.createTime || ''))
})
},
openPost(item) {
if (!item || !item.id) return
uni.navigateTo({ url: '/package1/post/postDetail?id=' + item.id + '&source=campus' })
},
openMessagePost(item) {
if (!item || !item.id) return
const count = this.unreadCount(item)
uni.navigateTo({
url: '/package1/post/postDetail?id=' + item.id + '&source=campus',
success: () => {
if (count <= 0) return
this.$set(item, 'unreadCommentCount', 0)
this.commentUnread = Math.max(0, this.commentUnread - count)
uni.$emit('campusUnreadChange', {
campusChatUnread: 0,
campusCommentUnread: this.commentUnread,
myCircleUnread: this.commentUnread,
campusUnread: this.commentUnread
})
}
})
},
openComment(item) {
const postId = item && item.postId
if (!postId) return
uni.navigateTo({ url: '/package1/post/postDetail?id=' + postId + '&source=campus' })
},
editItem(item) {
if (!item || !item.id) return
const type = item.postType === 'partner' ? (item.partnerType || 'daily') : 'wall'
uni.navigateTo({ url: `/package1/campus/campusRelease?mode=edit&type=${type}&id=${item.id}` })
},
isOffShelf(item) {
return Number(item.status) === 2 || Number(item.offShelf) === 1
},
toggleShelf(item) {
const nextStatus = this.isOffShelf(item) ? 1 : 2
this.updateItemStatus(item, nextStatus)
},
deleteItem(item) {
uni.showModal({
title: '删除确认',
content: '删除后不可恢复,确定删除这条发布吗?',
confirmText: '删除',
confirmColor: '#ef4c3f',
success: (res) => {
if (!res.confirm) return
this.updateItemStatus(item, 3)
}
})
},
deleteCommentItem(item) {
if (!item || !item.id) return
uni.showModal({
title: '删除评论',
content: '确定删除这条评论吗?',
confirmText: '删除',
confirmColor: '#ef4c3f',
success: (res) => {
if (!res.confirm) return
deleteCampusComment(item.id).then(() => {
uni.showToast({ title: '已删除', icon: 'none' })
this.reload()
})
}
})
},
updateItemStatus(item, status) {
return updateMyCampusPostStatus({
postId: item.id,
status
}).then(() => {
uni.showToast({ title: status === 3 ? '已删除' : (status === 2 ? '已下架' : '已上架'), icon: 'none' })
uni.$emit('campusPostPublished')
this.reload()
})
},
statusText(item) {
if (Number(item.status) === 2) return '已下架'
if (Number(item.status) === 3) return '已删除'
if (Number(item.auditStatus) === 2) return '未通过'
if (Number(item.auditStatus) === 0) return '审核中'
return '展示中'
},
unreadCount(item) {
return Number(item && (item.unreadCommentCount || item.unreadCount)) || 0
},
messageDesc(item) {
const count = this.unreadCount(item)
if (count > 0) return count + ' 条新评论,点击查看并标记已读'
return '暂无新评论,点击查看评论区'
},
typeText(item) {
if (item.postType === 'wall') return '校园圈'
const map = { game: '游戏搭子', daily: '日常搭子', sport: '运动搭子' }
return map[item.partnerType] || '校园搭子'
},
descText(item) {
return this.plainText(item.contentText || item.content || '')
},
commentDesc(item) {
const prefix = item.replyToUserName ? '回复 ' + item.replyToUserName + ':' : ''
return prefix + (item.content || '')
},
coverText(item) {
return this.firstImage(item.imageList)
|| this.firstImage(item.images)
|| item.coverImage
|| this.defaultCover
},
commentCoverText(item) {
return item.displayCover || this.defaultCover
},
firstImage(value) {
if (!value) return ''
if (Array.isArray(value)) return value[0] || ''
try {
const parsed = JSON.parse(value)
return Array.isArray(parsed) ? (parsed[0] || '') : ''
} catch (e) {
return ''
}
},
plainText(value) {
return String(value || '')
.replace(/<img[^>]*>/gi, '[图片]')
.replace(/<[^>]+>/g, '')
.replace(/&nbsp;/g, ' ')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&amp;/g, '&')
.trim()
},
formatBadgeCount(count) {
const value = Number(count) || 0
return value > 99 ? '99+' : value
}
}
}
</script>
<style scoped>
page { background: #f7f9f7; }
.my-campus-page { min-height: 100vh; background: #f7f9f7; color: #17362f; }
.header { padding: 0 26rpx 18rpx; background: linear-gradient(180deg, #e5fbf3, #f7f9f7); box-sizing: border-box; }
.back { width: 68rpx; height: 68rpx; display: flex; align-items: center; }
.title { margin-top: 8rpx; font-size: 40rpx; font-weight: 900; color: #17362f; }
.tabs { margin-top: 20rpx; display: flex; align-items: center; gap: 12rpx; }
.tab { position: relative; flex-shrink: 0; min-width: 132rpx; height: 58rpx; padding: 0 20rpx; display: flex; align-items: center; justify-content: center; border-radius: 30rpx; background: #fff; color: #758782; font-size: 23rpx; box-shadow: 0 8rpx 20rpx rgba(20, 60, 48, 0.045); box-sizing: border-box; }
.tab.active { background: linear-gradient(135deg, #38c897, #19af7e); color: #fff; font-weight: 900; }
.tab-badge, .card-badge { min-width: 30rpx; height: 30rpx; padding: 0 8rpx; border-radius: 18rpx; background: #ff4d5f; color: #fff; font-size: 18rpx; font-weight: 900; line-height: 30rpx; text-align: center; box-sizing: border-box; }
.tab-badge { margin-left: 8rpx; }
.card-badge { margin-left: 8rpx; flex-shrink: 0; }
.search-bar { height: 70rpx; margin: 0 24rpx 16rpx; padding: 0 12rpx 0 22rpx; display: flex; align-items: center; border-radius: 38rpx; background: #fff; box-shadow: 0 8rpx 22rpx rgba(20, 60, 48, 0.045); box-sizing: border-box; }
.search-input { flex: 1; height: 68rpx; margin-left: 10rpx; color: #293632; font-size: 24rpx; line-height: 68rpx; }
.search-clear { padding: 0 12rpx; color: #9aa8a4; font-size: 22rpx; }
.search-btn { width: 86rpx; height: 54rpx; border-radius: 28rpx; background: linear-gradient(135deg, #38c897, #19af7e); color: #fff; font-size: 23rpx; font-weight: 800; line-height: 54rpx; text-align: center; }
.swipe-tip { height: 52rpx; margin: 0 24rpx 16rpx; padding: 0 20rpx; display: flex; align-items: center; border-radius: 26rpx; background: #eafaf3; color: #4f7368; font-size: 22rpx; box-sizing: border-box; }
.swipe-tip text { margin-left: 8rpx; }
.list { height: calc(100vh - 286rpx); }
.list--with-tip { height: calc(100vh - 354rpx); }
.card { position: relative; margin: 18rpx 24rpx 0; padding: 18rpx; display: flex; align-items: center; border-radius: 24rpx; background: #fff; box-shadow: 0 8rpx 22rpx rgba(20, 60, 48, 0.05); }
.message-card { border: 2rpx solid rgba(36, 185, 121, .10); }
.cover { width: 126rpx; height: 126rpx; border-radius: 18rpx; background: #edf3ef; flex-shrink: 0; }
.main { flex: 1; min-width: 0; margin-left: 18rpx; }
.name-row { display: flex; align-items: center; min-width: 0; }
.name { overflow: hidden; font-size: 28rpx; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.name-row .name { flex: 1; }
.desc { margin-top: 8rpx; overflow: hidden; color: #71817c; font-size: 23rpx; text-overflow: ellipsis; white-space: nowrap; }
.meta { margin-top: 8rpx; display: flex; gap: 14rpx; color: #a0aaa6; font-size: 20rpx; }
.meta text:first-child { color: #22a879; font-weight: 900; }
.status { margin-left: 12rpx; color: #22a879; font-size: 22rpx; font-weight: 800; white-space: nowrap; }
.status--off { color: #9aa8a4; }
.status--action { padding: 8rpx 14rpx; border-radius: 18rpx; background: #eafaf3; color: #18a878; font-size: 20rpx; }
.status--danger { padding: 8rpx 14rpx; border-radius: 18rpx; background: #fff2f2; color: #ef4c3f; font-size: 20rpx; }
.empty, .load-more { padding: 70rpx 0; color: #9aa8a4; text-align: center; font-size: 24rpx; }
.bottom-space { height: 120rpx; }
</style>

4
package1/order/orderDetail.vue

@ -718,7 +718,7 @@
<uni-icons type="info" size="14" color="#ff5722"></uni-icons> <uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text <text
v-if="(((payData.orderType == 2 || payData.orderType == 3) && payData.status == 2) || ((payData.orderType == 2 || payData.orderType == 3) && payData.status == 3) || (payData.deliveryType == 1 && payData.status == 3) || payData.status == 4) && payData.otherOrder == null"> v-if="(((payData.orderType == 2 || payData.orderType == 3) && payData.status == 2) || ((payData.orderType == 2 || payData.orderType == 3) && payData.status == 3) || (payData.deliveryType == 1 && payData.status == 3) || payData.status == 4) && payData.otherOrder == null">
请确认责任方取消订单需要责任方同意{{orderDetail.orderType == 3 ? '团员订单会一并退款!' : ''}} 请确认责任方取消订单需要责任方同意{{(orderDetail.orderType == 3 && orderDetail.deliveryType == 1) ? '团员订单会一并退款!' : ''}}
</text> </text>
<text v-else>请选择退款原因</text> <text v-else>请选择退款原因</text>
</view> </view>
@ -813,7 +813,7 @@
<view class="no-responsibility-cancel-popup"> <view class="no-responsibility-cancel-popup">
<view class="no-responsibility-cancel-title">确认取消订单吗</view> <view class="no-responsibility-cancel-title">确认取消订单吗</view>
<view class="no-responsibility-cancel-desc">符合无责取消条件订单金额将按平台退款处理</view> <view class="no-responsibility-cancel-desc">符合无责取消条件订单金额将按平台退款处理</view>
<view class="no-responsibility-cancel-desc" v-if="orderDetail.orderType == 3">团员订单会一并退款</view> <view class="no-responsibility-cancel-desc" v-if="orderDetail.orderType == 3 && orderDetail.deliveryType == 1">团员订单会一并退款</view>
<view class="no-responsibility-cancel-actions"> <view class="no-responsibility-cancel-actions">
<view class="no-responsibility-cancel-btn no-responsibility-cancel-btn-muted" <view class="no-responsibility-cancel-btn no-responsibility-cancel-btn-muted"
@tap="$refs.noResponsibilityCancelPopup.close()"> @tap="$refs.noResponsibilityCancelPopup.close()">

47
package1/order/returnOrder.vue

@ -213,11 +213,8 @@
</view> </view>
<!-- 售后原因弹窗 --> <!-- 售后原因弹窗 -->
<uni-popup ref="carPopup" background-color="#fff" @change="onReasonPopupChange"> <uni-popup ref="carPopup" type="bottom" background-color="#fff" :mask-click="false" @change="onReasonPopupChange">
<view class="car-content reason-popup"> <view class="car-content reason-popup">
<view class="car-close" @tap="$refs.carPopup.close()">
<uni-icons type="close" size="30" color="#fff"></uni-icons>
</view>
<view class="car-title" style="padding: 0 20rpx;"> <view class="car-title" style="padding: 0 20rpx;">
选择售后原因 选择售后原因
</view> </view>
@ -271,7 +268,10 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="btn" @tap="chooseReturnType()">确认</view> <view class="reason-popup-actions">
<view class="reason-popup-btn reason-popup-cancel" @tap="cancelAfterSale">取消售后</view>
<view class="reason-popup-btn reason-popup-confirm" @tap="chooseReturnType()">确认</view>
</view>
</view> </view>
</uni-popup> </uni-popup>
@ -401,6 +401,12 @@
openReasonPopup() { openReasonPopup() {
this.$refs.carPopup.open('bottom'); this.$refs.carPopup.open('bottom');
}, },
cancelAfterSale() {
this.$refs.carPopup.close()
uni.redirectTo({
url: '/package1/order/orderDetail?id=' + this.orderDetail.id
})
},
chooseReturnType() { chooseReturnType() {
if(this.sellTime == 100){ if(this.sellTime == 100){
this.tui.toast("请选择售后责任方"); this.tui.toast("请选择售后责任方");
@ -1228,6 +1234,37 @@
overflow: hidden; overflow: hidden;
} }
.reason-popup-actions {
display: flex;
align-items: center;
gap: 20rpx;
padding: 24rpx 20rpx calc(24rpx + env(safe-area-inset-bottom));
background: #fff;
box-sizing: border-box;
}
.reason-popup-btn {
flex: 1;
height: 88rpx;
line-height: 88rpx;
border-radius: 100rpx;
text-align: center;
font-size: 28rpx;
font-weight: 700;
box-sizing: border-box;
}
.reason-popup-cancel {
background: #fff;
border: 2rpx solid rgba(0, 35, 28, 0.12);
color: #243f38;
}
.reason-popup-confirm {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
color: #00231C;
}
.btn { .btn {
width: 95%; width: 95%;
height: 100rpx; height: 100rpx;

13
package1/post/postDetail.vue

@ -61,9 +61,9 @@
</view> </view>
<view class="comment-actions"> <view class="comment-actions">
<text>{{item.createTime || ''}}</text> <text>{{item.createTime || ''}}</text>
<text @tap="replyComment(item)">回复</text> <text class="comment-action-text" @tap="replyComment(item)">回复</text>
<text @tap="reportComment(item)">举报</text> <text class="comment-action-text" @tap="reportComment(item)">举报</text>
<text v-if="item.userId == currentUserId" @tap="deleteComment(item)">删除</text> <text class="comment-action-text" v-if="item.userId == currentUserId" @tap="deleteComment(item)">删除</text>
</view> </view>
</view> </view>
</view> </view>
@ -143,7 +143,7 @@
commentHasMore() { return this.commentPageNum < this.commentTotalPages }, commentHasMore() { return this.commentPageNum < this.commentTotalPages },
hasContact() { return !!(this.post && (this.post.contactWechat || this.post.contactPhone)) }, hasContact() { return !!(this.post && (this.post.contactWechat || this.post.contactPhone)) },
canUsePartnerChat() { canUsePartnerChat() {
return !!(this.post && this.post.postType === 'partner' && this.post.partnerType !== 'game' && !this.post.mine) return false
} }
}, },
onLoad(options = {}) { onLoad(options = {}) {
@ -406,10 +406,11 @@
.reply-list { margin-top: 12rpx; padding: 14rpx; background: #f7faf9; border-radius: 18rpx; color: #4d625d; font-size: 24rpx; } .reply-list { margin-top: 12rpx; padding: 14rpx; background: #f7faf9; border-radius: 18rpx; color: #4d625d; font-size: 24rpx; }
.reply-item { margin-bottom: 8rpx; } .reply-item { margin-bottom: 8rpx; }
.reply-item text { color: #1b9278; } .reply-item text { color: #1b9278; }
.comment-actions { display: flex; gap: 24rpx; margin-top: 12rpx; color: #8a9994; font-size: 22rpx; } .comment-actions { display: flex; align-items: center; gap: 24rpx; margin-top: 12rpx; color: #8a9994; font-size: 22rpx; }
.comment-action-text { color: #263d38; font-size: 26rpx; font-weight: 900; }
.empty, .load-state { text-align: center; color: #8a9692; padding: 26rpx 0; font-size: 24rpx; } .empty, .load-state { text-align: center; color: #8a9692; padding: 26rpx 0; font-size: 24rpx; }
.bottom-space { height: 160rpx; } .bottom-space { height: 160rpx; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 16rpx 24rpx 32rpx; display: flex; align-items: center; gap: 16rpx; background: rgba(255,255,255,.96); box-shadow: 0 -8rpx 28rpx rgba(31, 67, 59, .08); } .bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 16rpx 24rpx 32rpx; display: flex; align-items: center; justify-content: flex-end; gap: 16rpx; background: rgba(255,255,255,.96); box-shadow: 0 -8rpx 28rpx rgba(31, 67, 59, .08); }
.bar-action { width: 96rpx; display: flex; flex-direction: column; align-items: center; color: #59706a; font-size: 21rpx; } .bar-action { width: 96rpx; display: flex; flex-direction: column; align-items: center; color: #59706a; font-size: 21rpx; }
.chat-btn { flex: 1; height: 82rpx; line-height: 82rpx; text-align: center; border-radius: 999rpx; background: #34c7a2; color: #fff; font-weight: 800; } .chat-btn { flex: 1; height: 82rpx; line-height: 82rpx; text-align: center; border-radius: 999rpx; background: #34c7a2; color: #fff; font-weight: 800; }
.comment-popup { width: 620rpx; padding: 30rpx; border-radius: 30rpx; background: #fff; } .comment-popup { width: 620rpx; padding: 30rpx; border-radius: 30rpx; background: #fff; }

Loading…
Cancel
Save