优化发布群配置与二维码池界面
This commit is contained in:
@@ -32,6 +32,12 @@ import OrderAgreementsDialog from '../components/OrderAgreementsDialog.vue'
|
||||
import PostRentalNoticeDialog from '../components/PostRentalNoticeDialog.vue'
|
||||
import GeneralConfigDialog from '../components/GeneralConfigDialog.vue'
|
||||
import AutoWelcomeConfig from '../components/AutoWelcomeConfig.vue'
|
||||
import {
|
||||
fetchAutoWelcomeMessage,
|
||||
updateAutoWelcomeMessage,
|
||||
fetchListingGroupWelcomeMessage,
|
||||
updateListingGroupWelcomeMessage,
|
||||
} from '@/features/chats'
|
||||
|
||||
const defaultOrderAgreements: OrderAgreements = {
|
||||
virtual_asset_purchase: {
|
||||
@@ -90,6 +96,12 @@ const orderAgreementsConfig = computed(
|
||||
const postRentalNoticeConfig = computed(
|
||||
() => configs.value.find(item => item.key === 'profile.post_rental_notice') || null
|
||||
)
|
||||
const autoWelcomeConfig = computed(
|
||||
() => configs.value.find(item => item.key === 'chat.auto_welcome_message') || null
|
||||
)
|
||||
const listingGroupWelcomeConfig = computed(
|
||||
() => configs.value.find(item => item.key === 'chat.listing_group_welcome') || null
|
||||
)
|
||||
|
||||
const regularConfigs = computed(() =>
|
||||
configs.value.filter(
|
||||
@@ -100,7 +112,9 @@ const regularConfigs = computed(() =>
|
||||
item.key !== 'mobile.home_banners' &&
|
||||
item.key !== 'listing.publish_agreements' &&
|
||||
item.key !== 'order.agreements' &&
|
||||
item.key !== 'profile.post_rental_notice'
|
||||
item.key !== 'profile.post_rental_notice' &&
|
||||
item.key !== 'chat.auto_welcome_message' &&
|
||||
item.key !== 'chat.listing_group_welcome'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -516,7 +530,35 @@ function formatConfigValue(row: SystemConfig) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<AutoWelcomeConfig />
|
||||
<section v-if="autoWelcomeConfig || listingGroupWelcomeConfig" class="publish-config-panel">
|
||||
<div class="publish-config-main">
|
||||
<div>
|
||||
<p class="eyebrow">Chat Welcome</p>
|
||||
<h2>群聊自动欢迎语</h2>
|
||||
<span>分别管理订单群和发布群进入后自动发送的话术,支持后台直接编辑。</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="welcome-config-grid">
|
||||
<AutoWelcomeConfig
|
||||
v-if="autoWelcomeConfig"
|
||||
title="订单群自动话术"
|
||||
description="订单群聊创建后自动发送的欢迎消息"
|
||||
placeholder="输入订单群自动发送的话术"
|
||||
empty-hint="未设置"
|
||||
:fetch-message="fetchAutoWelcomeMessage"
|
||||
:update-message="updateAutoWelcomeMessage"
|
||||
/>
|
||||
<AutoWelcomeConfig
|
||||
v-if="listingGroupWelcomeConfig"
|
||||
title="发布群欢迎语"
|
||||
description="账号群创建后自动发送的欢迎消息"
|
||||
placeholder="输入发布群创建后自动发送的欢迎语"
|
||||
empty-hint="未设置"
|
||||
:fetch-message="fetchListingGroupWelcomeMessage"
|
||||
:update-message="updateListingGroupWelcomeMessage"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-table v-loading="loading" class="table-panel" :data="regularConfigs">
|
||||
<el-table-column prop="key" label="配置项" min-width="260" />
|
||||
@@ -638,6 +680,12 @@ function formatConfigValue(row: SystemConfig) {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.welcome-config-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.home-stat-grid .publish-stat strong {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user