feat: 新增提审防审模式,隐藏发布及评论相关入口
本次新增由后台 virtualPayAudit 开关控制的审核模式,在该模式下: 1. 隐藏底部 Tab 栏的发布按钮 2. 隐藏空状态、分类页、个人页的发布入口 3. 隐藏帖子卡片、详情页、个人发布页的评论数及评价入口 4. 发布页在审核模式下直接拦截并跳转至首页 5. 详情页的用户评价及评价弹层在审核模式下隐藏,避免 UGC 判定
这个提交包含在:
@@ -52,7 +52,7 @@
|
|||||||
<image class="fc-post-card__stat-icon" :src="iconUrl('eye')" mode="aspectFit" />
|
<image class="fc-post-card__stat-icon" :src="iconUrl('eye')" mode="aspectFit" />
|
||||||
<text class="fc-post-card__stat-num">{{ post.views || 0 }}</text>
|
<text class="fc-post-card__stat-num">{{ post.views || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fc-post-card__stat">
|
<view v-if="!isAudit" class="fc-post-card__stat">
|
||||||
<image class="fc-post-card__stat-icon" :src="iconUrl('comment-gray')" mode="aspectFit" />
|
<image class="fc-post-card__stat-icon" :src="iconUrl('comment-gray')" mode="aspectFit" />
|
||||||
<text class="fc-post-card__stat-num">{{ post.commentCount || 0 }}</text>
|
<text class="fc-post-card__stat-num">{{ post.commentCount || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { iconUrl, categoryIconUrl } from '@/common/store/ui.js'
|
import { iconUrl, categoryIconUrl, uiState } from '@/common/store/ui.js'
|
||||||
import { fromNow, formatKm, assetUrl } from '@/common/utils/format.js'
|
import { fromNow, formatKm, assetUrl } from '@/common/utils/format.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -75,6 +75,13 @@ export default {
|
|||||||
compact: { type: Boolean, default: false },
|
compact: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
/**
|
||||||
|
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
|
||||||
|
* @returns {boolean} true=审核中(隐藏评论数统计)
|
||||||
|
*/
|
||||||
|
isAudit() {
|
||||||
|
return uiState.virtualPayAudit !== false
|
||||||
|
},
|
||||||
/** 相对发布时间描述 */
|
/** 相对发布时间描述 */
|
||||||
timeText() {
|
timeText() {
|
||||||
return fromNow(this.post.createdAt)
|
return fromNow(this.post.createdAt)
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
<view class="fc-tabbar">
|
<view class="fc-tabbar">
|
||||||
<view class="fc-tabbar__nav">
|
<view class="fc-tabbar__nav">
|
||||||
<view
|
<view
|
||||||
v-for="(item, idx) in tabs"
|
v-for="item in displayTabs"
|
||||||
:key="item.path"
|
:key="item.path"
|
||||||
class="fc-tabbar__item"
|
class="fc-tabbar__item"
|
||||||
:class="{
|
:class="{
|
||||||
'fc-tabbar__item--active': current === idx,
|
'fc-tabbar__item--active': item.rawIndex === current,
|
||||||
'fc-tabbar__item--primary': item.primary
|
'fc-tabbar__item--primary': item.primary
|
||||||
}"
|
}"
|
||||||
hover-class="none"
|
hover-class="none"
|
||||||
@click="switchTo(item, idx)"
|
@click="switchTo(item)"
|
||||||
>
|
>
|
||||||
<!-- 中间突出加号悬浮球(发布) -->
|
<!-- 中间突出加号悬浮球(发布) -->
|
||||||
<template v-if="item.primary">
|
<template v-if="item.primary">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<view class="fc-tabbar__icon">
|
<view class="fc-tabbar__icon">
|
||||||
<image
|
<image
|
||||||
class="fc-tabbar__img"
|
class="fc-tabbar__img"
|
||||||
:src="iconUrl(current === idx ? item.active : item.icon)"
|
:src="iconUrl(item.rawIndex === current ? item.active : item.icon)"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
<!-- 未读通知红点/数字徽章 -->
|
<!-- 未读通知红点/数字徽章 -->
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { iconUrl } from '@/common/store/ui.js'
|
import { iconUrl, uiState } from '@/common/store/ui.js'
|
||||||
import messageApi from '@/common/api/message.js'
|
import messageApi from '@/common/api/message.js'
|
||||||
import { useUserStore } from '@/common/store/index.js'
|
import { useUserStore } from '@/common/store/index.js'
|
||||||
import { safeNavigateTo, safeRedirectTo } from '@/common/utils/nav.js'
|
import { safeNavigateTo, safeRedirectTo } from '@/common/utils/nav.js'
|
||||||
@@ -70,15 +70,32 @@ export default {
|
|||||||
return {
|
return {
|
||||||
unreadCount: 0,
|
unreadCount: 0,
|
||||||
tabs: [
|
tabs: [
|
||||||
{ text: '首页', icon: 'tab-home', active: 'tab-home-on', path: '/pages/index/index' },
|
{ text: '首页', icon: 'tab-home', active: 'tab-home-on', path: '/pages/index/index', rawIndex: 0 },
|
||||||
{ text: '分类', icon: 'tab-category', active: 'tab-category-on', path: '/pages/category/index' },
|
{ text: '分类', icon: 'tab-category', active: 'tab-category-on', path: '/pages/category/index', rawIndex: 1 },
|
||||||
{ text: '发布', icon: 'tab-post', active: 'tab-post-on', path: '/pages/post/create', primary: true },
|
{ text: '发布', icon: 'tab-post', active: 'tab-post-on', path: '/pages/post/create', primary: true, rawIndex: 2 },
|
||||||
{ text: '通知', icon: 'tab-message', active: 'tab-message-on', path: '/pages/message/index', badgeKey: 'message' },
|
{ text: '通知', icon: 'tab-message', active: 'tab-message-on', path: '/pages/message/index', badgeKey: 'message', rawIndex: 3 },
|
||||||
{ text: '我的', icon: 'tab-mine', active: 'tab-mine-on', path: '/pages/mine/index' },
|
{ text: '我的', icon: 'tab-mine', active: 'tab-mine-on', path: '/pages/mine/index', rawIndex: 4 },
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
/**
|
||||||
|
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
|
||||||
|
* @returns {boolean} true=审核中(隐藏发布按钮); false=正常运营模式
|
||||||
|
*/
|
||||||
|
isAudit() {
|
||||||
|
return uiState.virtualPayAudit !== false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 实际渲染呈现的 Tab 项列表(审核模式下彻底隐藏加号发布球)
|
||||||
|
* @returns {Array<Object>} 过滤后的 Tab 列表
|
||||||
|
*/
|
||||||
|
displayTabs() {
|
||||||
|
if (this.isAudit) {
|
||||||
|
return this.tabs.filter((t) => !t.primary && t.path !== '/pages/post/create')
|
||||||
|
}
|
||||||
|
return this.tabs
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 格式化未读角标文本(超过99显示99+)
|
* 格式化未读角标文本(超过99显示99+)
|
||||||
* @returns {string} 角标数字文本
|
* @returns {string} 角标数字文本
|
||||||
@@ -137,10 +154,9 @@ export default {
|
|||||||
* 切换底部导航目标页面
|
* 切换底部导航目标页面
|
||||||
* 杜绝 reLaunch 全局冷重启白屏,常驻 Tab 统一采用 safeRedirectTo 平滑切换
|
* 杜绝 reLaunch 全局冷重启白屏,常驻 Tab 统一采用 safeRedirectTo 平滑切换
|
||||||
* @param {Object} item 目标 Tab 配置对象
|
* @param {Object} item 目标 Tab 配置对象
|
||||||
* @param {number} idx 目标 Tab 索引
|
|
||||||
*/
|
*/
|
||||||
switchTo(item, idx) {
|
switchTo(item) {
|
||||||
if (idx === this.current) return
|
if (item.rawIndex === this.current) return
|
||||||
|
|
||||||
// 中间突出加号(发布):作为独立模态表单页推入,保留前序页面栈,支持原路返回
|
// 中间突出加号(发布):作为独立模态表单页推入,保留前序页面栈,支持原路返回
|
||||||
if (item.primary) {
|
if (item.primary) {
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
<view v-for="i in 3" :key="i" class="fc-skeleton list__skeleton"></view>
|
<view v-for="i in 3" :key="i" class="fc-skeleton list__skeleton"></view>
|
||||||
</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>
|
<view v-else>
|
||||||
<fc-post-card v-for="p in list" :key="p.id" :post="p" @click="goDetail" />
|
<fc-post-card v-for="p in list" :key="p.id" :post="p" @click="goDetail" />
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="list__fab" @click="goCreate">
|
<view v-if="!isAudit" class="list__fab" @click="goCreate">
|
||||||
<text>+ 发布</text>
|
<text>+ 发布</text>
|
||||||
</view>
|
</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 FcEmpty from '@/components/fc-empty/fc-empty.vue'
|
||||||
import FcCityPicker from '@/components/fc-city-picker/fc-city-picker.vue'
|
import FcCityPicker from '@/components/fc-city-picker/fc-city-picker.vue'
|
||||||
import homeApi from '@/common/api/home.js'
|
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 {
|
export default {
|
||||||
components: { FcNavbar, FcPostCard, FcEmpty, FcCityPicker },
|
components: { FcNavbar, FcPostCard, FcEmpty, FcCityPicker },
|
||||||
@@ -157,6 +157,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
/**
|
||||||
|
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
|
||||||
|
* @returns {boolean} true=审核中(隐藏发布悬浮球与引导)
|
||||||
|
*/
|
||||||
|
isAudit() {
|
||||||
|
return uiState.virtualPayAudit !== false
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 判断是否为具体分类展示模式
|
* 判断是否为具体分类展示模式
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
@@ -486,9 +493,10 @@ export default {
|
|||||||
uni.navigateTo({ url: `/pages/detail/detail?id=${p.id}` })
|
uni.navigateTo({ url: `/pages/detail/detail?id=${p.id}` })
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转到信息发布页(自动携带当前选中的大类与二级分类参数)
|
* 跳转到信息发布页(审核模式防穿透拦截,自动携带当前选中的大类与二级分类参数)
|
||||||
*/
|
*/
|
||||||
goCreate() {
|
goCreate() {
|
||||||
|
if (this.isAudit) return
|
||||||
const targetCatId = Number(this.categoryId || this.fixedCategoryId || 0)
|
const targetCatId = Number(this.categoryId || this.fixedCategoryId || 0)
|
||||||
const targetSubCatId = Number(this.subCategoryId || 0)
|
const targetSubCatId = Number(this.subCategoryId || 0)
|
||||||
const params = []
|
const params = []
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
<text class="cat-empty-card__title">
|
<text class="cat-empty-card__title">
|
||||||
{{ keyword ? '未找到「' + keyword + '」相关信息' : (currentSubCategory ? '暂无「' + currentSubCategory.name + '」相关发布' : '该品类下暂无发布信息') }}
|
{{ keyword ? '未找到「' + keyword + '」相关信息' : (currentSubCategory ? '暂无「' + currentSubCategory.name + '」相关发布' : '该品类下暂无发布信息') }}
|
||||||
</text>
|
</text>
|
||||||
<text class="cat-empty-card__desc">抢先发布此分类,让同城人脉第一眼发现</text>
|
<text v-if="!isAudit" class="cat-empty-card__desc">抢先发布此分类,让同城人脉第一眼发现</text>
|
||||||
<view class="cat-empty-card__actions">
|
<view class="cat-empty-card__actions">
|
||||||
<button v-if="keyword" class="cat-empty-card__btn cat-empty-card__btn--sub" @click="handleClear">
|
<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 v-if="currentSubCategory" class="cat-empty-card__btn cat-empty-card__btn--sub" @click="selectSubCategory(null)">
|
||||||
查看全部
|
查看全部
|
||||||
</button>
|
</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>
|
</button>
|
||||||
</view>
|
</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 FcPostCard from '@/components/fc-post-card/fc-post-card.vue'
|
||||||
import FcEmpty from '@/components/fc-empty/fc-empty.vue'
|
import FcEmpty from '@/components/fc-empty/fc-empty.vue'
|
||||||
import homeApi from '@/common/api/home.js'
|
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 { getNavMetrics } from '@/common/utils/navbar.js'
|
||||||
import { safeNavigateTo } from '@/common/utils/nav.js'
|
import { safeNavigateTo } from '@/common/utils/nav.js'
|
||||||
import { groupAreaTree } from '@/common/utils/area.js'
|
import { groupAreaTree } from '@/common/utils/area.js'
|
||||||
@@ -416,6 +416,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
/**
|
||||||
|
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
|
||||||
|
* @returns {boolean} true=审核中(隐藏发布与评论相关入口)
|
||||||
|
*/
|
||||||
|
isAudit() {
|
||||||
|
return uiState.virtualPayAudit !== false
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 输入框占位文案,动态根据当前选中一级/二级分类切换
|
* 输入框占位文案,动态根据当前选中一级/二级分类切换
|
||||||
*/
|
*/
|
||||||
@@ -1002,9 +1009,10 @@ export default {
|
|||||||
this.handleSearch()
|
this.handleSearch()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转到当前分类的发布页
|
* 跳转到当前分类的发布页(审核模式下防穿透拦截)
|
||||||
*/
|
*/
|
||||||
goPublish() {
|
goPublish() {
|
||||||
|
if (this.isAudit) return
|
||||||
const catId = this.currentCategory ? this.currentCategory.id : ''
|
const catId = this.currentCategory ? this.currentCategory.id : ''
|
||||||
const subId = this.currentSubCategory ? `&subCategoryId=${this.currentSubCategory.id}` : ''
|
const subId = this.currentSubCategory ? `&subCategoryId=${this.currentSubCategory.id}` : ''
|
||||||
safeNavigateTo(`/pages/post/create?categoryId=${catId}${subId}`)
|
safeNavigateTo(`/pages/post/create?categoryId=${catId}${subId}`)
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
<image class="fc-icon fc-icon--sm" :src="iconUrl('eye')" mode="aspectFit" />
|
<image class="fc-icon fc-icon--sm" :src="iconUrl('eye')" mode="aspectFit" />
|
||||||
<text class="detail__stat-num">{{ post.views || 0 }}</text>
|
<text class="detail__stat-num">{{ post.views || 0 }}</text>
|
||||||
</view>
|
</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" />
|
<image class="fc-icon fc-icon--sm" :src="iconUrl('comment-gray')" mode="aspectFit" />
|
||||||
<text class="detail__stat-num">{{ post.commentCount || 0 }}</text>
|
<text class="detail__stat-num">{{ post.commentCount || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -316,8 +316,8 @@
|
|||||||
<text class="detail__archive-safe">提示:交易时请仔细核对,防范网络风险</text>
|
<text class="detail__archive-safe">提示:交易时请仔细核对,防范网络风险</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 用户评价 -->
|
<!-- 用户评价(审核模式下隐藏,避免 UGC 判定) -->
|
||||||
<view class="fc-card">
|
<view v-if="!isAudit" class="fc-card">
|
||||||
<view class="detail__cmt-head">
|
<view class="detail__cmt-head">
|
||||||
<text class="detail__section-title">用户评价({{ comments.length }})</text>
|
<text class="detail__section-title">用户评价({{ comments.length }})</text>
|
||||||
<text v-if="!isSelf" class="detail__cmt-write" @click="onOpenComment">写评价 ›</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>
|
<view class="detail__sheet" @click.stop>
|
||||||
<text class="detail__sheet-title">发表评价</text>
|
<text class="detail__sheet-title">发表评价</text>
|
||||||
<view class="detail__stars">
|
<view class="detail__stars">
|
||||||
@@ -421,7 +421,7 @@
|
|||||||
</view>
|
</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" @click.stop>
|
||||||
<view class="detail__sheet-header">
|
<view class="detail__sheet-header">
|
||||||
<text class="detail__sheet-title">回复用户评价</text>
|
<text class="detail__sheet-title">回复用户评价</text>
|
||||||
@@ -1057,6 +1057,7 @@ export default {
|
|||||||
* 写评价点击拦截(禁止发布者自评)
|
* 写评价点击拦截(禁止发布者自评)
|
||||||
*/
|
*/
|
||||||
onOpenComment() {
|
onOpenComment() {
|
||||||
|
if (this.isAudit) return
|
||||||
if (!this.ensureLogin()) return
|
if (!this.ensureLogin()) return
|
||||||
if (this.isSelf) {
|
if (this.isSelf) {
|
||||||
uni.showToast({ title: '不能评价自己发布的信息', icon: 'none' })
|
uni.showToast({ title: '不能评价自己发布的信息', icon: 'none' })
|
||||||
|
|||||||
@@ -140,8 +140,8 @@
|
|||||||
<fc-empty
|
<fc-empty
|
||||||
v-else-if="!list.length"
|
v-else-if="!list.length"
|
||||||
text="附近暂无信息,换个区域或筛选试试"
|
text="附近暂无信息,换个区域或筛选试试"
|
||||||
btn-text="去发布"
|
:btn-text="isAudit ? '' : '去发布'"
|
||||||
@action="go('/pages/post/create')"
|
@action="handleEmptyAction"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 真实信息流卡片列表 -->
|
<!-- 真实信息流卡片列表 -->
|
||||||
@@ -858,6 +858,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空状态引导动作处理(审核模式下不开放发布入口)
|
||||||
|
*/
|
||||||
|
handleEmptyAction() {
|
||||||
|
if (this.isAudit) return
|
||||||
|
safeNavigateTo('/pages/post/create')
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面跳转助手(带防连击与栈溢出保护)
|
* 页面跳转助手(带防连击与栈溢出保护)
|
||||||
* @param {string} url 目标路径
|
* @param {string} url 目标路径
|
||||||
|
|||||||
@@ -176,8 +176,10 @@ export default {
|
|||||||
gridEntries() {
|
gridEntries() {
|
||||||
const bizText = this.isBusiness ? '我的店铺' : (this.merchantAuditStatus === 0 ? '商家审核' : '商家入驻')
|
const bizText = this.isBusiness ? '我的店铺' : (this.merchantAuditStatus === 0 ? '商家审核' : '商家入驻')
|
||||||
return [
|
return [
|
||||||
{ iconKey: 'mine-post', text: '我的发布', url: '/pages/post/mine' },
|
...(this.isAudit ? [] : [
|
||||||
{ iconKey: 'mine-draft', text: '草稿箱', url: '/pages/post/drafts' },
|
{ 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: 'bar-fav-on', text: '我的收藏', url: '/pages/favorite/index' },
|
||||||
{ iconKey: 'mine-follow', text: '我的关注', url: '/pages/favorite/follows' },
|
{ iconKey: 'mine-follow', text: '我的关注', url: '/pages/favorite/follows' },
|
||||||
{ iconKey: 'mine-order', text: '我的订单', url: '/pages/member/orders' },
|
{ iconKey: 'mine-order', text: '我的订单', url: '/pages/member/orders' },
|
||||||
|
|||||||
@@ -3,7 +3,13 @@
|
|||||||
<!-- 统一顶部深绿质感导航栏 -->
|
<!-- 统一顶部深绿质感导航栏 -->
|
||||||
<fc-navbar title="发布信息" theme="gradient" :show-back="true" />
|
<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="fc-card create__section">
|
||||||
<view class="create__cell" @click="openCatStep(1)">
|
<view class="create__cell" @click="openCatStep(1)">
|
||||||
<view class="create__cell-left">
|
<view class="create__cell-left">
|
||||||
@@ -523,6 +529,7 @@
|
|||||||
<!-- 支付密码弹窗(余额支付验证) -->
|
<!-- 支付密码弹窗(余额支付验证) -->
|
||||||
<fc-pay-password :show="pwdPopup.show" :title="pwdPopup.title" :tip="pwdPopup.tip"
|
<fc-pay-password :show="pwdPopup.show" :title="pwdPopup.title" :tip="pwdPopup.tip"
|
||||||
@close="pwdPopup.show = false" @confirm="onPwdConfirm" />
|
@close="pwdPopup.show = false" @confirm="onPwdConfirm" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -542,6 +549,8 @@
|
|||||||
import FcNavbar from '@/components/fc-navbar/fc-navbar.vue'
|
import FcNavbar from '@/components/fc-navbar/fc-navbar.vue'
|
||||||
import FcAreaPicker from '@/components/fc-area-picker/fc-area-picker.vue'
|
import FcAreaPicker from '@/components/fc-area-picker/fc-area-picker.vue'
|
||||||
import FcPayPassword from '@/components/fc-pay-password/fc-pay-password.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 homeApi from '@/common/api/home.js'
|
||||||
import postApi from '@/common/api/post.js'
|
import postApi from '@/common/api/post.js'
|
||||||
import memberApi from '@/common/api/member.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'
|
import config from '@/common/config/index.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { FcNavbar, FcAreaPicker, FcPayPassword },
|
components: { FcNavbar, FcAreaPicker, FcPayPassword, FcEmpty },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
categories: [],
|
categories: [],
|
||||||
@@ -907,6 +916,13 @@ export default {
|
|||||||
* 页面每次显示时触发:刷新发布额度并同步最新用户资料(如从会员中心开通返回后立即刷新额度)
|
* 页面每次显示时触发:刷新发布额度并同步最新用户资料(如从会员中心开通返回后立即刷新额度)
|
||||||
*/
|
*/
|
||||||
async onShow() {
|
async onShow() {
|
||||||
|
if (this.isAudit) {
|
||||||
|
uni.showToast({ title: '功能维护中,暂未开放', icon: 'none' })
|
||||||
|
setTimeout(() => {
|
||||||
|
safeRedirectTo('/pages/index/index')
|
||||||
|
}, 600)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loadPublish()
|
this.loadPublish()
|
||||||
try {
|
try {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
@@ -918,6 +934,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
iconUrl,
|
iconUrl,
|
||||||
assetUrl,
|
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 v-for="i in 3" :key="i" class="fc-skeleton mine-post__skeleton"></view>
|
||||||
</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-else class="mine-post__list">
|
||||||
<view v-for="p in list" :key="p.id" class="fc-card mine-post__item" @click="goDetail(p)">
|
<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__foot">
|
||||||
<view class="mine-post__stats">
|
<view class="mine-post__stats">
|
||||||
<text>{{ p.views }} 浏览</text>
|
<text>{{ p.views }} 浏览</text>
|
||||||
<text class="mine-post__dot">·</text>
|
<text v-if="!isAudit" class="mine-post__dot">·</text>
|
||||||
<text>{{ p.commentCount || 0 }} 评价</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__dot">·</text>
|
||||||
<text v-if="p.isPaid" class="mine-post__paid">已付费 ¥{{ p.amount }}</text>
|
<text v-if="p.isPaid" class="mine-post__paid">已付费 ¥{{ p.amount }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mine-post__fab" @click="goCreate">
|
<view v-if="!isAudit" class="mine-post__fab" @click="goCreate">
|
||||||
<text>+ 发布</text>
|
<text>+ 发布</text>
|
||||||
</view>
|
</view>
|
||||||
</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 FcEmpty from '@/components/fc-empty/fc-empty.vue'
|
||||||
import postApi from '@/common/api/post.js'
|
import postApi from '@/common/api/post.js'
|
||||||
import { fromNow } from '@/common/utils/format.js'
|
import { fromNow } from '@/common/utils/format.js'
|
||||||
|
import { uiState } from '@/common/store/ui.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { FcNavbar, FcEmpty },
|
components: { FcNavbar, FcEmpty },
|
||||||
|
computed: {
|
||||||
|
/**
|
||||||
|
* 是否处于提审防审模式(由后台 virtualPayAudit 开关统一控制)
|
||||||
|
* @returns {boolean} true=审核中(隐藏发布与评价)
|
||||||
|
*/
|
||||||
|
isAudit() {
|
||||||
|
return uiState.virtualPayAudit !== false
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
@@ -144,7 +154,11 @@ export default {
|
|||||||
goDetail(p) {
|
goDetail(p) {
|
||||||
uni.navigateTo({ url: `/pages/detail/detail?id=${p.id}` })
|
uni.navigateTo({ url: `/pages/detail/detail?id=${p.id}` })
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 跳转发布页(审核模式拦截)
|
||||||
|
*/
|
||||||
goCreate() {
|
goCreate() {
|
||||||
|
if (this.isAudit) return
|
||||||
uni.navigateTo({ url: '/pages/post/create' })
|
uni.navigateTo({ url: '/pages/post/create' })
|
||||||
},
|
},
|
||||||
goEdit(p) {
|
goEdit(p) {
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户