统一前端共享工具入口
This commit is contained in:
@@ -3,7 +3,10 @@ import { ElMessage } from 'element-plus'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import { getSystemConfigSelectOptions, type SystemConfigOption } from '@/utils/systemConfigOptions'
|
||||
import {
|
||||
getSystemConfigSelectOptions,
|
||||
type SystemConfigOption,
|
||||
} from '@/shared/utils/systemConfigOptions'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ref, watch } from 'vue'
|
||||
|
||||
import { defaultHomeAnnouncements, mergeHomeConfig } from '@/features/listings/api/homeConfig'
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
type HomeBannerSlide,
|
||||
} from '@/features/listings/api/homeConfig'
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ref, watch } from 'vue'
|
||||
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import type { ListingPublishAgreements } from '@/features/listings/api/listingOptions'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
|
||||
const defaultListingPublishAgreements: ListingPublishAgreements = {
|
||||
virtual_asset_sale: {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ref, watch } from 'vue'
|
||||
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import type { OrderAgreements } from '@/features/orders/api/orders'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
|
||||
const defaultOrderAgreements: OrderAgreements = {
|
||||
virtual_asset_purchase: {
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
type CreatePaymentConfigRequest,
|
||||
type UpdatePaymentConfigRequest,
|
||||
} from '@/features/admin/api/paymentConfig'
|
||||
import { readError } from '@/utils/error'
|
||||
import { readError } from '@/shared/utils/error'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ElMessage } from 'element-plus'
|
||||
import { ref, watch } from 'vue'
|
||||
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
|
||||
interface PostRentalNotice {
|
||||
title: string
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type ListingPublishOptions,
|
||||
} from '@/features/listings/api/listingOptions'
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type PublishSalePriceConfig,
|
||||
} from '@/features/listings/api/listingOptions'
|
||||
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
type UpdateAnnouncementRequest,
|
||||
} from '@/features/admin/api/adminAnnouncements'
|
||||
import type { Announcement } from '@/features/announcement'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import AnnouncementDialog from '../components/AnnouncementDialog.vue'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Search } from '@element-plus/icons-vue'
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
|
||||
import { fetchAdminAuditLogs, type AdminAuditLog } from '@/features/admin/api/adminAudit'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -19,7 +19,7 @@ import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
|
||||
import { useChatSSE, type ChatEvent } from '@/features/chats/composables/useChatSSE'
|
||||
import { useDesktopNotification } from '@/features/chats/composables/useDesktopNotification'
|
||||
import NotificationSettings from '@/features/chats/components/NotificationSettings.vue'
|
||||
import { formatDateMinute } from '@/utils/time'
|
||||
import { formatDateMinute } from '@/shared/utils/time'
|
||||
import TransferDialog from '../components/TransferDialog.vue'
|
||||
import QuickReplyDialog from '../components/QuickReplyDialog.vue'
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
import { fetchAdminDashboard, type AdminDashboard } from '@/features/admin/api/adminDashboard'
|
||||
import { useAdminTable } from '@/features/admin/composables/useAdminTable'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { disputeStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { disputeStatusLabel, orderStatusLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
|
||||
const {
|
||||
loading,
|
||||
|
||||
@@ -4,9 +4,9 @@ import { computed, onMounted, ref } from 'vue'
|
||||
|
||||
import { arbitrateDispute, fetchAdminDisputes, type Dispute } from '@/features/disputes'
|
||||
import { fetchAdminFileBlob } from '@/shared/api/files'
|
||||
import { disputeStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatListingNo } from '@/utils/listingDisplay'
|
||||
import { disputeStatusLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import { formatListingNo } from '@/shared/utils/listingDisplay'
|
||||
import { yuanToCent } from '@/shared/utils/money'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type FinanceDailyItem,
|
||||
} from '@/features/admin/api/adminFinance'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
|
||||
const loading = ref(false)
|
||||
const dashboard = ref<FinanceDashboard | null>(null)
|
||||
|
||||
@@ -4,8 +4,8 @@ import { onMounted, reactive, ref } from 'vue'
|
||||
|
||||
import { fetchFinanceDetails, type FinanceDetail } from '@/features/admin/api/adminFinance'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { orderStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { orderStatusLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -12,9 +12,9 @@ import {
|
||||
fetchAdminListing,
|
||||
type Listing,
|
||||
} from '@/features/listings'
|
||||
import { listingReviewStatusLabel, listingStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatListingCode } from '@/utils/listingDisplay'
|
||||
import { listingReviewStatusLabel, listingStatusLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import { formatListingCode } from '@/shared/utils/listingDisplay'
|
||||
|
||||
const route = useRoute()
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -23,8 +23,8 @@ import {
|
||||
getSkinNames,
|
||||
readAssetNumber,
|
||||
readAssetString,
|
||||
} from '@/utils/listingDisplay'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
} from '@/shared/utils/listingDisplay'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
|
||||
type RiskLevel = 'danger' | 'warning' | 'info'
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
getDailyLoss,
|
||||
getResourceQuantity,
|
||||
getSkinGroup,
|
||||
} from '@/utils/listingDisplay'
|
||||
} from '@/shared/utils/listingDisplay'
|
||||
|
||||
const filters = reactive<AdminListingQuery>({
|
||||
owner_id: '',
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
type AdminMgrUser,
|
||||
} from '@/features/admin/api/adminMgr'
|
||||
import { useAdminPaginatedTable } from '@/features/admin/composables/useAdminPaginatedTable'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
|
||||
import AdminUserDialog from '../components/AdminUserDialog.vue'
|
||||
import AssignRolesDialog from '../components/AssignRolesDialog.vue'
|
||||
|
||||
@@ -16,9 +16,9 @@ import {
|
||||
} from '@/features/orders'
|
||||
import { fetchAdminPayments, type AdminPayment } from '@/features/admin/api/adminPayments'
|
||||
import { centToYuan, formatCentWithSymbol, formatMoney } from '@/shared/utils/money'
|
||||
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatListingNo } from '@/utils/listingDisplay'
|
||||
import { handoffStatusLabel, orderStatusLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import { formatListingNo } from '@/shared/utils/listingDisplay'
|
||||
|
||||
const route = useRoute()
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
|
||||
import { fetchAdminOrders, type Order } from '@/features/orders'
|
||||
import { handoffStatusLabel, orderStatusLabel, settlementStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import {
|
||||
handoffStatusLabel,
|
||||
orderStatusLabel,
|
||||
settlementStatusLabel,
|
||||
} from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import { centToYuan, formatMoney } from '@/shared/utils/money'
|
||||
import { formatListingNo } from '@/utils/listingDisplay'
|
||||
import { formatListingNo } from '@/shared/utils/listingDisplay'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
const status = ref('')
|
||||
|
||||
@@ -10,9 +10,9 @@ import {
|
||||
importPaymentConfigBackup,
|
||||
type PaymentConfig,
|
||||
} from '@/features/admin/api/paymentConfig'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import { formatCent } from '@/shared/utils/money'
|
||||
import { readError } from '@/utils/error'
|
||||
import { readError } from '@/shared/utils/error'
|
||||
import PaymentConfigDialog from '../components/PaymentConfigDialog.vue'
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -4,7 +4,7 @@ import { computed, onMounted, reactive, ref } from 'vue'
|
||||
|
||||
import { fetchAdminPayments, type AdminPayment } from '@/features/admin/api/adminPayments'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -18,9 +18,9 @@ import {
|
||||
} from '@/features/listings/api/homeConfig'
|
||||
import type { OrderAgreements } from '@/features/orders/api/orders'
|
||||
import { fetchSystemConfigs, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { safeParseJSON } from '@/utils/json'
|
||||
import { formatSystemConfigSelectValue } from '@/utils/systemConfigOptions'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import { safeParseJSON } from '@/shared/utils/json'
|
||||
import { formatSystemConfigSelectValue } from '@/shared/utils/systemConfigOptions'
|
||||
|
||||
// 导入重构后的 Dialog 子组件
|
||||
import PublishOptionsDialog from '../components/PublishOptionsDialog.vue'
|
||||
|
||||
@@ -11,8 +11,8 @@ import {
|
||||
} from '@/features/admin/api/adminUsers'
|
||||
import { centToYuan, formatCent, yuanToCent } from '@/shared/utils/money'
|
||||
import { useAdminPaginatedTable } from '@/features/admin/composables/useAdminPaginatedTable'
|
||||
import { userStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { userStatusLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
const submitting = ref(false)
|
||||
|
||||
@@ -4,8 +4,8 @@ import { computed, onMounted, reactive, ref } from 'vue'
|
||||
|
||||
import { fetchAdminWalletLedger, type AdminWalletLedger } from '@/features/admin/api/adminWallet'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { balanceTypeLabel, ledgerDirectionLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { balanceTypeLabel, ledgerDirectionLabel } from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user