From 422a69d5a22e40879526a6927e204d6c5f78fb0d Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Tue, 19 Aug 2025 16:49:48 +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=93-?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/agents.js | 18 ++++--- pages/agents/agents.vue | 108 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 112 insertions(+), 14 deletions(-) diff --git a/api/agents.js b/api/agents.js index 947dde9..12a11f5 100644 --- a/api/agents.js +++ b/api/agents.js @@ -1,5 +1,5 @@ import { post } from '@/utils/request' -import { get } from '../utils/request' +import { get, request } from '../utils/request' /** * 代理商相关API接口 @@ -30,15 +30,17 @@ export function getAgentApplicationStatus(phone) { /** * 获取代理商协议 - * @returns {Promise} 返回协议内容 + * @returns {Promise} 返回隐私政策数据 */ export function getAgentAgreement() { - return ( - get('/app/article/getNew'), - { - type: 3, // 3表示代理商协议 - } - ) + return request({ + url: '/app/article/getNew', + method: 'GET', + params: { + appId: '1', + type: '3', // 2:隐私政策 + }, + }) } /** diff --git a/pages/agents/agents.vue b/pages/agents/agents.vue index 3bc4b78..830ba3a 100644 --- a/pages/agents/agents.vue +++ b/pages/agents/agents.vue @@ -85,6 +85,22 @@ + + + + + + 代理商协议 + × + + + + + + + + + @@ -128,6 +144,7 @@ export default { submitting: false, serviceAreas: [], agreementContent: '', + showAgreementModal: false, // 区域ID映射 areaIdMap: {}, } @@ -221,12 +238,12 @@ export default { // 显示代理商协议 showAgreement() { - uni.showModal({ - title: '代理商协议', - content: this.agreementContent, - showCancel: false, - confirmText: '我知道了', - }) + this.showAgreementModal = true + }, + + // 隐藏代理商协议 + hideAgreement() { + this.showAgreementModal = false }, // 验证表单数据 @@ -539,4 +556,83 @@ export default { } } } + +// 代理商协议模态框样式 +.agreement-modal-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + z-index: 9999; + display: flex; + align-items: center; + justify-content: center; +} + +.agreement-modal { + width: 90%; + max-width: 600rpx; + max-height: 80%; + background: #ffffff; + border-radius: 20rpx; + overflow: hidden; + display: flex; + flex-direction: column; +} + +.agreement-modal-header { + padding: 30rpx; + border-bottom: 1rpx solid #e8e8e8; + display: flex; + align-items: center; + justify-content: space-between; + background: #f8f8f8; + + .agreement-modal-title { + font-size: 32rpx; + font-weight: bold; + color: #333; + } + + .agreement-modal-close { + font-size: 40rpx; + color: #999; + cursor: pointer; + padding: 10rpx; + } +} + +.agreement-modal-content { + flex: 1; + padding:50rpx; + max-width: 500rpx; + max-height: 600rpx; + overflow-y: auto; +} + +.agreement-modal-footer { + padding: 30rpx; + border-top: 1rpx solid #e8e8e8; + background: #f8f8f8; + + .agreement-modal-btn { + width: 100%; + height: 80rpx; + background: #f15a04; + color: #ffffff; + border: none; + border-radius: 12rpx; + font-size: 28rpx; + font-weight: bold; + display: flex; + align-items: center; + justify-content: center; + + &:active { + transform: scale(0.98); + } + } +}