diff --git a/src/api/wallet.js b/src/api/wallet.js index c43e4eb..a574efd 100644 --- a/src/api/wallet.js +++ b/src/api/wallet.js @@ -145,6 +145,35 @@ export function getTeamApplyRecord(teamId, status) { return get(`/team/user/apply/record?teamId=${teamId}&status=${status}`) } + +/** + * 获取自己的申请记录 + * @returns {Promise} 返回申请记录列表 + */ +export function getWaitApplyRecord() { + return get('/team/wait-apply/profile') +} + +/** + * 撤销申请 + * @param {string} applyId - 申请ID + * @returns {Promise} 返回撤销结果 + */ +export function cancelApply(id) { + return post('/team/user/join-apply-cancel', { id }) +} + +/** + * 处理申请(同意/拒绝) + * @param {Object} data - 处理数据 + * @param {string} data.id - 申请记录ID + * @param {string} data.status - 审核状态 (AGREE/REJECT) + * @returns {Promise} 返回处理结果 + */ +export function processUserApply(data) { + return post('/team/process/user/apply', data) +} + /** * 格式化时间戳为可读格式 * @param {number} timestamp - 时间戳(毫秒) diff --git a/src/views/AgencyCenterView.vue b/src/views/AgencyCenterView.vue index 99cc626..72ca239 100644 --- a/src/views/AgencyCenterView.vue +++ b/src/views/AgencyCenterView.vue @@ -156,6 +156,7 @@ import { useRouter } from 'vue-router' import MobileHeader from '../components/MobileHeader.vue' import { get } from '../utils/http.js' import {getBankBalance} from "@/api/wallet.js"; +import {getTeamId} from "@/utils/userStore.js"; const router = useRouter() @@ -232,7 +233,7 @@ const fetchTeamMemberCount = async () => { try { loadingMemberCount.value = true // 使用传入的teamId,这里使用示例中的ID - const teamId = '1927993836921233409' + const teamId = getTeamId() const response = await get(`/team/members/count?id=${teamId}`) diff --git a/src/views/ApplyView.vue b/src/views/ApplyView.vue index b0aaa79..0852be1 100644 --- a/src/views/ApplyView.vue +++ b/src/views/ApplyView.vue @@ -18,7 +18,6 @@ type="text" placeholder="Please enter the agent ID" class="agent-input" - @input="onAgentIdChange" /> @@ -36,7 +35,7 @@ > {{ isLoading ? 'Applying...' : 'Apply' }} - +
您已有在处理中的申请,请等待审核结果
@@ -46,16 +45,37 @@{{ record.reason }}
-{{ new Date(record.createTime).toLocaleString() }}
+申请加入团队:
+Team ID: {{ record.teamProfile?.id }}
+{{ record.teamProfile?.country?.countryName }} ({{ record.teamProfile?.country?.countryCode }})
+团队所有者:
+{{ record.ownUserProfile?.userNickname }}
+ID: {{ record.ownUserProfile?.account }}
+