diff --git a/src/api/admin/appUser.ts b/src/api/admin/appUser.ts index 884938d..82cbe9f 100644 --- a/src/api/admin/appUser.ts +++ b/src/api/admin/appUser.ts @@ -11,6 +11,8 @@ export interface AppUserPageParams { status?: string countryCode?: string registerSource?: string + /** 客户端平台:ANDROID / IOS / WEB */ + platform?: string } export interface WatchHistoryPageParams { @@ -21,6 +23,8 @@ export interface WatchHistoryPageParams { dramaTitle?: string dramaId?: number episodeId?: number + /** 客户端平台:ANDROID / IOS / WEB */ + platform?: string source?: string finished?: boolean startTime?: string diff --git a/src/api/admin/engagement.ts b/src/api/admin/engagement.ts new file mode 100644 index 0000000..13cf0b4 --- /dev/null +++ b/src/api/admin/engagement.ts @@ -0,0 +1,54 @@ +// Author: fruit.com.cn + +import request from '@/axios' +import type { PageResult } from './types' + +/** 收藏与点赞只读分页筛选条件。 */ +export interface EngagementPageParams { + pageIndex?: number + pageSize?: number + keyword?: string + userId?: string | number + deviceId?: string + /** 客户端平台:ANDROID / IOS / WEB */ + platform?: string + dramaId?: string | number + dramaTitle?: string + targetType?: string + targetId?: string | number + episodeId?: string | number + startTime?: string + endTime?: string +} + +/** 后台互动列表行。 */ +export interface EngagementItem { + id: string + userId: string | null + uid: string | null + nickname: string | null + deviceId: string | null + /** 客户端平台 ANDROID / IOS / WEB;老客户端未上报时为空。 */ + platform: string | null + anonymous: boolean + dramaId: string | null + dramaTitle: string | null + dramaCover: string | null + dramaStatus: string | null + dramaPublished: boolean | null + targetType: string + targetId: string + episodeId: string | null + episodeNo: number | null + episodeTitle: string | null + commentSummary: string | null + createdAt: string +} + +/** 查询收藏分页。 */ +export const pageFavoritesApi = (params: EngagementPageParams) => + request.get>({ url: '/admin/favorites/page', params }) + +/** 查询点赞分页。 */ +export const pageLikesApi = (params: EngagementPageParams) => + request.get>({ url: '/admin/likes/page', params }) diff --git a/src/styles/business/app-user-management.css b/src/styles/business/app-user-management.css index a126314..6b18b3d 100644 --- a/src/styles/business/app-user-management.css +++ b/src/styles/business/app-user-management.css @@ -18,7 +18,8 @@ } .app-user-toolbar .app-user-status, -.app-user-toolbar .app-user-country { +.app-user-toolbar .app-user-country, +.app-user-toolbar .app-user-platform { width: 150px; flex: 0 0 150px; } @@ -63,6 +64,7 @@ .app-user-meta { display: flex; flex-direction: column; + align-items: flex-start; gap: 2px; min-width: 0; } diff --git a/src/views/components/AppUserCell.vue b/src/views/components/AppUserCell.vue new file mode 100644 index 0000000..47f4db0 --- /dev/null +++ b/src/views/components/AppUserCell.vue @@ -0,0 +1,43 @@ + + + + + + + diff --git a/src/views/components/LocaleTextFields.vue b/src/views/components/LocaleTextFields.vue index f331fb1..cc52082 100644 --- a/src/views/components/LocaleTextFields.vue +++ b/src/views/components/LocaleTextFields.vue @@ -13,15 +13,21 @@ const props = defineProps({ showLanguages: { type: Boolean, default: true }, required: { type: Boolean, default: true } }) -const emit = defineEmits(['update:languages']) +const emit = defineEmits(['update:languages', 'update:locales']) function changeLanguages(codes) { const next = codes.includes('zh') ? codes : ['zh', ...codes] + const locales = { ...props.locales } next.forEach((code) => { - if (props.locales[code] == null) props.locales[code] = '' + if (locales[code] == null) locales[code] = '' }) + emit('update:locales', locales) emit('update:languages', next) } + +function changeLocale(code, value) { + emit('update:locales', { ...props.locales, [code]: value }) +}
- {{ - row.nickname || '未设置昵称' - }} - {{ row.uid }} + + 昵称: {{ row.nickname || '未设置昵称' }} + + UID: {{ row.uid }}
- - + + - - + +