diff --git a/src/api/teamBill.js b/src/api/teamBill.js index 3cd655a..2ed9e65 100644 --- a/src/api/teamBill.js +++ b/src/api/teamBill.js @@ -1,4 +1,4 @@ -import { get, post } from '../utils/http.js' +import {get, post} from '../utils/http.js' /** * 获取团队成员列表 @@ -147,14 +147,20 @@ export const processInviteMessage = async (data) => { */ export const getTeamMemberWork = async (userId) => { try { - const response = await get(`/team/member-work?userId=${userId}`) - return response + return await get(`/team/member-work?userId=${userId}`) } catch (error) { console.error('Failed to fetch team member work:', error) throw error } } +/** + * 用户申请记录查询 + */ +export function getApplyRecord(userId, status) { + return get(`/team/user/apply/record?teamId=${userId}&status=${status}`) +} + /** * 格式化显示状态 * @param {string} status - 状态值 @@ -183,7 +189,7 @@ export const formatBillStatus = (status) => { color: '#059669' } } - + return statusMap[status] || { text: status, class: 'unknown', @@ -214,15 +220,15 @@ export const formatOnlineTime = (minutes) => { */ export const formatGiftValue = (value) => { if (!value || value === '0') return '$0' - + // 如果已经是格式化的字符串,直接返回 if (typeof value === 'string' && value.includes('K')) { return `$${value}` } - + const numValue = parseFloat(value) if (isNaN(numValue)) return '$0' - + if (numValue >= 1000000) { return `$${(numValue / 1000000).toFixed(1)}M` } else if (numValue >= 1000) { @@ -240,7 +246,7 @@ export const formatDiamondValue = (value) => { if (!value || value === '0') return '0' const numValue = parseInt(value) if (isNaN(numValue)) return '0' - + if (numValue >= 1000000) { return `${(numValue / 1000000).toFixed(1)}M` } else if (numValue >= 1000) { @@ -258,7 +264,7 @@ export const formatDateDisplay = (dateNumber) => { if (!dateNumber) return '' const dateStr = dateNumber.toString() if (dateStr.length !== 8) return dateStr - + const year = dateStr.substring(0, 4) const month = dateStr.substring(4, 6) const day = dateStr.substring(6, 8) @@ -272,12 +278,12 @@ export const formatDateDisplay = (dateNumber) => { */ export const formatAccount = (memberProfile) => { if (!memberProfile) return '' - + // 如果有特殊ID,优先显示特殊ID if (memberProfile.ownSpecialId && memberProfile.ownSpecialId.account) { return memberProfile.ownSpecialId.account } - + // 否则显示普通账户 return memberProfile.account || '' } diff --git a/src/api/wallet.js b/src/api/wallet.js index dc680de..e740783 100644 --- a/src/api/wallet.js +++ b/src/api/wallet.js @@ -53,6 +53,14 @@ export function userBankSearchUserProfile(type, account) { return get(`/wallet/bank/search/user-profile?type=${type}&account=${account}`) } +/** + * 获取用户身份信息 + * @returns {Promise} 返回用户身份权限信息 + */ +export function getUserIdentity() { + return get('/app/h5/1911661502909562881/identity') +} + /** * 格式化时间戳为可读格式 * @param {number} timestamp - 时间戳(毫秒) diff --git a/src/components/team/TeamBillMore.vue b/src/components/team/TeamBillMore.vue index 8d8623a..851af42 100644 --- a/src/components/team/TeamBillMore.vue +++ b/src/components/team/TeamBillMore.vue @@ -1,115 +1,79 @@ @@ -117,12 +81,7 @@