From 8f8873c5c6a8b12833661b020fe22d3dba804d96 Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Tue, 19 Aug 2025 16:38:21 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E4=BB=A3=E7=90=86=E5=95=86?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8A=A8=E6=80=81=E6=B8=B2=E6=9F=930.3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/agents.js | 50 ++++++++
pages/agents/agents.vue | 246 ++++++++++++++++++++++++++++++++++------
2 files changed, 259 insertions(+), 37 deletions(-)
create mode 100644 api/agents.js
diff --git a/api/agents.js b/api/agents.js
new file mode 100644
index 0000000..947dde9
--- /dev/null
+++ b/api/agents.js
@@ -0,0 +1,50 @@
+import { post } from '@/utils/request'
+import { get } from '../utils/request'
+
+/**
+ * 代理商相关API接口
+ */
+
+/**
+ * 申请成为代理商
+ * @param {Object} data - 代理商申请信息
+ * @param {string} data.name - 姓名
+ * @param {string} data.phone - 手机号
+ * @param {string} data.idCard - 身份证号
+ * @param {string} data.regionId - 行政区ID
+ * @param {string} data.address - 详细地址
+ * @returns {Promise} 返回申请结果
+ */
+export function applyForAgent(data) {
+ return post('/app/agent', data)
+}
+
+/**
+ * 获取代理商申请状态
+ * @param {string} phone - 手机号
+ * @returns {Promise} 返回申请状态
+ */
+export function getAgentApplicationStatus(phone) {
+ return post('/app/agent/status', { phone })
+}
+
+/**
+ * 获取代理商协议
+ * @returns {Promise} 返回协议内容
+ */
+export function getAgentAgreement() {
+ return (
+ get('/app/article/getNew'),
+ {
+ type: 3, // 3表示代理商协议
+ }
+ )
+}
+
+/**
+ * 获取服务区域列表
+ * @returns {Promise} 返回区域列表
+ */
+export function getServiceAreas() {
+ return get('/app/region')
+}
diff --git a/pages/agents/agents.vue b/pages/agents/agents.vue
index 159fbda..3bc4b78 100644
--- a/pages/agents/agents.vue
+++ b/pages/agents/agents.vue
@@ -79,8 +79,8 @@
-
@@ -90,6 +90,7 @@