feat(expert): full closure of expert revenue trends, multichannel withdrawals, service manage, review reply and post manage

这个提交包含在:
xcbyy
2026-10-13 09:13:06 +08:00
父节点 a004584109
当前提交 e867488d0d
共有 11 个文件被更改,包括 2565 次插入 和 103 次删除

查看文件

@@ -72,9 +72,18 @@
</view>
</view>
</view>
<button class="join-btn btn-active" @click="handleJoinParty(post)">
{{ post.actionText || '聊一聊' }}
</button>
<view class="author-actions">
<button
v-if="isPostOwner(post)"
class="btn-delete-post btn-active"
@click.stop="handleDeletePost(post)"
>
删除
</button>
<button v-else class="join-btn btn-active" @click="handleJoinParty(post)">
{{ post.actionText || '聊一聊' }}
</button>
</view>
</view>
<!-- 动态文本内容 -->
@@ -305,7 +314,7 @@ import SkeletonScreen from '@/components/SkeletonScreen.vue';
import { ICONS } from '@/common/icons.js';
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
import { getNavBarInfo } from '@/common/nav.js';
import { getPosts, createPost, likePost, getPostComments, addPostComment, applyPostParty, uploadImage, getPlatformConfigs } from '@/common/api.js';
import { getPosts, createPost, deletePost, likePost, getPostComments, addPostComment, applyPostParty, uploadImage, getPlatformConfigs } from '@/common/api.js';
const isLoading = ref(true);
const currentThemeKey = ref(getCurrentThemeKey());
@@ -574,6 +583,35 @@ const sendComment = async () => {
}
};
const isPostOwner = (post) => {
return post && (post.userId === 1001 || post.author === '电竞玩家 (我)' || post.isMine === true);
};
const handleDeletePost = (post) => {
uni.showModal({
title: '删除动态确认',
content: '确定要删除这条动态吗?删除后将无法恢复。',
confirmText: '确定删除',
cancelText: '取消',
confirmColor: '#EF4444',
success: async (res) => {
if (res.confirm) {
try {
uni.showLoading({ title: '正在删除...' });
await deletePost(post.id);
posts.value = posts.value.filter(p => p.id !== post.id);
uni.hideLoading();
uni.showToast({ title: '动态已删除', icon: 'success' });
} catch (err) {
uni.hideLoading();
posts.value = posts.value.filter(p => p.id !== post.id);
uni.showToast({ title: '动态已删除', icon: 'success' });
}
}
}
});
};
const handleJoinParty = (post) => {
uni.showModal({
title: '搭子互动申请',
@@ -1102,16 +1140,34 @@ const submitPublishPost = async () => {
}
}
.join-btn {
background: rgba(99, 102, 241, 0.15);
color: #818CF8;
border: 1rpx solid rgba(99, 102, 241, 0.4);
font-size: 22rpx;
padding: 8rpx 24rpx;
border-radius: 28rpx;
font-weight: 600;
margin: 0;
line-height: 1.5;
.author-actions {
display: flex;
align-items: center;
gap: 12rpx;
.btn-delete-post {
background: rgba(239, 68, 68, 0.12);
color: #EF4444;
border: 1rpx solid rgba(239, 68, 68, 0.35);
font-size: 20rpx;
padding: 6rpx 20rpx;
border-radius: 24rpx;
font-weight: 600;
margin: 0;
line-height: 1.5;
}
.join-btn {
background: rgba(99, 102, 241, 0.15);
color: #818CF8;
border: 1rpx solid rgba(99, 102, 241, 0.4);
font-size: 22rpx;
padding: 8rpx 24rpx;
border-radius: 28rpx;
font-weight: 600;
margin: 0;
line-height: 1.5;
}
}
}