chore: 批量更新导入路径到 features 架构
- 更新所有 admin API 文件导入路径 - 更新所有 features 中 Vue 文件的导入路径 - 修复 ChatAttachmentImage 组件导入 - 修复 auth 模块部分导入路径 剩余 ~190 个类型错误待修复(主要是缺失的模块)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeUnmount, ref, watch } from 'vue'
|
import { onBeforeUnmount, ref, watch } from 'vue'
|
||||||
import { fetchAdminFileBlob, fetchFileBlobByURL } from '@/api/files'
|
import { fetchAdminFileBlob, fetchFileBlobByURL } from '@/shared/api/files'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
source: string
|
source: string
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
|
|
||||||
import type { ApiResponse, PaginatedResult } from './types'
|
import type { ApiResponse, PaginatedResult } from '@/shared/types/types'
|
||||||
|
|
||||||
export interface AdminAuditLog {
|
export interface AdminAuditLog {
|
||||||
id: number
|
id: number
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
import type { ApiResponse } from './types'
|
import type { ApiResponse } from '@/shared/types/types'
|
||||||
import { getRefreshToken, setAuthTokens } from '@/utils/authStorage'
|
import { getRefreshToken, setAuthTokens } from '@/utils/authStorage'
|
||||||
import type { UserStatus } from '@/types/status'
|
import type { UserStatus } from '@/shared/types/status'
|
||||||
|
|
||||||
export interface AdminRole {
|
export interface AdminRole {
|
||||||
id: number
|
id: number
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
import type { ApiResponse } from './types'
|
import type { ApiResponse } from '@/shared/types/types'
|
||||||
import type { DisputeStatus, OrderStatus } from '@/types/status'
|
import type { DisputeStatus, OrderStatus } from '@/shared/types/status'
|
||||||
|
|
||||||
export interface DashboardMetrics {
|
export interface DashboardMetrics {
|
||||||
total_users: number
|
total_users: number
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
|
|
||||||
import type { ApiResponse, PaginatedResult } from './types'
|
import type { ApiResponse, PaginatedResult } from '@/shared/types/types'
|
||||||
|
|
||||||
export interface AdminRole {
|
export interface AdminRole {
|
||||||
id: number
|
id: number
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
|
|
||||||
import type { ApiResponse } from './types'
|
import type { ApiResponse } from '@/shared/types/types'
|
||||||
|
|
||||||
export interface Permission {
|
export interface Permission {
|
||||||
id: number
|
id: number
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
|
|
||||||
import type { ApiResponse, PaginatedResult } from './types'
|
import type { ApiResponse, PaginatedResult } from '@/shared/types/types'
|
||||||
import type { RealnameStatusValue, RiskStatus, UserStatus } from '@/types/status'
|
import type { RealnameStatusValue, RiskStatus, UserStatus } from '@/shared/types/status'
|
||||||
|
|
||||||
export interface AdminUserItem {
|
export interface AdminUserItem {
|
||||||
id: number
|
id: number
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
|
|
||||||
import type { ApiResponse, PaginatedResult } from './types'
|
import type { ApiResponse, PaginatedResult } from '@/shared/types/types'
|
||||||
import type { BalanceType, LedgerDirection } from '@/types/status'
|
import type { BalanceType, LedgerDirection } from '@/shared/types/status'
|
||||||
|
|
||||||
export interface AdminWalletLedger {
|
export interface AdminWalletLedger {
|
||||||
id: number
|
id: number
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { apiClient } from './client'
|
import { apiClient } from '@/shared/api/client'
|
||||||
import type { ApiResponse } from './types'
|
import type { ApiResponse } from '@/shared/types/types'
|
||||||
|
|
||||||
export interface SystemConfig {
|
export interface SystemConfig {
|
||||||
id: number
|
id: number
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
import { createAdminMgrUser, updateAdminMgrUser, type AdminMgrUser, type CreateAdminRequest, type UpdateAdminRequest } from '@/api/adminMgr'
|
import { createAdminMgrUser, updateAdminMgrUser, type AdminMgrUser, type CreateAdminRequest, type UpdateAdminRequest } from '@/features/admin/api/adminMgr'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
import { fetchPermissions, fetchRole, assignRolePermissions, type Permission, type Role } from '@/api/adminRoles'
|
import { fetchPermissions, fetchRole, assignRolePermissions, type Permission, type Role } from '@/features/admin/api/adminRoles'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
import { fetchRoles, type Role } from '@/api/adminRoles'
|
import { fetchRoles, type Role } from '@/features/admin/api/adminRoles'
|
||||||
import { assignAdminRoles, type AdminMgrUser } from '@/api/adminMgr'
|
import { assignAdminRoles, type AdminMgrUser } from '@/features/admin/api/adminMgr'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { fetchAutoWelcomeMessage, updateAutoWelcomeMessage } from '@/api/chats'
|
import { fetchAutoWelcomeMessage, updateAutoWelcomeMessage } from '@/features/chats'
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const saving = ref(false)
|
const saving = ref(false)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { computed, ref, watch } from 'vue'
|
import { computed, ref, watch } from 'vue'
|
||||||
|
|
||||||
import { updateSystemConfig, type SystemConfig } from '@/api/systemConfigs'
|
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||||
import { getSystemConfigSelectOptions, type SystemConfigOption } from '@/utils/systemConfigOptions'
|
import { getSystemConfigSelectOptions, type SystemConfigOption } from '@/utils/systemConfigOptions'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
import { defaultHomeAnnouncements, mergeHomeConfig } from '@/api/homeConfig'
|
import { defaultHomeAnnouncements, mergeHomeConfig } from '@/features/listings/api/homeConfig'
|
||||||
import { updateSystemConfig, type SystemConfig } from '@/api/systemConfigs'
|
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||||
import { safeParseJSON } from '@/utils/json'
|
import { safeParseJSON } from '@/utils/json'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
import { uploadAdminFile } from '@/api/files'
|
import { uploadAdminFile } from '@/shared/api/files'
|
||||||
import { defaultHomeBanners, mergeHomeConfig, type HomeBannerSlide } from '@/api/homeConfig'
|
import { defaultHomeBanners, mergeHomeConfig, type HomeBannerSlide } from '@/features/listings/api/homeConfig'
|
||||||
import { updateSystemConfig, type SystemConfig } from '@/api/systemConfigs'
|
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||||
import { safeParseJSON } from '@/utils/json'
|
import { safeParseJSON } from '@/utils/json'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import {
|
|||||||
emptyListingPublishOptions,
|
emptyListingPublishOptions,
|
||||||
mergeListingPublishOptions,
|
mergeListingPublishOptions,
|
||||||
type ListingPublishOptions,
|
type ListingPublishOptions,
|
||||||
} from '@/api/listingOptions'
|
} from '@/features/listings/api/listingOptions'
|
||||||
import { updateSystemConfig, type SystemConfig } from '@/api/systemConfigs'
|
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||||
import { safeParseJSON } from '@/utils/json'
|
import { safeParseJSON } from '@/utils/json'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
updateQuickReply,
|
updateQuickReply,
|
||||||
deleteQuickReply,
|
deleteQuickReply,
|
||||||
type QuickReply,
|
type QuickReply,
|
||||||
} from '@/api/chats'
|
} from '@/features/chats'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
import { createRole, updateRole, type Role, type CreateRoleRequest, type UpdateRoleRequest } from '@/api/adminRoles'
|
import { createRole, updateRole, type Role, type CreateRoleRequest, type UpdateRoleRequest } from '@/features/admin/api/adminRoles'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import {
|
|||||||
emptyListingSalePriceConfig,
|
emptyListingSalePriceConfig,
|
||||||
mergeListingSalePriceConfig,
|
mergeListingSalePriceConfig,
|
||||||
type PublishSalePriceConfig,
|
type PublishSalePriceConfig,
|
||||||
} from '@/api/listingOptions'
|
} from '@/features/listings/api/listingOptions'
|
||||||
import { updateSystemConfig, type SystemConfig } from '@/api/systemConfigs'
|
import { updateSystemConfig, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||||
import { safeParseJSON } from '@/utils/json'
|
import { safeParseJSON } from '@/utils/json'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, computed } from 'vue'
|
import { ref, watch, computed } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { fetchSupportAdmins, transferChat, type SupportAdmin } from '@/api/chats'
|
import { fetchSupportAdmins, transferChat, type SupportAdmin } from '@/features/chats'
|
||||||
import { User } from '@element-plus/icons-vue'
|
import { User } from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import { computed, onMounted, reactive, ref } from 'vue'
|
import { computed, onMounted, reactive, ref } from 'vue'
|
||||||
|
|
||||||
import { fetchAdminAuditLogs, type AdminAuditLog } from '@/api/adminAudit'
|
import { fetchAdminAuditLogs, type AdminAuditLog } from '@/features/admin/api/adminAudit'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ import {
|
|||||||
type ChatConversation,
|
type ChatConversation,
|
||||||
type ChatMessage,
|
type ChatMessage,
|
||||||
type QuickReply,
|
type QuickReply,
|
||||||
} from '@/api/chats'
|
} from '@/features/chats'
|
||||||
import { uploadAdminFile } from '@/api/files'
|
import { uploadAdminFile } from '@/shared/api/files'
|
||||||
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
|
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
|
||||||
import { useChatSSE, type ChatEvent } from '@/composables/useChatSSE'
|
import { useChatSSE, type ChatEvent } from '@/features/chats/composables/useChatSSE'
|
||||||
import { formatDateMinute } from '@/utils/time'
|
import { formatDateMinute } from '@/utils/time'
|
||||||
import TransferDialog from './components/TransferDialog.vue'
|
import TransferDialog from './components/TransferDialog.vue'
|
||||||
import QuickReplyDialog from './components/QuickReplyDialog.vue'
|
import QuickReplyDialog from './components/QuickReplyDialog.vue'
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
Wallet,
|
Wallet,
|
||||||
Warning
|
Warning
|
||||||
} from '@element-plus/icons-vue'
|
} from '@element-plus/icons-vue'
|
||||||
import { fetchAdminDashboard, type AdminDashboard } from '@/api/adminDashboard'
|
import { fetchAdminDashboard, type AdminDashboard } from '@/features/admin/api/adminDashboard'
|
||||||
import { useAdminTable } from '@/composables/useAdminTable'
|
import { useAdminTable } from '@/composables/useAdminTable'
|
||||||
import { useMoney } from '@/composables/useMoney'
|
import { useMoney } from '@/composables/useMoney'
|
||||||
import { disputeStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
import { disputeStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
|
|
||||||
import { arbitrateDispute, fetchAdminDisputes, type Dispute } from '@/api/disputes'
|
import { arbitrateDispute, fetchAdminDisputes, type Dispute } from '@/features/disputes'
|
||||||
import { fetchAdminFileBlob } from '@/api/files'
|
import { fetchAdminFileBlob } from '@/shared/api/files'
|
||||||
import { disputeStatusLabel } from '@/utils/statusLabels'
|
import { disputeStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
import { fetchAdminFileBlob } from '@/api/files'
|
import { fetchAdminFileBlob } from '@/shared/api/files'
|
||||||
import { adminMarkListingAbnormal, adminOfflineListing, fetchAdminListing, type Listing } from '@/api/listings'
|
import { adminMarkListingAbnormal, adminOfflineListing, fetchAdminListing, type Listing } from '@/features/listings'
|
||||||
import { listingReviewStatusLabel, listingStatusLabel } from '@/utils/statusLabels'
|
import { listingReviewStatusLabel, listingStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { Check, Close, Picture, Refresh, Search, WarningFilled } from '@element-
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { computed, nextTick, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue'
|
import { computed, nextTick, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue'
|
||||||
|
|
||||||
import { fetchAdminFileBlob } from '@/api/files'
|
import { fetchAdminFileBlob } from '@/shared/api/files'
|
||||||
import { approveListing, fetchPendingReviewListings, rejectListing, type Listing } from '@/api/listings'
|
import { approveListing, fetchPendingReviewListings, rejectListing, type Listing } from '@/features/listings'
|
||||||
import {
|
import {
|
||||||
assetRegions,
|
assetRegions,
|
||||||
formatHafCoinM,
|
formatHafCoinM,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Search } from '@element-plus/icons-vue'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { computed, reactive, ref } from 'vue'
|
import { computed, reactive, ref } from 'vue'
|
||||||
|
|
||||||
import { fetchAdminListings, type AdminListingPage, type AdminListingQuery, type Listing } from '@/api/listings'
|
import { fetchAdminListings, type AdminListingPage, type AdminListingQuery, type Listing } from '@/features/listings'
|
||||||
import { useAdminTable } from '@/composables/useAdminTable'
|
import { useAdminTable } from '@/composables/useAdminTable'
|
||||||
import { useMoney } from '@/composables/useMoney'
|
import { useMoney } from '@/composables/useMoney'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
import { fetchAdminMgrUsers, deleteAdminMgrUser, changeAdminPassword, type AdminMgrUser } from '@/api/adminMgr'
|
import { fetchAdminMgrUsers, deleteAdminMgrUser, changeAdminPassword, type AdminMgrUser } from '@/features/admin/api/adminMgr'
|
||||||
import { useAdminPaginatedTable } from '@/composables/useAdminPaginatedTable'
|
import { useAdminPaginatedTable } from '@/composables/useAdminPaginatedTable'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
import { adminCloseOrder, adminMarkOrderAbnormal, adminRefundOrder, adminRefundStatus, fetchAdminHandoffRecords, fetchAdminOrder, type HandoffRecord, type Order, type RefundStatus } from '@/api/orders'
|
import { adminCloseOrder, adminMarkOrderAbnormal, adminRefundOrder, adminRefundStatus, fetchAdminHandoffRecords, fetchAdminOrder, type HandoffRecord, type Order, type RefundStatus } from '@/features/orders'
|
||||||
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
|
|
||||||
import { fetchAdminOrders, type Order } from '@/api/orders'
|
import { fetchAdminOrders, type Order } from '@/features/orders'
|
||||||
import { useAdminTable } from '@/composables/useAdminTable'
|
import { useAdminTable } from '@/composables/useAdminTable'
|
||||||
import { handoffStatusLabel, orderStatusLabel, settlementStatusLabel } from '@/utils/statusLabels'
|
import { handoffStatusLabel, orderStatusLabel, settlementStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
import { fetchRoles, deleteRole, type Role } from '@/api/adminRoles'
|
import { fetchRoles, deleteRole, type Role } from '@/features/admin/api/adminRoles'
|
||||||
import { useAdminTable } from '@/composables/useAdminTable'
|
import { useAdminTable } from '@/composables/useAdminTable'
|
||||||
|
|
||||||
import AssignPermissionsDialog from './components/AssignPermissionsDialog.vue'
|
import AssignPermissionsDialog from './components/AssignPermissionsDialog.vue'
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import {
|
|||||||
mergeListingPublishOptions,
|
mergeListingPublishOptions,
|
||||||
type ListingPublishOptions,
|
type ListingPublishOptions,
|
||||||
type PublishSalePriceConfig,
|
type PublishSalePriceConfig,
|
||||||
} from '@/api/listingOptions'
|
} from '@/features/listings/api/listingOptions'
|
||||||
import {
|
import {
|
||||||
defaultHomeAnnouncements,
|
defaultHomeAnnouncements,
|
||||||
defaultHomeBanners,
|
defaultHomeBanners,
|
||||||
mergeHomeConfig,
|
mergeHomeConfig,
|
||||||
type HomeBannerSlide,
|
type HomeBannerSlide,
|
||||||
} from '@/api/homeConfig'
|
} from '@/features/listings/api/homeConfig'
|
||||||
import { fetchSystemConfigs, type SystemConfig } from '@/api/systemConfigs'
|
import { fetchSystemConfigs, type SystemConfig } from '@/features/admin/api/systemConfigs'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
import { safeParseJSON } from '@/utils/json'
|
import { safeParseJSON } from '@/utils/json'
|
||||||
import { formatSystemConfigSelectValue } from '@/utils/systemConfigOptions'
|
import { formatSystemConfigSelectValue } from '@/utils/systemConfigOptions'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
import { fetchAdminUsers, freezeAdminUser, unfreezeAdminUser, type AdminUserItem } from '@/api/adminUsers'
|
import { fetchAdminUsers, freezeAdminUser, unfreezeAdminUser, type AdminUserItem } from '@/features/admin/api/adminUsers'
|
||||||
import { useAdminPaginatedTable } from '@/composables/useAdminPaginatedTable'
|
import { useAdminPaginatedTable } from '@/composables/useAdminPaginatedTable'
|
||||||
import { userStatusLabel } from '@/utils/statusLabels'
|
import { userStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import { computed, onMounted, reactive, ref } from 'vue'
|
import { computed, onMounted, reactive, ref } from 'vue'
|
||||||
|
|
||||||
import { fetchAdminWalletLedger, type AdminWalletLedger } from '@/api/adminWallet'
|
import { fetchAdminWalletLedger, type AdminWalletLedger } from '@/features/admin/api/adminWallet'
|
||||||
import { balanceTypeLabel, ledgerDirectionLabel } from '@/utils/statusLabels'
|
import { balanceTypeLabel, ledgerDirectionLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
|
|
||||||
import { fetchNotifications, markNotificationRead, type NotificationItem } from '@/api/notifications'
|
import { fetchNotifications, markNotificationRead, type NotificationItem } from '@/features/auth/api/notifications'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { computed, onMounted, reactive, ref } from 'vue'
|
import { computed, onMounted, reactive, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
import { uploadFile } from '@/api/files'
|
import { uploadFile } from '@/shared/api/files'
|
||||||
import { useSessionStore } from '@/stores/session'
|
import { useSessionStore } from '@/stores/session'
|
||||||
import { realnameStatusLabel } from '@/utils/statusLabels'
|
import { realnameStatusLabel } from '@/utils/statusLabels'
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { computed, onMounted, reactive, ref } from 'vue'
|
import { computed, onMounted, reactive, ref } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
|
||||||
import { getRealnameStatus, startRealname, type RealnameStatus } from '@/api/realname'
|
import { getRealnameStatus, startRealname, type RealnameStatus } from '@/features/auth/api/realname'
|
||||||
import { useSessionStore } from '@/stores/session'
|
import { useSessionStore } from '@/stores/session'
|
||||||
import { realnameStatusLabel } from '@/utils/statusLabels'
|
import { realnameStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeUnmount, ref, watch } from 'vue'
|
import { onBeforeUnmount, ref, watch } from 'vue'
|
||||||
import { fetchAdminFileBlob, fetchFileBlobByURL } from '@/api/files'
|
import { fetchAdminFileBlob, fetchFileBlobByURL } from '@/shared/api/files'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
source: string
|
source: string
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
type ChatConversation,
|
type ChatConversation,
|
||||||
type ChatMessage,
|
type ChatMessage,
|
||||||
} from '@/api/chats'
|
} from '@/api/chats'
|
||||||
import { uploadFile } from '@/api/files'
|
import { uploadFile } from '@/shared/api/files'
|
||||||
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
|
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
|
||||||
import { useChatSSE, type ChatEvent } from '@/composables/useChatSSE'
|
import { useChatSSE, type ChatEvent } from '@/composables/useChatSSE'
|
||||||
import { formatDateMinute } from '@/utils/time'
|
import { formatDateMinute } from '@/utils/time'
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
type ChatConversation,
|
type ChatConversation,
|
||||||
type ChatMessage,
|
type ChatMessage,
|
||||||
} from '@/api/chats'
|
} from '@/api/chats'
|
||||||
import { uploadFile } from '@/api/files'
|
import { uploadFile } from '@/shared/api/files'
|
||||||
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
|
import ChatAttachmentImage from '@/components/ChatAttachmentImage.vue'
|
||||||
import { useChatSSE, type ChatEvent } from '@/composables/useChatSSE'
|
import { useChatSSE, type ChatEvent } from '@/composables/useChatSSE'
|
||||||
import { formatDateMinute } from '@/utils/time'
|
import { formatDateMinute } from '@/utils/time'
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
totalRangeOptions,
|
totalRangeOptions,
|
||||||
fireLevelRangeOptions,
|
fireLevelRangeOptions,
|
||||||
} from '@/composables/home/useFilterOptions'
|
} from '@/composables/home/useFilterOptions'
|
||||||
import type { ListingPublishOptions } from '@/api/listingOptions'
|
import type { ListingPublishOptions } from '@/features/listings/api/listingOptions'
|
||||||
import type { FilterPopoverKey, HomeFilters } from '@/composables/home/useHomeFilters'
|
import type { FilterPopoverKey, HomeFilters } from '@/composables/home/useHomeFilters'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { RouterLink } from 'vue-router'
|
import { RouterLink } from 'vue-router'
|
||||||
import type { Listing } from '@/api/listings'
|
import type { Listing } from '@/features/listings'
|
||||||
import {
|
import {
|
||||||
formatHafCoinM,
|
formatHafCoinM,
|
||||||
getCoinWan,
|
getCoinWan,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
emptyListingPublishOptions,
|
emptyListingPublishOptions,
|
||||||
type ListingPublishOptions,
|
type ListingPublishOptions,
|
||||||
} from '@/api/listingOptions'
|
} from '@/features/listings/api/listingOptions'
|
||||||
import { useHomeFilters } from '@/composables/home/useHomeFilters'
|
import { useHomeFilters } from '@/composables/home/useHomeFilters'
|
||||||
import { useListingQuery } from '@/composables/home/useListingQuery'
|
import { useListingQuery } from '@/composables/home/useListingQuery'
|
||||||
import HomeAnnouncement from './components/HomeAnnouncement.vue'
|
import HomeAnnouncement from './components/HomeAnnouncement.vue'
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
# Orders 模块类型定义
|
// Orders 模块类型定义
|
||||||
|
// 所有类型从 API 层统一导出
|
||||||
|
|
||||||
导出订单相关的类型,从 API 层统一导出。
|
export * from './api/orders'
|
||||||
|
|
||||||
参考 `api/orders.ts` 中的类型定义:
|
|
||||||
- Order
|
|
||||||
- HandoffRecord
|
|
||||||
- PaymentOrder
|
|
||||||
- SubmitCheckoutPayload
|
|
||||||
- CounterCheckoutPayload
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import { useRoute, useRouter } from 'vue-router'
|
|||||||
import QRCode from 'qrcode'
|
import QRCode from 'qrcode'
|
||||||
|
|
||||||
import { fetchOrderChat } from '@/api/chats'
|
import { fetchOrderChat } from '@/api/chats'
|
||||||
import { createDispute } from '@/api/disputes'
|
import { createDispute } from '@/features/disputes'
|
||||||
import { uploadFile } from '@/api/files'
|
import { uploadFile } from '@/shared/api/files'
|
||||||
import {
|
import {
|
||||||
acceptCheckout,
|
acceptCheckout,
|
||||||
cancelOrder,
|
cancelOrder,
|
||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
type HandoffRecord,
|
type HandoffRecord,
|
||||||
type Order,
|
type Order,
|
||||||
type PaymentOrder,
|
type PaymentOrder,
|
||||||
} from '@/api/orders'
|
} from '@/features/orders'
|
||||||
import { useSessionStore } from '@/stores/session'
|
import { useSessionStore } from '@/stores/session'
|
||||||
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { CopyDocument, Search } from '@element-plus/icons-vue'
|
import { CopyDocument, Search } from '@element-plus/icons-vue'
|
||||||
|
|
||||||
import { fetchOrders, type Order } from '@/api/orders'
|
import { fetchOrders, type Order } from '@/features/orders'
|
||||||
import { useSessionStore } from '@/stores/session'
|
import { useSessionStore } from '@/stores/session'
|
||||||
import { orderStatusLabel } from '@/utils/statusLabels'
|
import { orderStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
|
|
||||||
import { fetchOrders, type Order } from '@/api/orders'
|
import { fetchOrders, type Order } from '@/features/orders'
|
||||||
import { useSessionStore } from '@/stores/session'
|
import { useSessionStore } from '@/stores/session'
|
||||||
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
|
|
||||||
import { fetchSellerListings, offlineListing, submitListingReview, type Listing } from '@/api/listings'
|
import { fetchSellerListings, offlineListing, submitListingReview, type Listing } from '@/features/listings'
|
||||||
import { listingReviewStatusLabel, listingStatusLabel } from '@/utils/statusLabels'
|
import { listingReviewStatusLabel, listingStatusLabel } from '@/utils/statusLabels'
|
||||||
import { getListingSellerPrice } from '@/utils/listingDisplay'
|
import { getListingSellerPrice } from '@/utils/listingDisplay'
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
fetchWalletLedger,
|
fetchWalletLedger,
|
||||||
type WalletAccount,
|
type WalletAccount,
|
||||||
type WalletLedger,
|
type WalletLedger,
|
||||||
} from '@/api/wallet'
|
} from '@/features/wallet'
|
||||||
import { balanceTypeLabel, ledgerDirectionLabel, walletStatusLabel } from '@/utils/statusLabels'
|
import { balanceTypeLabel, ledgerDirectionLabel, walletStatusLabel } from '@/utils/statusLabels'
|
||||||
import { formatDateTime } from '@/utils/time'
|
import { formatDateTime } from '@/utils/time'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user