修正订单群聊与发布跳转

This commit is contained in:
yml
2026-06-18 09:45:36 +08:00
parent f4361c9804
commit 58e071d157
5 changed files with 184 additions and 2 deletions
@@ -47,6 +47,7 @@ const multiScreenshotKeys = new Set(['tencentSecurity', 'skin'])
interface UsePublishFormOptions {
draftKey: string
submitSuccessPath: string
listingGroupChatPathPrefix?: string
persistBeforeUnload?: boolean
confirmReset?: () => Promise<void>
notifySuccess: (message: string) => void
@@ -701,7 +702,8 @@ export function usePublishForm(options: UsePublishFormOptions) {
)
// 新建发布成功后,若已自动建立发布群,跳进该群让号主立即看到欢迎语+二维码
if (!isEditMode.value && listing.listing_group_conversation_id) {
await router.push(`/messages/${listing.listing_group_conversation_id}`)
const chatPathPrefix = options.listingGroupChatPathPrefix || '/messages/'
await router.push(`${chatPathPrefix}${listing.listing_group_conversation_id}`)
} else {
await router.push(options.submitSuccessPath)
}
@@ -91,6 +91,7 @@ const {
} = usePublishForm({
draftKey: 'hfb.mobile.publish.draft',
submitSuccessPath: '/m/profile',
listingGroupChatPathPrefix: '/m/chats/',
async confirmReset() {
await showDialog({
title: '重置发布内容',
@@ -100,6 +100,7 @@ const {
} = usePublishForm({
draftKey: 'hfb.pc.publish.draft',
submitSuccessPath: '/seller/listings',
listingGroupChatPathPrefix: '/messages/',
persistBeforeUnload: true,
async confirmReset() {
await ElMessageBox.confirm('将清空当前填写内容和本地草稿。', '重置发布内容', {