wangfukang 2 months ago
parent
commit
01103b56f0
  1. 25
      components/tab-bar/postList.vue
  2. 7
      components/tab-bar/release.vue

25
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
})
}
}
}

7
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) {

Loading…
Cancel
Save