From a2b8aa1c2310b9cda47b03f9f6ee22c627799fa9 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 18 Aug 2025 18:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87=E5=92=8C?= =?UTF-8?q?=E6=8B=92=E7=BB=9D=E6=8E=A5=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wallet.js | 29 +++++++ src/views/AgencyCenterView.vue | 3 +- src/views/ApplyView.vue | 143 +++++++++++++++++++++++++------ src/views/MessageView.vue | 57 +++++++++--- src/views/PlatformPolicyView.vue | 6 +- src/views/TeamMemberView.vue | 3 +- 6 files changed, 195 insertions(+), 46 deletions(-) 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 }}
+