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