From 01103b56f0cbd7e439969b11b9fbc92312cfc561 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Wed, 5 Aug 2026 16:18:24 +0800 Subject: [PATCH] 1 --- components/tab-bar/postList.vue | 25 +++++++++++++++++++++++-- components/tab-bar/release.vue | 7 +++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/components/tab-bar/postList.vue b/components/tab-bar/postList.vue index b19a0b5..c3b5fc1 100644 --- a/components/tab-bar/postList.vue +++ b/components/tab-bar/postList.vue @@ -160,6 +160,8 @@ toggleFishLike, getFishUnreadSummary } from '@/common/fishMarketApi.js' + import { getIeProfile } from '@/common/ieApi.js' + import { ensureIeVerifiedBeforeAction } from '@/common/ieRealNameAuth.js' const POST_LIST_IMAGE_CACHE_KEY = 'post_list_image_cache_v1' const POST_LIST_IMAGE_CACHE_TTL = 30 * 24 * 60 * 60 * 1000 @@ -657,7 +659,9 @@ url: '/package2/IdleTrad/detail?id=' + item.id }) }, - goPublish(type) { + async goPublish(type) { + const verified = await this.ensureVerified('发布校园二手信息') + if (!verified) return uni.navigateTo({ url: '/package1/tabbar/fishRelease?type=' + (type || 'sell') }) @@ -667,7 +671,9 @@ url: '/package2/myCenter/myPost' }) }, - goFishSessions() { + async goFishSessions() { + const verified = await this.ensureVerified('查看校园二手聊天') + if (!verified) return uni.navigateTo({ url: '/package2/IdleTrad/sessionList' }) @@ -676,6 +682,21 @@ uni.navigateTo({ url: '/package2/IdleTrad/wantList' }) + }, + async ensureVerified(actionText) { + const profile = await getIeProfile().catch(() => null) + return ensureIeVerifiedBeforeAction({ + profile: profile || {}, + actionText, + authDialog: { + badge: '校园二手', + title: '实名认证', + content: actionText + '前需完成实名认证。半径里不会存储您的实名信息。', + steps: [] + }, + reload: getIeProfile, + requireProfileSetup: false + }) } } } diff --git a/components/tab-bar/release.vue b/components/tab-bar/release.vue index 1c81fbd..f7f0796 100644 --- a/components/tab-bar/release.vue +++ b/components/tab-bar/release.vue @@ -709,7 +709,9 @@ goDetail(item) { uni.navigateTo({ url: '/package1/post/postDetail?id=' + item.id + '&source=campus' }) }, - goPublish() { + async goPublish() { + const ok = await this.ensureVerified('发布校园圈内容') + if (!ok) return uni.navigateTo({ url: '/package1/campus/campusRelease?type=' + (this.activeCategory === 'wall' || this.activeCategory === 'mine' ? 'wall' : this.activeCategory) }) }, async goChat(item) { @@ -770,7 +772,8 @@ profile: profile || {}, actionText, authDialog: { badge: '校园圈', title: '实名认证', desc: actionText + '前需完成实名认证' }, - reload: getIeProfile + reload: getIeProfile, + requireProfileSetup: false }) }, formatBadge(count) {