feat: 新增提审防审模式,隐藏发布及评论相关入口

本次新增由后台 virtualPayAudit 开关控制的审核模式,在该模式下:
1. 隐藏底部 Tab 栏的发布按钮
2. 隐藏空状态、分类页、个人页的发布入口
3. 隐藏帖子卡片、详情页、个人发布页的评论数及评价入口
4. 发布页在审核模式下直接拦截并跳转至首页
5. 详情页的用户评价及评价弹层在审核模式下隐藏,避免 UGC 判定
这个提交包含在:
2026-11-04 16:26:25 +08:00
父节点 25a3a3d52f
当前提交 14d02aedcd
共有 9 个文件被更改,包括 124 次插入 和 38 次删除

查看文件

@@ -81,7 +81,7 @@
<view v-for="i in 3" :key="i" class="fc-skeleton list__skeleton"></view>
</view>
<fc-empty v-else-if="!list.length" text="该分类下暂无信息" btn-text="发布一条" @action="goCreate" />
<fc-empty v-else-if="!list.length" text="该分类下暂无信息" :btn-text="isAudit ? '' : '发布一条'" @action="goCreate" />
<view v-else>
<fc-post-card v-for="p in list" :key="p.id" :post="p" @click="goDetail" />
@@ -92,7 +92,7 @@
</view>
</view>
<view class="list__fab" @click="goCreate">
<view v-if="!isAudit" class="list__fab" @click="goCreate">
<text>+ 发布</text>
</view>
@@ -114,7 +114,7 @@ import FcPostCard from '@/components/fc-post-card/fc-post-card.vue'
import FcEmpty from '@/components/fc-empty/fc-empty.vue'
import FcCityPicker from '@/components/fc-city-picker/fc-city-picker.vue'
import homeApi from '@/common/api/home.js'
import { iconUrl, categoryIconUrl, catIcon, loadUiConfig } from '@/common/store/ui.js'
import { iconUrl, categoryIconUrl, catIcon, loadUiConfig, uiState } from '@/common/store/ui.js'
export default {
components: { FcNavbar, FcPostCard, FcEmpty, FcCityPicker },
@@ -157,6 +157,13 @@ export default {
}
},
computed: {
/**
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
* @returns {boolean} true=审核中(隐藏发布悬浮球与引导)
*/
isAudit() {
return uiState.virtualPayAudit !== false
},
/**
* 判断是否为具体分类展示模式
* @returns {boolean}
@@ -486,9 +493,10 @@ export default {
uni.navigateTo({ url: `/pages/detail/detail?id=${p.id}` })
},
/**
* 跳转到信息发布页(自动携带当前选中的大类与二级分类参数)
* 跳转到信息发布页(审核模式防穿透拦截,自动携带当前选中的大类与二级分类参数)
*/
goCreate() {
if (this.isAudit) return
const targetCatId = Number(this.categoryId || this.fixedCategoryId || 0)
const targetSubCatId = Number(this.subCategoryId || 0)
const params = []

查看文件

@@ -199,7 +199,7 @@
<text class="cat-empty-card__title">
{{ keyword ? '未找到「' + keyword + '」相关信息' : (currentSubCategory ? '暂无「' + currentSubCategory.name + '」相关发布' : '该品类下暂无发布信息') }}
</text>
<text class="cat-empty-card__desc">抢先发布此分类,让同城人脉第一眼发现</text>
<text v-if="!isAudit" class="cat-empty-card__desc">抢先发布此分类,让同城人脉第一眼发现</text>
<view class="cat-empty-card__actions">
<button v-if="keyword" class="cat-empty-card__btn cat-empty-card__btn--sub" @click="handleClear">
清空搜索
@@ -207,7 +207,7 @@
<button v-if="currentSubCategory" class="cat-empty-card__btn cat-empty-card__btn--sub" @click="selectSubCategory(null)">
查看全部
</button>
<button class="cat-empty-card__btn cat-empty-card__btn--primary" @click="goPublish">
<button v-if="!isAudit" class="cat-empty-card__btn cat-empty-card__btn--primary" @click="goPublish">
立即发布
</button>
</view>
@@ -320,7 +320,7 @@ import FcTabbar from '@/components/fc-tabbar/fc-tabbar.vue'
import FcPostCard from '@/components/fc-post-card/fc-post-card.vue'
import FcEmpty from '@/components/fc-empty/fc-empty.vue'
import homeApi from '@/common/api/home.js'
import { iconUrl, categoryIconUrl, catIcon, loadUiConfig } from '@/common/store/ui.js'
import { iconUrl, categoryIconUrl, catIcon, loadUiConfig, uiState } from '@/common/store/ui.js'
import { getNavMetrics } from '@/common/utils/navbar.js'
import { safeNavigateTo } from '@/common/utils/nav.js'
import { groupAreaTree } from '@/common/utils/area.js'
@@ -416,6 +416,13 @@ export default {
}
},
computed: {
/**
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
* @returns {boolean} true=审核中(隐藏发布与评论相关入口)
*/
isAudit() {
return uiState.virtualPayAudit !== false
},
/**
* 输入框占位文案,动态根据当前选中一级/二级分类切换
*/
@@ -1002,9 +1009,10 @@ export default {
this.handleSearch()
},
/**
* 跳转到当前分类的发布页
* 跳转到当前分类的发布页(审核模式下防穿透拦截)
*/
goPublish() {
if (this.isAudit) return
const catId = this.currentCategory ? this.currentCategory.id : ''
const subId = this.currentSubCategory ? `&subCategoryId=${this.currentSubCategory.id}` : ''
safeNavigateTo(`/pages/post/create?categoryId=${catId}${subId}`)

查看文件

@@ -107,7 +107,7 @@
<image class="fc-icon fc-icon--sm" :src="iconUrl('eye')" mode="aspectFit" />
<text class="detail__stat-num">{{ post.views || 0 }}</text>
</view>
<view class="fc-inline detail__stat-gap">
<view v-if="!isAudit" class="fc-inline detail__stat-gap">
<image class="fc-icon fc-icon--sm" :src="iconUrl('comment-gray')" mode="aspectFit" />
<text class="detail__stat-num">{{ post.commentCount || 0 }}</text>
</view>
@@ -316,8 +316,8 @@
<text class="detail__archive-safe">提示:交易时请仔细核对,防范网络风险</text>
</view>
<!-- 用户评价 -->
<view class="fc-card">
<!-- 用户评价(审核模式下隐藏,避免 UGC 判定) -->
<view v-if="!isAudit" class="fc-card">
<view class="detail__cmt-head">
<text class="detail__section-title">用户评价({{ comments.length }})</text>
<text v-if="!isSelf" class="detail__cmt-write" @click="onOpenComment">写评价 ›</text>
@@ -402,7 +402,7 @@
/>
<!-- 评价弹层 -->
<view v-if="showComment" class="detail__mask" @click="showComment = false" @touchmove.stop.prevent>
<view v-if="showComment && !isAudit" class="detail__mask" @click="showComment = false" @touchmove.stop.prevent>
<view class="detail__sheet" @click.stop>
<text class="detail__sheet-title">发表评价</text>
<view class="detail__stars">
@@ -421,7 +421,7 @@
</view>
<!-- 发布者回复评价弹层 -->
<view v-if="showReplyModal" class="detail__mask" @click="showReplyModal = false" @touchmove.stop.prevent>
<view v-if="showReplyModal && !isAudit" class="detail__mask" @click="showReplyModal = false" @touchmove.stop.prevent>
<view class="detail__sheet" @click.stop>
<view class="detail__sheet-header">
<text class="detail__sheet-title">回复用户评价</text>
@@ -1057,6 +1057,7 @@ export default {
* 写评价点击拦截(禁止发布者自评)
*/
onOpenComment() {
if (this.isAudit) return
if (!this.ensureLogin()) return
if (this.isSelf) {
uni.showToast({ title: '不能评价自己发布的信息', icon: 'none' })

查看文件

@@ -140,8 +140,8 @@
<fc-empty
v-else-if="!list.length"
text="附近暂无信息,换个区域或筛选试试"
btn-text="去发布"
@action="go('/pages/post/create')"
:btn-text="isAudit ? '' : '去发布'"
@action="handleEmptyAction"
/>
<!-- 真实信息流卡片列表 -->
@@ -858,6 +858,14 @@ export default {
})
},
/**
* 空状态引导动作处理(审核模式下不开放发布入口)
*/
handleEmptyAction() {
if (this.isAudit) return
safeNavigateTo('/pages/post/create')
},
/**
* 页面跳转助手(带防连击与栈溢出保护)
* @param {string} url 目标路径

查看文件

@@ -176,8 +176,10 @@ export default {
gridEntries() {
const bizText = this.isBusiness ? '我的店铺' : (this.merchantAuditStatus === 0 ? '商家审核' : '商家入驻')
return [
{ iconKey: 'mine-post', text: '我的发布', url: '/pages/post/mine' },
{ iconKey: 'mine-draft', text: '草稿箱', url: '/pages/post/drafts' },
...(this.isAudit ? [] : [
{ iconKey: 'mine-post', text: '我的发布', url: '/pages/post/mine' },
{ iconKey: 'mine-draft', text: '草稿箱', url: '/pages/post/drafts' }
]),
{ iconKey: 'bar-fav-on', text: '我的收藏', url: '/pages/favorite/index' },
{ iconKey: 'mine-follow', text: '我的关注', url: '/pages/favorite/follows' },
{ iconKey: 'mine-order', text: '我的订单', url: '/pages/member/orders' },

查看文件

@@ -3,7 +3,13 @@
<!-- 统一顶部深绿质感导航栏 -->
<fc-navbar title="发布信息" theme="gradient" :show-back="true" />
<!-- 1. 分类选择(一级大类与二级品类拆分为两行独立输入) -->
<!-- 审核模式防御性占位(提审防审模式下彻底隐藏发帖表单与发布交互) -->
<view v-if="isAudit" class="create__audit-block" style="padding-top: 160rpx;">
<fc-empty icon="lock" text="功能升级维护中,暂未开放" btn-text="返回首页" @action="goHome" />
</view>
<view v-else>
<!-- 1. 分类选择(一级大类与二级品类拆分为两行独立输入) -->
<view class="fc-card create__section">
<view class="create__cell" @click="openCatStep(1)">
<view class="create__cell-left">
@@ -523,6 +529,7 @@
<!-- 支付密码弹窗(余额支付验证) -->
<fc-pay-password :show="pwdPopup.show" :title="pwdPopup.title" :tip="pwdPopup.tip"
@close="pwdPopup.show = false" @confirm="onPwdConfirm" />
</view>
</view>
</template>
@@ -542,6 +549,8 @@
import FcNavbar from '@/components/fc-navbar/fc-navbar.vue'
import FcAreaPicker from '@/components/fc-area-picker/fc-area-picker.vue'
import FcPayPassword from '@/components/fc-pay-password/fc-pay-password.vue'
import FcEmpty from '@/components/fc-empty/fc-empty.vue'
import { safeRedirectTo } from '@/common/utils/nav.js'
import homeApi from '@/common/api/home.js'
import postApi from '@/common/api/post.js'
import memberApi from '@/common/api/member.js'
@@ -552,7 +561,7 @@ import { assetUrl } from '@/common/utils/format.js'
import config from '@/common/config/index.js'
export default {
components: { FcNavbar, FcAreaPicker, FcPayPassword },
components: { FcNavbar, FcAreaPicker, FcPayPassword, FcEmpty },
data() {
return {
categories: [],
@@ -907,6 +916,13 @@ export default {
* 页面每次显示时触发:刷新发布额度并同步最新用户资料(如从会员中心开通返回后立即刷新额度)
*/
async onShow() {
if (this.isAudit) {
uni.showToast({ title: '功能维护中,暂未开放', icon: 'none' })
setTimeout(() => {
safeRedirectTo('/pages/index/index')
}, 600)
return
}
this.loadPublish()
try {
const userStore = useUserStore()
@@ -918,6 +934,12 @@ export default {
methods: {
iconUrl,
assetUrl,
/**
* 审核模式防御:一键返回首页
*/
goHome() {
safeRedirectTo('/pages/index/index')
},
/**
* 跳转会员中心开通或续费套餐(关闭收银台弹窗,开卡返回后自动刷新额度)
*/

查看文件

@@ -17,7 +17,7 @@
<view v-for="i in 3" :key="i" class="fc-skeleton mine-post__skeleton"></view>
</view>
<fc-empty v-else-if="!list.length" text="还没有发布信息" btn-text="去发布" @action="goCreate" />
<fc-empty v-else-if="!list.length" text="还没有发布信息" :btn-text="isAudit ? '' : '去发布'" @action="goCreate" />
<view v-else class="mine-post__list">
<view v-for="p in list" :key="p.id" class="fc-card mine-post__item" @click="goDetail(p)">
@@ -40,8 +40,8 @@
<view class="mine-post__foot">
<view class="mine-post__stats">
<text>{{ p.views }} 浏览</text>
<text class="mine-post__dot">·</text>
<text>{{ p.commentCount || 0 }} 评价</text>
<text v-if="!isAudit" class="mine-post__dot">·</text>
<text v-if="!isAudit">{{ p.commentCount || 0 }} 评价</text>
<text v-if="p.isPaid" class="mine-post__dot">·</text>
<text v-if="p.isPaid" class="mine-post__paid">已付费 ¥{{ p.amount }}</text>
</view>
@@ -60,7 +60,7 @@
</view>
</view>
<view class="mine-post__fab" @click="goCreate">
<view v-if="!isAudit" class="mine-post__fab" @click="goCreate">
<text>+ 发布</text>
</view>
</view>
@@ -71,9 +71,19 @@ import FcNavbar from '@/components/fc-navbar/fc-navbar.vue'
import FcEmpty from '@/components/fc-empty/fc-empty.vue'
import postApi from '@/common/api/post.js'
import { fromNow } from '@/common/utils/format.js'
import { uiState } from '@/common/store/ui.js'
export default {
components: { FcNavbar, FcEmpty },
computed: {
/**
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
* @returns {boolean} true=审核中(隐藏发布与评价)
*/
isAudit() {
return uiState.virtualPayAudit !== false
},
},
data() {
return {
tabs: [
@@ -144,7 +154,11 @@ export default {
goDetail(p) {
uni.navigateTo({ url: `/pages/detail/detail?id=${p.id}` })
},
/**
* 跳转发布页(审核模式拦截)
*/
goCreate() {
if (this.isAudit) return
uni.navigateTo({ url: '/pages/post/create' })
},
goEdit(p) {