hookehuyr

refactor(协议弹框): 将支付协议弹框替换为用户服务协议组件

统一使用UserServiceAgreementModal组件替换多处支付协议弹框实现
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 <view class="checkbox-text"> 31 <view class="checkbox-text">
32 <text>我已阅读并同意</text> 32 <text>我已阅读并同意</text>
33 <text class="agreement-link" @tap.stop="showProtocol"> 33 <text class="agreement-link" @tap.stop="showProtocol">
34 -支付协议》 34 +用户服务协议》
35 </text> 35 </text>
36 </view> 36 </view>
37 </nut-checkbox> 37 </nut-checkbox>
...@@ -75,33 +75,12 @@ ...@@ -75,33 +75,12 @@
75 </div> 75 </div>
76 </div> 76 </div>
77 77
78 - <!-- 支付协议弹框 --> 78 + <!-- 用户服务协议弹框 -->
79 - <nut-popup 79 + <UserServiceAgreementModal
80 - v-model:visible="protocolVisible" 80 + v-model:visible="protocolVisible"
81 - position="right" 81 + @confirm="() => { protocolVisible = false; isChecked = true; }"
82 - :closeable="true" 82 + @cancel="protocolVisible = false"
83 - :close-on-click-overlay="true" 83 + />
84 - :safe-area-inset-bottom="true"
85 - :style="{ width: '100%', height: '100%' }"
86 - @close="protocolVisible = false"
87 - >
88 - <view class="protocol-container">
89 - <!-- 标题栏 -->
90 - <view class="protocol-header">
91 - <text class="protocol-title">支付协议</text>
92 - <view class="close-btn" @click="protocolVisible = false">
93 - <text class="close-text">×</text>
94 - </view>
95 - </view>
96 -
97 - <!-- 内容区域 -->
98 - <scroll-view class="protocol-scroll" :scroll-y="true">
99 - <view class="protocol-body">
100 - <view class="protocol-text">{{ protocolContent }}</view>
101 - </view>
102 - </scroll-view>
103 - </view>
104 - </nut-popup>
105 </nut-popup> 84 </nut-popup>
106 </template> 85 </template>
107 86
...@@ -109,6 +88,7 @@ ...@@ -109,6 +88,7 @@
109 import { ref, computed, onMounted } from 'vue' 88 import { ref, computed, onMounted } from 'vue'
110 import { useUserStore } from '@/stores/user' 89 import { useUserStore } from '@/stores/user'
111 import Taro from '@tarojs/taro' 90 import Taro from '@tarojs/taro'
91 +import UserServiceAgreementModal from '@/components/UserServiceAgreementModal.vue'
112 92
113 // 导入接口 93 // 导入接口
114 import { updateProfileAPI, getProfileAPI, bindJeePayAPI } from '@/api/index' 94 import { updateProfileAPI, getProfileAPI, bindJeePayAPI } from '@/api/index'
...@@ -163,7 +143,7 @@ const paymentDescription = ref('交易金额会在交易完成后的3个工作 ...@@ -163,7 +143,7 @@ const paymentDescription = ref('交易金额会在交易完成后的3个工作
163 // 扣费说明内容 143 // 扣费说明内容
164 const feeDescription = ref('在每笔交易过程中,平台将抽取最终成交金额的1%作为平台服务费。') 144 const feeDescription = ref('在每笔交易过程中,平台将抽取最终成交金额的1%作为平台服务费。')
165 145
166 -// 支付协议内容 146 +// 用户服务协议内容
167 const protocolContent = ref(` 147 const protocolContent = ref(`
168 1. 用户在使用捡个电驴收款服务时,需遵守相关法律法规。 148 1. 用户在使用捡个电驴收款服务时,需遵守相关法律法规。
169 2. 平台有权对异常交易进行风险控制。 149 2. 平台有权对异常交易进行风险控制。
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
78 <view class="content-text" v-html="contentText"></view> 78 <view class="content-text" v-html="contentText"></view>
79 </view> 79 </view>
80 </scroll-view> 80 </scroll-view>
81 - 81 +
82 <!-- 底部按钮 --> 82 <!-- 底部按钮 -->
83 <view class="modal-footer"> 83 <view class="modal-footer">
84 <nut-button type="primary" block color="#fb923c" @click="onCloseContentModal"> 84 <nut-button type="primary" block color="#fb923c" @click="onCloseContentModal">
...@@ -132,63 +132,6 @@ const modalVisible = computed({ ...@@ -132,63 +132,6 @@ const modalVisible = computed({
132 } 132 }
133 }) 133 })
134 134
135 -// 用户服务协议内容
136 -const userAgreementContent = `
137 -<div class="agreement-section">
138 - <div class="section-title">1.总则</div>
139 - <div class="section-content">
140 - <div class="clause-item">用户在使用本平台(以下简称"平台")服务前,请务必仔细阅读并同意本协议。</div>
141 - <div class="clause-item">注册或使用即视为接受本协议全部条款,包括免责声明及责任限制。</div>
142 - </div>
143 -</div>
144 -
145 -<div class="agreement-section">
146 - <div class="section-title">2.服务内容</div>
147 - <div class="section-content">
148 - <div class="clause-item">平台仅为校园用户提供二手电动车交易信息发布、浏览及沟通的中介服务,不参与实际交易(如定价、支付、交付),亦不保证车辆质量、合法性或卖家描述的真实性。</div>
149 - </div>
150 -</div>
151 -
152 -<div class="agreement-section">
153 - <div class="section-title">3.用户义务</div>
154 - <div class="section-content">
155 - <div class="clause-item">实名认证:需通过手机号注册,并提供真实学生身份信息(如校园邮箱/学号)。</div>
156 - <div class="clause-item">信息真实性:卖家需如实描述车辆状况(如年限、里程、维修记录),禁止虚假宣传。</div>
157 - <div class="clause-item">合法交易:禁止交易赃车、改装车或不符合校园安全规定的车辆。</div>
158 - </div>
159 -</div>
160 -
161 -<div class="agreement-section">
162 - <div class="section-title">4.责任限制与免责</div>
163 - <div class="section-content">
164 - <div class="clause-item">交易风险自担:平台不对车辆质量、权属纠纷或交易损失承担责任,用户需自行验车并签订书面交易协议。</div>
165 - <div class="clause-item">纠纷处理:如发生争议,用户应协商解决或通过法律途径处理,平台无义务参与调解。</div>
166 - <div class="clause-item">服务中断:因技术维护、不可抗力导致的服务暂停,平台不承担赔偿责任。</div>
167 - </div>
168 -</div>
169 -
170 -<div class="agreement-section">
171 - <div class="section-title">5.知识产权</div>
172 - <div class="section-content">
173 - <div class="clause-item">平台所有内容(包括Logo、界面设计)版权归开发者所有,未经许可不得复制、商用。</div>
174 - </div>
175 -</div>
176 -
177 -<div class="agreement-section">
178 - <div class="section-title">6.协议修改</div>
179 - <div class="section-content">
180 - <div class="clause-item">平台有权修订本协议,修改后将通过公告或站内通知生效,继续使用视为接受新条款。</div>
181 - </div>
182 -</div>
183 -
184 -<div class="agreement-section">
185 - <div class="section-title">7.关键免责条款强化建议</div>
186 - <div class="section-content">
187 - <div class="clause-item">平台仅提供信息服务,交易风险由用户自行承担。任何车辆质量问题、权属纠纷或资金损失均与平台无关。</div>
188 - </div>
189 -</div>
190 -`
191 -
192 // 隐私政策内容 135 // 隐私政策内容
193 const privacyPolicyContent = ` 136 const privacyPolicyContent = `
194 <div class="agreement-section"> 137 <div class="agreement-section">
......
1 <!-- 1 <!--
2 * @Date: 2023-12-20 14:11:11 2 * @Date: 2023-12-20 14:11:11
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-08-08 10:33:57 4 + * @LastEditTime: 2025-08-11 10:15:24
5 * @FilePath: /jgdl/src/components/paycard.vue 5 * @FilePath: /jgdl/src/components/paycard.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 <view class="checkbox-text"> 19 <view class="checkbox-text">
20 <text>我已阅读并同意</text> 20 <text>我已阅读并同意</text>
21 <text class="agreement-link" @tap.stop="showProtocol"> 21 <text class="agreement-link" @tap.stop="showProtocol">
22 -支付协议》 22 +用户服务协议》
23 </text> 23 </text>
24 </view> 24 </view>
25 </nut-checkbox> 25 </nut-checkbox>
...@@ -37,32 +37,12 @@ ...@@ -37,32 +37,12 @@
37 </view> 37 </view>
38 </nut-action-sheet> 38 </nut-action-sheet>
39 39
40 - <!-- 支付协议弹框 --> 40 + <!-- 用户服务协议弹框 -->
41 - <nut-popup 41 + <UserServiceAgreementModal
42 v-model:visible="protocolVisible" 42 v-model:visible="protocolVisible"
43 - position="right" 43 + @confirm="() => { protocolVisible = false; isChecked = true; }"
44 - :close-on-click-overlay="true" 44 + @cancel="protocolVisible = false"
45 - :safe-area-inset-bottom="true" 45 + />
46 - :style="{ width: '100%', height: '100%' }"
47 - @close="protocolVisible = false"
48 - >
49 - <view class="protocol-container">
50 - <!-- 标题栏 -->
51 - <view class="protocol-header">
52 - <text class="protocol-title">支付协议</text>
53 - <view class="close-btn" @click="protocolVisible = false">
54 - <text class="close-text">×</text>
55 - </view>
56 - </view>
57 -
58 - <!-- 内容区域 -->
59 - <scroll-view class="protocol-scroll" :scroll-y="true">
60 - <view class="protocol-body">
61 - <view class="protocol-text">{{ protocolContent }}</view>
62 - </view>
63 - </scroll-view>
64 - </view>
65 - </nut-popup>
66 </div> 46 </div>
67 </template> 47 </template>
68 48
...@@ -72,6 +52,7 @@ import { ref, watch, onMounted, onUnmounted } from 'vue' ...@@ -72,6 +52,7 @@ import { ref, watch, onMounted, onUnmounted } from 'vue'
72 import { getCurrentPageUrl } from "@/utils/weapp"; 52 import { getCurrentPageUrl } from "@/utils/weapp";
73 import { payAPI, payCheckAPI, getProfileAPI, updateProfileAPI } from '@/api/index' 53 import { payAPI, payCheckAPI, getProfileAPI, updateProfileAPI } from '@/api/index'
74 import { useUserStore } from '@/stores/user' 54 import { useUserStore } from '@/stores/user'
55 +import UserServiceAgreementModal from '@/components/UserServiceAgreementModal.vue'
75 56
76 /** 57 /**
77 * 格式化时间 58 * 格式化时间
...@@ -114,7 +95,7 @@ const protocolVisible = ref(false); ...@@ -114,7 +95,7 @@ const protocolVisible = ref(false);
114 // 支付loading状态 95 // 支付loading状态
115 const isPaymentLoading = ref(false); 96 const isPaymentLoading = ref(false);
116 97
117 -// 支付协议内容 98 +// 用户服务协议内容
118 const protocolContent = ref(` 99 const protocolContent = ref(`
119 1. 用户在使用捡个电驴支付服务时,需遵守相关法律法规。 100 1. 用户在使用捡个电驴支付服务时,需遵守相关法律法规。
120 2. 平台有权对异常交易进行风险控制。 101 2. 平台有权对异常交易进行风险控制。
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-08-05 20:33:55 4 + * @LastEditTime: 2025-08-11 10:09:54
5 * @FilePath: /jgdl/src/pages/authCar/index.vue 5 * @FilePath: /jgdl/src/pages/authCar/index.vue
6 * @Description: 认证车源 6 * @Description: 认证车源
7 --> 7 -->
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
107 <view class="checkbox-text"> 107 <view class="checkbox-text">
108 <text>我已阅读并同意</text> 108 <text>我已阅读并同意</text>
109 <text class="agreement-link" @tap.stop="showProtocol"> 109 <text class="agreement-link" @tap.stop="showProtocol">
110 -支付协议》 110 +用户服务协议》
111 </text> 111 </text>
112 </view> 112 </view>
113 </nut-checkbox> 113 </nut-checkbox>
...@@ -131,33 +131,12 @@ ...@@ -131,33 +131,12 @@
131 </view> 131 </view>
132 </nut-popup> 132 </nut-popup>
133 133
134 - <!-- 支付协议弹框 --> 134 + <!-- 用户服务协议弹框 -->
135 - <nut-popup 135 + <UserServiceAgreementModal
136 v-model:visible="protocolVisible" 136 v-model:visible="protocolVisible"
137 - position="right" 137 + @confirm="() => { protocolVisible = false; isChecked = true; }"
138 - :closeable="true" 138 + @cancel="protocolVisible = false"
139 - :close-on-click-overlay="true" 139 + />
140 - :safe-area-inset-bottom="true"
141 - :style="{ width: '100%', height: '100%' }"
142 - @close="protocolVisible = false"
143 - >
144 - <view class="protocol-container">
145 - <!-- 标题栏 -->
146 - <view class="protocol-header">
147 - <text class="protocol-title">支付协议</text>
148 - <view class="close-btn" @click="protocolVisible = false">
149 - <text class="close-text">×</text>
150 - </view>
151 - </view>
152 -
153 - <!-- 内容区域 -->
154 - <scroll-view class="protocol-scroll" :scroll-y="true">
155 - <view class="protocol-body">
156 - <view class="protocol-text">{{ protocolContent }}</view>
157 - </view>
158 - </scroll-view>
159 - </view>
160 - </nut-popup>
161 </view> 140 </view>
162 </template> 141 </template>
163 142
...@@ -167,6 +146,7 @@ import { ref, computed, onMounted } from 'vue' ...@@ -167,6 +146,7 @@ import { ref, computed, onMounted } from 'vue'
167 import { Check, Heart1, HeartFill } from '@nutui/icons-vue-taro' 146 import { Check, Heart1, HeartFill } from '@nutui/icons-vue-taro'
168 import { useFavorite } from '@/composables/useFavorite' 147 import { useFavorite } from '@/composables/useFavorite'
169 import BannerSwiper from '@/components/BannerSwiper.vue' 148 import BannerSwiper from '@/components/BannerSwiper.vue'
149 +import UserServiceAgreementModal from '@/components/UserServiceAgreementModal.vue'
170 import './index.less' 150 import './index.less'
171 // 接口导入 151 // 接口导入
172 import { getVehicleListAPI, getArticleListAPI } from '@/api/car'; 152 import { getVehicleListAPI, getArticleListAPI } from '@/api/car';
...@@ -210,7 +190,7 @@ const isChecked = ref(false) ...@@ -210,7 +190,7 @@ const isChecked = ref(false)
210 const hasAgreed = ref(false) 190 const hasAgreed = ref(false)
211 const protocolVisible = ref(false) 191 const protocolVisible = ref(false)
212 192
213 -// 支付协议内容 193 +// 用户服务协议内容
214 const protocolContent = ref(` 194 const protocolContent = ref(`
215 1. 用户在使用捡个电驴收款服务时,需遵守相关法律法规。 195 1. 用户在使用捡个电驴收款服务时,需遵守相关法律法规。
216 2. 平台有权对异常交易进行风险控制。 196 2. 平台有权对异常交易进行风险控制。
......