5d5e4447 by 张猛

团体支付

1 parent f6e7f935
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="cn.fjdmy.uniapp.UniappProjectDataService">
4 <option name="basePath" value="$PROJECT_DIR$" />
5 <option name="generalBasePath" value="$PROJECT_DIR$" />
6 <option name="manifestPath" value="$PROJECT_DIR$/manifest.json" />
7 <option name="pagesPath" value="$PROJECT_DIR$/pages.json" />
8 <option name="scanNum" value="1" />
9 <option name="type" value="store" />
10 <option name="uniapp" value="true" />
11 <option name="uniappHx" value="true" />
12 <option name="vueVersion" value="3" />
13 </component>
14 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <component name="InspectionProjectProfileManager">
2 <profile version="1.0">
3 <option name="myName" value="Project Default" />
4 <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5 <inspection_tool class="HtmlDeprecatedAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
6 <inspection_tool class="JSEqualityComparisonWithCoercion" enabled="false" level="WARNING" enabled_by_default="false" />
7 <inspection_tool class="JSUnresolvedReference" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
8 </profile>
9 </component>
...\ No newline at end of file ...\ No newline at end of file
...@@ -10,12 +10,12 @@ import to from 'await-to-js' ...@@ -10,12 +10,12 @@ import to from 'await-to-js'
10 10
11 /** 错误消息映射表 */ 11 /** 错误消息映射表 */
12 const ERROR_MESSAGES = { 12 const ERROR_MESSAGES = {
13 USER_CANCEL: '支付已取消', 13 USER_CANCEL: '支付已取消',
14 NETWORK_ERROR: '网络异常,请检查网络连接', 14 NETWORK_ERROR: '网络异常,请检查网络连接',
15 INVALID_PARAMS: '参数错误', 15 INVALID_PARAMS: '参数错误',
16 DECRYPT_FAILED: '数据解密失败', 16 DECRYPT_FAILED: '数据解密失败',
17 PARSE_FAILED: '数据解析失败', 17 PARSE_FAILED: '数据解析失败',
18 PAY_INFO_MISSING: '支付信息缺失' 18 PAY_INFO_MISSING: '支付信息缺失'
19 } 19 }
20 20
21 /** 21 /**
...@@ -27,68 +27,72 @@ const ERROR_MESSAGES = { ...@@ -27,68 +27,72 @@ const ERROR_MESSAGES = {
27 * @throws {Error} 支付过程中发生的错误 27 * @throws {Error} 支付过程中发生的错误
28 */ 28 */
29 async function minShengPay(orderId, encryptedData) { 29 async function minShengPay(orderId, encryptedData) {
30 uni.showLoading({ 30 uni.showLoading({
31 title: '生成支付...', 31 title: '生成支付...',
32 mask: true 32 mask: true
33 }) 33 })
34 34
35 // 参数校验 35 // 参数校验
36 if (!orderId) { 36 if (!orderId) {
37 console.error('minShengPay: orderId is required') 37 console.error('minShengPay: orderId is required')
38 handlePaymentError(new Error(ERROR_MESSAGES.INVALID_PARAMS), null) 38 handlePaymentError(new Error(ERROR_MESSAGES.INVALID_PARAMS), null)
39 } 39 }
40 40
41 if (!encryptedData) { 41 if (!encryptedData) {
42 handlePaymentError(new Error(ERROR_MESSAGES.INVALID_PARAMS), orderId) 42 handlePaymentError(new Error(ERROR_MESSAGES.INVALID_PARAMS), orderId)
43 } 43 }
44 44
45 // 1. 数据准备:将表单数据转换为 URL 编码格式 45 // 1. 数据准备:将表单数据转换为 URL 编码格式
46 const encodedData = buildUrlEncodedData({ 46 const encodedData = buildUrlEncodedData({
47 context: encryptedData 47 context: encryptedData
48 }) 48 })
49 49
50 // 2. 请求支付凭证 50 // 2. 请求支付凭证
51 const [reqErr, res] = await to(requestPaymentCredential(encodedData)) 51 const [reqErr, res] = await to(requestPaymentCredential(encodedData))
52 if (reqErr) { 52 if (reqErr) {
53 handlePaymentError(reqErr, orderId) 53 handlePaymentError(reqErr, orderId)
54 } 54 }
55 55
56 // 3. 响应验证 56 // 3. 响应验证
57 if (!res?.data?.businessContext) { 57 if (!res?.data?.businessContext) {
58 handlePaymentError({ 58 handlePaymentError({
59 message: res?.data?.gateReturnMessage 59 message: res?.data?.gateReturnMessage
60 }, orderId) 60 }, orderId)
61 } 61 }
62 62
63 // 4. 解密并处理数据 63 // 4. 解密并处理数据
64 const [decryptErr, decryptResult] = await to(decrypt({ 64 const [decryptErr, decryptResult] = await to(decrypt({
65 bussinessContext: res.data.businessContext 65 bussinessContext: res.data.businessContext
66 })) 66 }))
67 67
68 if (decryptErr || !decryptResult?.data) { 68 if (decryptErr || !decryptResult?.data) {
69 handlePaymentError(new Error(ERROR_MESSAGES.DECRYPT_FAILED), orderId) 69 handlePaymentError(new Error(ERROR_MESSAGES.DECRYPT_FAILED), orderId)
70 } 70 }
71 71
72 // 5. 解析 JSON 数据 72 // 5. 解析 JSON 数据
73 const parsedData = safeJsonParse(decryptResult.data) 73 const parsedData = safeJsonParse(decryptResult.data)
74 if (!parsedData) { 74 if (!parsedData) {
75 handlePaymentError(new Error(ERROR_MESSAGES.PARSE_FAILED), orderId) 75 handlePaymentError(new Error(ERROR_MESSAGES.PARSE_FAILED), orderId)
76 } 76 }
77 77
78 // 6. 验证支付信息 78 // 6. 验证支付信息
79 if (!parsedData.payInfo) { 79 if (!parsedData.payInfo) {
80 handlePaymentError(new Error(ERROR_MESSAGES.PAY_INFO_MISSING), orderId) 80 handlePaymentError(new Error(ERROR_MESSAGES.PAY_INFO_MISSING), orderId)
81 } 81 }
82 82
83 // 7. 解析支付参数 83 // 7. 解析支付参数
84 const payParams = parsePayInfo(parsedData.payInfo) 84 const payParams = parsePayInfo(parsedData.payInfo)
85 85
86 uni.hideLoading() 86 uni.hideLoading()
87 // 8. 调起微信支付 87 // 8. 调起微信支付
88 const [payErr] = await to(invokeWechatPayment(payParams, orderId)) 88 const [payErr, paySuccess] = await to(invokeWechatPayment(payParams, orderId))
89 if (payErr) { 89 if (payErr) {
90 handlePaymentError(payErr, orderId) 90 handlePaymentError(payErr, orderId)
91 } 91
92 }
93 if (paySuccess) {
94 return paySuccess
95 }
92 } 96 }
93 97
94 /** 98 /**
...@@ -97,9 +101,9 @@ async function minShengPay(orderId, encryptedData) { ...@@ -97,9 +101,9 @@ async function minShengPay(orderId, encryptedData) {
97 * @returns {string} URL 编码格式字符串 101 * @returns {string} URL 编码格式字符串
98 */ 102 */
99 function buildUrlEncodedData(data) { 103 function buildUrlEncodedData(data) {
100 return Object.entries(data) 104 return Object.entries(data)
101 .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) 105 .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
102 .join('&') 106 .join('&')
103 } 107 }
104 108
105 /** 109 /**
...@@ -109,14 +113,14 @@ function buildUrlEncodedData(data) { ...@@ -109,14 +113,14 @@ function buildUrlEncodedData(data) {
109 * @returns {Promise<Object>} 支付凭证响应 113 * @returns {Promise<Object>} 支付凭证响应
110 */ 114 */
111 function requestPaymentCredential(encodedData) { 115 function requestPaymentCredential(encodedData) {
112 return uni.request({ 116 return uni.request({
113 url: config.payUrl, 117 url: config.payUrl,
114 method: 'POST', 118 method: 'POST',
115 header: { 119 header: {
116 'Content-Type': 'application/x-www-form-urlencoded' 120 'Content-Type': 'application/x-www-form-urlencoded'
117 }, 121 },
118 data: encodedData 122 data: encodedData
119 }) 123 })
120 } 124 }
121 125
122 /** 126 /**
...@@ -126,11 +130,11 @@ function requestPaymentCredential(encodedData) { ...@@ -126,11 +130,11 @@ function requestPaymentCredential(encodedData) {
126 * @returns {Promise<Object>} 解密后的数据 130 * @returns {Promise<Object>} 解密后的数据
127 */ 131 */
128 function decrypt(params) { 132 function decrypt(params) {
129 return request({ 133 return request({
130 url: `/api/decrypt`, 134 url: `/api/decrypt`,
131 method: 'post', 135 method: 'post',
132 params 136 params
133 }) 137 })
134 } 138 }
135 139
136 /** 140 /**
...@@ -139,12 +143,12 @@ function decrypt(params) { ...@@ -139,12 +143,12 @@ function decrypt(params) {
139 * @returns {Object|null} 解析后的对象,解析失败返回 null 143 * @returns {Object|null} 解析后的对象,解析失败返回 null
140 */ 144 */
141 function safeJsonParse(jsonString) { 145 function safeJsonParse(jsonString) {
142 try { 146 try {
143 return JSON.parse(jsonString) 147 return JSON.parse(jsonString)
144 } catch (e) { 148 } catch (e) {
145 console.error('JSON parse error:', e) 149 console.error('JSON parse error:', e)
146 return null 150 return null
147 } 151 }
148 } 152 }
149 153
150 /** 154 /**
...@@ -157,24 +161,24 @@ function safeJsonParse(jsonString) { ...@@ -157,24 +161,24 @@ function safeJsonParse(jsonString) {
157 * parsePayInfo('appId=wx123|prepayId=abc|') 161 * parsePayInfo('appId=wx123|prepayId=abc|')
158 */ 162 */
159 function parsePayInfo(payInfoStr) { 163 function parsePayInfo(payInfoStr) {
160 if (!payInfoStr || typeof payInfoStr !== 'string') { 164 if (!payInfoStr || typeof payInfoStr !== 'string') {
161 return {} 165 return {}
162 } 166 }
163 167
164 const result = {} 168 const result = {}
165 169
166 payInfoStr.split('|').forEach(item => { 170 payInfoStr.split('|').forEach(item => {
167 if (!item) return 171 if (!item) return
168 172
169 const index = item.indexOf('=') 173 const index = item.indexOf('=')
170 if (index === -1) return 174 if (index === -1) return
171 175
172 const key = item.substring(0, index) 176 const key = item.substring(0, index)
173 const value = item.substring(index + 1) 177 const value = item.substring(index + 1)
174 result[key] = value 178 result[key] = value
175 }) 179 })
176 180
177 return result 181 return result
178 } 182 }
179 183
180 /** 184 /**
...@@ -190,44 +194,44 @@ function parsePayInfo(payInfoStr) { ...@@ -190,44 +194,44 @@ function parsePayInfo(payInfoStr) {
190 * @returns {Promise<Object>} 支付结果 194 * @returns {Promise<Object>} 支付结果
191 */ 195 */
192 function invokeWechatPayment(payParams, orderId) { 196 function invokeWechatPayment(payParams, orderId) {
193 debugger 197 debugger
194 return new Promise((resolve, reject) => { 198 return new Promise((resolve, reject) => {
195 // 参数校验 199 // 参数校验
196 const requiredFields = ['appId', 'nonceStr', 'prepayId', 'timeStamp', 'signType', 'paySign'] 200 const requiredFields = ['appId', 'nonceStr', 'prepayId', 'timeStamp', 'signType', 'paySign']
197 const missingFields = requiredFields.filter(field => !payParams?.[field]) 201 const missingFields = requiredFields.filter(field => !payParams?.[field])
198 202
199 if (missingFields.length > 0) { 203 if (missingFields.length > 0) {
200 reject(new Error(`缺少必要支付参数: ${missingFields.join(', ')}`)) 204 reject(new Error(`缺少必要支付参数: ${missingFields.join(', ')}`))
201 return 205 return
202 } 206 }
203 207
204 uni.requestPayment({ 208 uni.requestPayment({
205 appId: payParams.appId, 209 appId: payParams.appId,
206 nonceStr: payParams.nonceStr, 210 nonceStr: payParams.nonceStr,
207 package: `prepay_id=${payParams.prepayId}`, 211 package: `prepay_id=${payParams.prepayId}`,
208 timeStamp: payParams.timeStamp, 212 timeStamp: payParams.timeStamp,
209 signType: payParams.signType, 213 signType: payParams.signType,
210 paySign: payParams.paySign, 214 paySign: payParams.paySign,
211 success: (res) => { 215 success: (res) => {
212 uni.showToast({ 216 uni.showToast({
213 title: '支付成功', 217 title: '支付成功',
214 duration: 2000, 218 duration: 2000,
215 complete: () => resolve(res) 219 complete: () => resolve(res)
216 }) 220 })
217 }, 221 },
218 fail: async (err) => { 222 fail: async (err) => {
219 debugger 223 debugger
220 // 用户取消支付 224 // 用户取消支付
221 if (err.errMsg?.includes('cancel')) { 225 if (err.errMsg?.includes('cancel')) {
222 await handleUserCancel(orderId) 226 await handleUserCancel(orderId)
223 reject(new Error('USER_CANCEL')) 227 reject(new Error('USER_CANCEL'))
224 } else { 228 } else {
225 await handlePaymentFailure(orderId, err) 229 await handlePaymentFailure(orderId, err)
226 reject(err) 230 reject(err)
227 } 231 }
228 } 232 }
229 }) 233 })
230 }) 234 })
231 } 235 }
232 236
233 /** 237 /**
...@@ -237,24 +241,24 @@ function invokeWechatPayment(payParams, orderId) { ...@@ -237,24 +241,24 @@ function invokeWechatPayment(payParams, orderId) {
237 * @returns {Promise<void>} 241 * @returns {Promise<void>}
238 */ 242 */
239 async function handleUserCancel(orderId) { 243 async function handleUserCancel(orderId) {
240 const [err] = await to(request({ 244 const [err] = await to(request({
241 url: 'cancelOrder', 245 url: 'cancelOrder',
242 method: 'get', 246 method: 'get',
243 params: { 247 params: {
244 orderId 248 orderId
245 } 249 }
246 })) 250 }))
247 251
248 if (err) { 252 if (err) {
249 console.error('取消订单失败:', err) 253 console.error('取消订单失败:', err)
250 return 254 return
251 } 255 }
252 256
253 uni.showToast({ 257 uni.showToast({
254 title: '支付取消', 258 title: '支付取消',
255 icon: 'none', 259 icon: 'none',
256 duration: 2000 260 duration: 2000
257 }) 261 })
258 } 262 }
259 263
260 /** 264 /**
...@@ -265,8 +269,8 @@ async function handleUserCancel(orderId) { ...@@ -265,8 +269,8 @@ async function handleUserCancel(orderId) {
265 * @returns {Promise<void>} 269 * @returns {Promise<void>}
266 */ 270 */
267 async function handlePaymentFailure(orderId, error) { 271 async function handlePaymentFailure(orderId, error) {
268 console.error(`支付失败 [订单: ${orderId}]:`, error) 272 console.error(`支付失败 [订单: ${orderId}]:`, error)
269 // 可在此处添加支付失败后的业务逻辑,如上报错误等 273 // 可在此处添加支付失败后的业务逻辑,如上报错误等
270 } 274 }
271 275
272 /** 276 /**
...@@ -276,21 +280,21 @@ async function handlePaymentFailure(orderId, error) { ...@@ -276,21 +280,21 @@ async function handlePaymentFailure(orderId, error) {
276 * @throws {Error} 始终抛出传入的错误对象 280 * @throws {Error} 始终抛出传入的错误对象
277 */ 281 */
278 function handlePaymentError(error, orderId) { 282 function handlePaymentError(error, orderId) {
279 uni.hideLoading() 283 uni.hideLoading()
280 284
281 const message = ERROR_MESSAGES[error?.message] || error?.message || '支付失败,请重试' 285 const message = ERROR_MESSAGES[error?.message] || error?.message || '支付失败,请重试'
282 286
283 uni.showToast({ 287 uni.showToast({
284 title: message, 288 title: message,
285 icon: 'none' 289 icon: 'none'
286 }) 290 })
287 291
288 // 记录错误日志,便于排查 292 // 记录错误日志,便于排查
289 console.error(`支付错误 [订单: ${orderId}]:`, error) 293 console.error(`支付错误 [订单: ${orderId}]:`, error)
290 294
291 throw error 295 throw error
292 } 296 }
293 297
294 export { 298 export {
295 minShengPay
296 }
...\ No newline at end of file ...\ No newline at end of file
299 minShengPay
300 }
......
1 // dev 1 // dev
2 // const baseUrl_api = 'http://192.168.1.137:8787' 2 const baseUrl_api = 'http://192.168.1.137:8787'
3 const baseUrl_api = 'http://tk001.wxjylt.com/stage-api' 3 // const baseUrl_api = 'http://tk001.wxjylt.com/stage-api'
4 const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' 4 const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
5 5
6 // prod 6 // prod
...@@ -10,4 +10,4 @@ const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' ...@@ -10,4 +10,4 @@ const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
10 export default { 10 export default {
11 baseUrl_api, 11 baseUrl_api,
12 payUrl 12 payUrl
13 }
...\ No newline at end of file ...\ No newline at end of file
13 }
......
1 <template> 1 <template>
2 <view :class="{ 'lock-scroll': popupShow }"> 2 <view :class="{ 'lock-scroll': popupShow }">
3 <view v-if="showDirectly&&directUnderFlag==0"> 3 <view v-if="showDirectly&&directUnderFlag==0">
4 <view class="flexbox"> 4 <view class="flexbox">
5 <view> 5 <view>
6 有效日期至 <text class="text-primary">{{form?.validityDate?.slice(0,10) }}</text> 6 有效日期至
7 </view> 7 <text class="text-primary">{{ form?.validityDate?.slice(0, 10) }}</text>
8 <view> 8 </view>
9 <text v-if="activeStatus==0&&authenticationStatusa" class="text-danger">未激活</text> 9 <view>
10 <text v-else> 10 <text v-if="activeStatus==0&&authenticationStatusa" class="text-danger">未激活</text>
11 <text v-if="authenticationStatusa == 0 ||!authenticationStatusa" class="text-danger">未认证</text> 11 <text v-else>
12 <text v-if="authenticationStatusa == 1" class="text-success">认证中</text> 12 <text v-if="authenticationStatusa == 0 ||!authenticationStatusa" class="text-danger">未认证</text>
13 <text v-if="authenticationStatusa == 2" class="text-success">已认证</text> 13 <text v-if="authenticationStatusa == 1" class="text-success">认证中</text>
14 <text v-if="authenticationStatusa == 3" class="text-danger">认证未通过</text> 14 <text v-if="authenticationStatusa == 2" class="text-success">已认证</text>
15 <text v-if="authenticationStatusa == 4" class="text-danger">即将过期</text> 15 <text v-if="authenticationStatusa == 3" class="text-danger">认证未通过</text>
16 <text v-if="authenticationStatusa == 5" class="text-danger">已过期</text> 16 <text v-if="authenticationStatusa == 4" class="text-danger">即将过期</text>
17 </text> 17 <text v-if="authenticationStatusa == 5" class="text-danger">已过期</text>
18 </view> 18 </text>
19 </view> 19 </view>
20 <view class="flexbox" style="justify-content: flex-end;padding: 0 30rpx 40rpx;"> 20 </view>
21 <button class="btn-red" style="margin: 0 20rpx 0 0;" size="mini" 21 <view class="flexbox" style="justify-content: flex-end;padding: 0 30rpx 40rpx;">
22 v-if="activeStatus==0&&authenticationStatusa" @click="payTheFees">激活</button> 22 <button v-if="activeStatus==0&&authenticationStatusa" class="btn-red" size="mini"
23 <view v-else> 23 style="margin: 0 20rpx 0 0;" @click="payTheFees">激活
24 <button class="btn-red" style="margin: 0 20rpx 0 0;" size="mini" 24 </button>
25 :disabled="auditStatus==1||auditStatus==2||form.isPoints==0" 25 <view v-else>
26 @click="showApplyDialog">考点申请</button> 26 <button :disabled="auditStatus==1||auditStatus==2||form.isPoints==0" class="btn-red" size="mini"
27 <button class="btn-red" style="margin: 0 20rpx 0 0;" size="mini" :disabled="btn" 27 style="margin: 0 20rpx 0 0;"
28 @click="payTheFees">去缴费</button> 28 @click="showApplyDialog">考点申请
29 <button class="btn-red-kx" style="margin: 0 20rpx 0 0;" size="mini" v-if="form.deptType!=1" 29 </button>
30 @click="auditEditFN">审核详情</button> 30 <button :disabled="btn" class="btn-red" size="mini" style="margin: 0 20rpx 0 0;"
31 </view> 31 @click="payTheFees">去缴费
32 </view> 32 </button>
33 </view> 33 <button v-if="form.deptType!=1" class="btn-red-kx" size="mini" style="margin: 0 20rpx 0 0;"
34 <view class="mainbox"> 34 @click="auditEditFN">审核详情
35 <uni-list> 35 </button>
36 <uni-list-item v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3" 36 </view>
37 title="所属协会" :rightText="form.aname"> 37 </view>
38 </uni-list-item> 38 </view>
39 <uni-list-item title="会员编号" v-if="form.menCode" :rightText="form.menCode" /> 39 <view class="mainbox">
40 <uni-list-item title="机构名称" :rightText="form.name" /> 40 <uni-list>
41 <uni-list-item title="所属省份"> 41 <uni-list-item v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3"
42 <template v-slot:footer> 42 :rightText="form.aname" title="所属协会">
43 <view class="frrr"> 43 </uni-list-item>
44 <uni-data-picker readonly :clear-icon="false" v-model="form.belongProvinceId" 44 <uni-list-item v-if="form.menCode" :rightText="form.menCode" title="会员编号"/>
45 :localdata="options"> 45 <uni-list-item :rightText="form.name" title="机构名称"/>
46 </uni-data-picker> 46 <uni-list-item title="所属省份">
47 </view> 47 <template v-slot:footer>
48 </template> 48 <view class="frrr">
49 </uni-list-item> 49 <uni-data-picker v-model="form.belongProvinceId" :clear-icon="false" :localdata="options"
50 <uni-list-item title="社会信用代码" 50 readonly>
51 v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3&&newResult||form.associateId&&form.associateId>0||activeStatus==1" 51 </uni-data-picker>
52 :rightText="form.creditCode" /> 52 </view>
53 <uni-list-item v-if="form.certSiteContact" title="联系人" :rightText="form.certSiteContact" /> 53 </template>
54 <uni-list-item v-else title="联系人" :rightText="form.contact" /> 54 </uni-list-item>
55 <uni-list-item v-if="form.certSiteTel" title="联系方式" :rightText="form.certSiteTel" /> 55 <uni-list-item
56 <uni-list-item v-else title="联系方式" :rightText="form.phone" /> 56 v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3&&newResult||form.associateId&&form.associateId>0||activeStatus==1"
57 <uni-list-item title="认证地址"> 57 :rightText="form.creditCode"
58 <template v-slot:footer> 58 title="社会信用代码"/>
59 <view class="frrr"> 59 <uni-list-item v-if="form.certSiteContact" :rightText="form.certSiteContact" title="联系人"/>
60 <uni-data-picker readonly :clear-icon="false" v-if="form.certRegionId" 60 <uni-list-item v-else :rightText="form.contact" title="联系人"/>
61 v-model="form.certRegionId" :localdata="options"> 61 <uni-list-item v-if="form.certSiteTel" :rightText="form.certSiteTel" title="联系方式"/>
62 </uni-data-picker> 62 <uni-list-item v-else :rightText="form.phone" title="联系方式"/>
63 <uni-data-picker readonly :clear-icon="false" v-else-if="form.certCityId" 63 <uni-list-item title="认证地址">
64 v-model="form.certCityId" :localdata="options"> 64 <template v-slot:footer>
65 </uni-data-picker> 65 <view class="frrr">
66 <uni-data-picker readonly :clear-icon="false" v-else-if="form.certProvinceId" 66 <uni-data-picker v-if="form.certRegionId" v-model="form.certRegionId" :clear-icon="false"
67 v-model="form.certProvinceId" :localdata="options"> 67 :localdata="options" readonly>
68 </uni-data-picker> 68 </uni-data-picker>
69 </view> 69 <uni-data-picker v-else-if="form.certCityId" v-model="form.certCityId" :clear-icon="false"
70 </template> 70 :localdata="options" readonly>
71 </uni-list-item> 71 </uni-data-picker>
72 <uni-list-item title="认证详细地址" :rightText="form.certAddress" /> 72 <uni-data-picker v-else-if="form.certProvinceId" v-model="form.certProvinceId" :clear-icon="false"
73 <uni-list-item title="法人姓名" :rightText="form.certLegal||'--'" /> 73 :localdata="options" readonly>
74 74 </uni-data-picker>
75 <uni-list-item v-if="form.deptType==6" title="是否为考点" :rightText="form.isPoints==0?'是':'否'" /> 75 </view>
76 <uni-list-item title="法人身份证" clickable> 76 </template>
77 <template v-slot:footer> 77 </uni-list-item>
78 <view v-if="form.legalIdcPhotoArr&&form.legalIdcPhotoArr?.length>0" class="frrr"> 78 <uni-list-item :rightText="form.certAddress" title="认证详细地址"/>
79 <image class="ylImage" mode="aspectFit" @click="showImage(form.legalIdcPhotoArr,index)" 79 <uni-list-item :rightText="form.certLegal||'--'" title="法人姓名"/>
80 v-for="(item,index) in form.legalIdcPhotoArr" :key="item" :src="item"> 80
81 </image> 81 <uni-list-item v-if="form.deptType==6" :rightText="form.isPoints==0?'是':'否'" title="是否为考点"/>
82 </view> 82 <uni-list-item clickable title="法人身份证">
83 </template> 83 <template v-slot:footer>
84 </uni-list-item> 84 <view v-if="form.legalIdcPhotoArr&&form.legalIdcPhotoArr?.length>0" class="frrr">
85 85 <image v-for="(item,index) in form.legalIdcPhotoArr" :key="item" :src="item"
86 <uni-list-item title="营业执照" clickable> 86 class="ylImage" mode="aspectFit" @click="showImage(form.legalIdcPhotoArr,index)">
87 <template v-slot:footer> 87 </image>
88 <view class="frrr" @click="download(form.businessLicenseArr[0]?.url)" 88 </view>
89 v-if="form.businessLicenseArr&&form.businessLicenseArr?.length>0"> 89 </template>
90 <text class="text-primary">{{form.businessLicenseArr[0]?.name}}</text> 90 </uni-list-item>
91 </view> 91
92 </template> 92 <uni-list-item clickable title="营业执照">
93 </uni-list-item> 93 <template v-slot:footer>
94 <uni-list-item title="机构照片" clickable> 94 <view v-if="form.businessLicenseArr&&form.businessLicenseArr?.length>0" class="frrr"
95 <template v-slot:footer> 95 @click="download(form.businessLicenseArr[0]?.url)">
96 <view class="frrr"> 96 <text class="text-primary">{{ form.businessLicenseArr[0]?.name }}</text>
97 <view v-if="form.picturesArr&&form.picturesArr?.length>0" class="photoBook" 97 </view>
98 @click="showImage(form.picturesArr,0)"> 98 </template>
99 <image mode="aspectFit" class="ylImage" :src="form.picturesArr[0]"> 99 </uni-list-item>
100 </image> 100 <uni-list-item clickable title="机构照片">
101 <text>{{form.picturesArr?.length}}</text> 101 <template v-slot:footer>
102 </view> 102 <view class="frrr">
103 </view> 103 <view v-if="form.picturesArr&&form.picturesArr?.length>0" class="photoBook"
104 </template> 104 @click="showImage(form.picturesArr,0)">
105 </uni-list-item> 105 <image :src="form.picturesArr[0]" class="ylImage" mode="aspectFit">
106 </uni-list> 106 </image>
107 </view> 107 <text>{{ form.picturesArr?.length }}</text>
108 <!-- 弹窗添加触摸事件拦截 --> 108 </view>
109 <uni-popup ref="applyPopup" type="center" @touchmove.stop.prevent="() => {}" @open="onPopupOpen" 109 </view>
110 @close="onPopupClose"> 110 </template>
111 <view class="apply-dialog" @touchmove.stop.prevent="() => {}"> 111 </uni-list-item>
112 <view class="dialog-title">考点申请</view> 112 </uni-list>
113 <view class="dialog-content"> 113 </view>
114 <text class="remind">友情提示:非考点无法申请级位考试</text> 114 <!-- 弹窗添加触摸事件拦截 -->
115 </view> 115 <uni-popup ref="applyPopup" type="center" @close="onPopupClose" @open="onPopupOpen"
116 <view class="dialog-buttons"> 116 @touchmove.stop.prevent="() => {}">
117 <button class="btn-cancel" @click="closeApplyDialog">暂不申请</button> 117 <view class="apply-dialog" @touchmove.stop.prevent="() => {}">
118 <button class="btn-confirm" @click="goToApplyPage">立即申请</button> 118 <view class="dialog-title">考点申请</view>
119 </view> 119 <view class="dialog-content">
120 </view> 120 <text class="remind">友情提示:非考点无法申请级位考试</text>
121 </uni-popup> 121 </view>
122 <view class="height1"></view> 122 <view class="dialog-buttons">
123 </view> 123 <button class="btn-cancel" @click="closeApplyDialog">暂不申请</button>
124 <button class="btn-confirm" @click="goToApplyPage">立即申请</button>
125 </view>
126 </view>
127 </uni-popup>
128 <view class="height1"></view>
129 </view>
124 </template> 130 </template>
125 131
126 <script setup> 132 <script setup>
127 import * as api from '@/common/api.js' 133 import * as api from '@/common/api.js'
128 import config from '@/config.js' 134 import config from '@/config.js'
129 import * as loginServer from '@/common/login.js'; 135 import * as loginServer from '@/common/login.js';
130 136
131 import _ from 'underscore' 137 import _ from 'underscore'
132 import { 138 import {
133 ref, 139 ref,
134 onUnmounted 140 onUnmounted
135 } from 'vue' 141 } from 'vue'
136 import { 142 import {
137 onLoad, 143 onLoad,
138 onShow 144 onShow
139 } from '@dcloudio/uni-app' 145 } from '@dcloudio/uni-app'
140 const app = getApp() 146
141 const form = ref({ 147 const app = getApp()
142 type: 1 148 const form = ref({
143 }) 149 type: 1
144 const userType = ref() 150 })
145 const activeStatus = ref(0) 151 const userType = ref()
146 const directUnderFlag = ref(0) 152 const activeStatus = ref(0)
147 const showDirectly = ref(true) 153 const directUnderFlag = ref(0)
148 const authenticationStatusa = ref() 154 const showDirectly = ref(true)
149 const result = ref(false) 155 const authenticationStatusa = ref()
150 const newResult = ref(false) 156 const result = ref(false)
151 const btn = ref(false) 157 const resultNoProvince = ref(false)
152 const type = ref(true) 158 const newResult = ref(false)
153 const flag = ref(false) 159 const btn = ref(false)
154 const pr = ref({}) 160 const type = ref(true)
155 const applicationForMembership1 = ref({}) 161 const flag = ref(false)
156 const options = ref([]) 162 const pr = ref({})
157 const applyPopup = ref(null) 163 const applicationForMembership1 = ref({})
158 // 新增:控制弹窗显示状态(用于锁定滚动) 164 const options = ref([])
159 const popupShow = ref(false) 165 const applyPopup = ref(null)
160 // 考点审核状态 0 未提交 1 审核中 2 审核成功 3 审核失败 166 // 新增:控制弹窗显示状态(用于锁定滚动)
161 const auditStatus = ref(0) 167 const popupShow = ref(false)
162 168 // 考点审核状态 0 未提交 1 审核中 2 审核成功 3 审核失败
163 onShow(() => { 169 const auditStatus = ref(0)
164 init() 170
165 if (form.value.deptType != 1) { // 修复:原代码deptType未定义,改为form.value.deptType 171 onShow(() => {
166 getMyStatusAPI() 172 init()
167 } 173 if (form.value.deptType != 1) { // 修复:原代码deptType未定义,改为form.value.deptType
168 }) 174 getMyStatusAPI()
169 175 }
170 // 页面卸载时恢复滚动(防止异常锁死) 176 })
171 onUnmounted(() => { 177
172 uni.setPageScrollEnabled({ 178 // 页面卸载时恢复滚动(防止异常锁死)
173 enabled: true 179 onUnmounted(() => {
174 }) 180 uni.setPageScrollEnabled({
175 popupShow.value = false 181 enabled: true
176 }) 182 })
177 183 popupShow.value = false
178 function init() { 184 })
179 api.regionsList().then(res => { 185
180 options.value = res.data 186 function init() {
181 }) 187 api.regionsList().then(res => {
182 api.getMyOwnMemberInfo().then(res => { 188 options.value = res.data
183 console.log(res) 189 })
184 userType.value = app.globalData.userType 190 api.getMyOwnMemberInfo().then(res => {
185 newResult.value = res.data.newResult 191 console.log(res)
186 result.value = res.data.result 192 userType.value = app.globalData.userType
187 authenticationStatusa.value = res.data.authenticationStatus 193 newResult.value = res.data.newResult
188 showDirectly.value = !res.data.memberInfo.associateId 194 result.value = res.data.result
189 activeStatus.value = res.data.memberInfo.activeStatus 195 resultNoProvince.value = res.data.resultNoProvince2
190 pr.value = res.data.pr 196 authenticationStatusa.value = res.data.authenticationStatus
191 directUnderFlag.value = res.data.memberInfo.directUnderFlag 197 showDirectly.value = !res.data.memberInfo.associateId
192 if (authenticationStatusa.value == 0) { 198 activeStatus.value = res.data.memberInfo.activeStatus
193 btn.value = false 199 pr.value = res.data.pr
194 } else if (authenticationStatusa.value == 1) { 200 directUnderFlag.value = res.data.memberInfo.directUnderFlag
195 btn.value = true 201 if (authenticationStatusa.value == 0) {
196 } else { 202 btn.value = false
197 btn.value = !result.value 203 } else if (authenticationStatusa.value == 1) {
198 } 204 btn.value = true
199 // 认证信息 205 } else {
200 if (authenticationStatusa.value == 0 || authenticationStatusa.value == 3) { 206 // btn.value = !result.value
201 type.value = false 207 btn.value = !resultNoProvince.value
202 } 208 }
203 // 至少审核通过一次 209 // 认证信息
204 if (authenticationStatusa.value != 0) { 210 if (authenticationStatusa.value == 0 || authenticationStatusa.value == 3) {
205 if (newResult.value) { 211 type.value = false
206 // 至少认证过一次 212 }
207 flag.value = true 213 // 至少审核通过一次
208 } 214 if (authenticationStatusa.value != 0) {
209 } 215 if (newResult.value) {
210 if (!res.data.memberInfo) { 216 // 至少认证过一次
211 res.data.memberInfo = {} 217 flag.value = true
212 } 218 }
213 if (!res.data.dept) { 219 }
214 res.data.dept = {} 220 if (!res.data.memberInfo) {
215 } 221 res.data.memberInfo = {}
216 form.value = { 222 }
217 ...res.data.dept, 223 if (!res.data.dept) {
218 ...res.data.memberInfo 224 res.data.dept = {}
219 } 225 }
220 // 入会材料 226 form.value = {
221 if (form.value.materials) { 227 ...res.data.dept,
222 form.value.materials1 = JSON.parse(form.value.materials) 228 ...res.data.memberInfo
223 } 229 }
224 // 入会申请书 230 // 入会材料
225 if (form.value.applicationForMembership) { 231 if (form.value.materials) {
226 form.value.applicationForMembership1 = JSON.parse(form.value.applicationForMembership) 232 form.value.materials1 = JSON.parse(form.value.materials)
227 } 233 }
228 applicationForMembership1.value = form.value.applicationForMembership || [] 234 // 入会申请书
229 form.value.deptType = res.data.dept.deptType 235 if (form.value.applicationForMembership) {
230 236 form.value.applicationForMembership1 = JSON.parse(form.value.applicationForMembership)
231 if (form.value.businessLicense) { 237 }
232 form.value.businessLicenseArr = [] 238 applicationForMembership1.value = form.value.applicationForMembership || []
233 try { 239 form.value.deptType = res.data.dept.deptType
234 form.value.businessLicenseArr = JSON.parse(form.value.businessLicense) || [] 240
235 } catch (e) { 241 if (form.value.businessLicense) {
236 form.value.businessLicenseArr = [{ 242 form.value.businessLicenseArr = []
237 url: form.value.businessLicense, 243 try {
238 name: '营业执照' 244 form.value.businessLicenseArr = JSON.parse(form.value.businessLicense) || []
239 }] 245 } catch (e) {
240 } 246 form.value.businessLicenseArr = [{
241 console.log('营业执照', form.value.businessLicenseArr) 247 url: form.value.businessLicense,
242 } 248 name: '营业执照'
243 if (form.value.certLegalIdcPhoto && form.value.certLegalIdcPhoto != null) { 249 }]
244 form.value.legalIdcPhotoArr = [] 250 }
245 var arr = form.value.certLegalIdcPhoto?.split(',') || [] 251 console.log('营业执照', form.value.businessLicenseArr)
246 if (arr.length > 0) { 252 }
247 arr = _.map(arr, (p) => { 253 if (form.value.certLegalIdcPhoto && form.value.certLegalIdcPhoto != null) {
248 if (p.indexOf('http') == -1) { 254 form.value.legalIdcPhotoArr = []
249 console.log(p) 255 var arr = form.value.certLegalIdcPhoto?.split(',') || []
250 p = config.baseUrl_api + p 256 if (arr.length > 0) {
251 } 257 arr = _.map(arr, (p) => {
252 return p 258 if (p.indexOf('http') == -1) {
253 }) 259 console.log(p)
254 form.value.legalIdcPhotoArr = arr 260 p = config.baseUrl_api + p
255 } 261 }
256 console.log('法人身份证', form.value.legalIdcPhotoArr) 262 return p
257 } 263 })
258 if (form.value.certPictures) { 264 form.value.legalIdcPhotoArr = arr
259 form.value.picturesArr = [] 265 }
260 var arr = form.value.certPictures.split(',') || [] 266 console.log('法人身份证', form.value.legalIdcPhotoArr)
261 if (arr.length > 0) { 267 }
262 arr = _.map(arr, (p) => { 268 if (form.value.certPictures) {
263 if (p.indexOf('http') == -1) { 269 form.value.picturesArr = []
264 p = config.baseUrl_api + p 270 var arr = form.value.certPictures.split(',') || []
265 } 271 if (arr.length > 0) {
266 return p 272 arr = _.map(arr, (p) => {
267 }) 273 if (p.indexOf('http') == -1) {
268 form.value.picturesArr = arr 274 p = config.baseUrl_api + p
269 } 275 }
270 console.log(form.value.picturesArr) 276 return p
271 } 277 })
272 }) 278 form.value.picturesArr = arr
273 } 279 }
274 280 console.log(form.value.picturesArr)
275 async function getMyStatusAPI() { 281 }
276 const { 282 })
277 data 283 }
278 } = await api.getMyStatus() 284
279 if (data && data.auditStatus) { 285 async function getMyStatusAPI() {
280 auditStatus.value = data.auditStatus 286 const {
281 } else { 287 data
282 auditStatus.value = 0 288 } = await api.getMyStatus()
283 } 289 if (data && data.auditStatus) {
284 } 290 auditStatus.value = data.auditStatus
285 291 } else {
286 // 新增:弹窗打开时锁定滚动 292 auditStatus.value = 0
287 function onPopupOpen() { 293 }
288 popupShow.value = true 294 }
289 // 1. 小程序API锁定页面滚动 295
290 uni.setPageScrollEnabled({ 296 // 新增:弹窗打开时锁定滚动
291 enabled: false 297 function onPopupOpen() {
292 }) 298 popupShow.value = true
293 // 延时兜底(防止API生效延迟) 299 // 1. 小程序API锁定页面滚动
294 setTimeout(() => { 300 uni.setPageScrollEnabled({
295 uni.setPageScrollEnabled({ 301 enabled: false
296 enabled: false 302 })
297 }) 303 // 延时兜底(防止API生效延迟)
298 }, 100) 304 setTimeout(() => {
299 } 305 uni.setPageScrollEnabled({
300 306 enabled: false
301 // 新增:弹窗关闭时恢复滚动 307 })
302 function onPopupClose() { 308 }, 100)
303 popupShow.value = false 309 }
304 // 恢复页面滚动 310
305 uni.setPageScrollEnabled({ 311 // 新增:弹窗关闭时恢复滚动
306 enabled: true 312 function onPopupClose() {
307 }) 313 popupShow.value = false
308 setTimeout(() => { 314 // 恢复页面滚动
309 uni.setPageScrollEnabled({ 315 uni.setPageScrollEnabled({
310 enabled: true 316 enabled: true
311 }) 317 })
312 }, 100) 318 setTimeout(() => {
313 } 319 uni.setPageScrollEnabled({
314 320 enabled: true
315 function showApplyDialog() { 321 })
316 applyPopup.value.open() 322 }, 100)
317 } 323 }
318 324
319 // 关闭申请弹窗 325 function showApplyDialog() {
320 function closeApplyDialog() { 326 applyPopup.value.open()
321 applyPopup.value.close() 327 }
322 } 328
323 329 // 关闭申请弹窗
324 // 跳转到考点申请页面 330 function closeApplyDialog() {
325 function goToApplyPage() { 331 applyPopup.value.close()
326 closeApplyDialog() 332 }
327 uni.navigateTo({ 333
328 url: `/myCenter/examPointApply?memId=${form.value.memId}` 334 // 跳转到考点申请页面
329 }) 335 function goToApplyPage() {
330 } 336 closeApplyDialog()
331 337 uni.navigateTo({
332 function auditEditFN() { 338 url: `/myCenter/examPointApply?memId=${form.value.memId}`
333 uni.navigateTo({ 339 })
334 url: `/myCenter/reviewList` 340 }
335 }) 341
336 } 342 function auditEditFN() {
337 343 uni.navigateTo({
338 function showImage(arr, index) { 344 url: `/myCenter/reviewList`
339 uni.previewImage({ 345 })
340 urls: arr, 346 }
341 current: index, 347
342 success: function(res) {} 348 function showImage(arr, index) {
343 }) 349 uni.previewImage({
344 } 350 urls: arr,
345 351 current: index,
346 function download(url) { 352 success: function (res) {
347 console.log(url) 353 }
348 if (url.indexOf('.png') > -1 || url.indexOf('.jpg') > -1) { 354 })
349 if (url.indexOf('http') > -1) { 355 }
350 uni.previewImage({ 356
351 urls: [url], 357 function download(url) {
352 success: function(res) {} 358 console.log(url)
353 }) 359 if (url.indexOf('.png') > -1 || url.indexOf('.jpg') > -1) {
354 } else { 360 if (url.indexOf('http') > -1) {
355 uni.previewImage({ 361 uni.previewImage({
356 urls: [config.baseUrl_api + url], 362 urls: [url],
357 success: function(res) {} 363 success: function (res) {
358 }) 364 }
359 } 365 })
360 } else { 366 } else {
361 if (url.indexOf('http') > -1) { 367 uni.previewImage({
362 goWebView(url) 368 urls: [config.baseUrl_api + url],
363 } else { 369 success: function (res) {
364 goWebView(config.baseUrl_api + url) 370 }
365 } 371 })
366 } 372 }
367 } 373 } else {
368 374 if (url.indexOf('http') > -1) {
369 function goWebView(url) { 375 goWebView(url)
370 url = url.replace("http://", "https://") 376 } else {
371 uni.showLoading({ 377 goWebView(config.baseUrl_api + url)
372 title: '下载中' 378 }
373 }); 379 }
374 uni.downloadFile({ 380 }
375 url: url, 381
376 success: function(res) { 382 function goWebView(url) {
377 uni.hideLoading(); 383 url = url.replace("http://", "https://")
378 var filePath = res.tempFilePath; 384 uni.showLoading({
379 uni.showLoading({ 385 title: '下载中'
380 title: '正在打开' 386 });
381 }); 387 uni.downloadFile({
382 uni.openDocument({ 388 url: url,
383 filePath: filePath, 389 success: function (res) {
384 showMenu: true, 390 uni.hideLoading();
385 success: function(res) { 391 var filePath = res.tempFilePath;
386 uni.hideLoading(); 392 uni.showLoading({
387 }, 393 title: '正在打开'
388 fail: function(err) { 394 });
389 uni.hideLoading(); 395 uni.openDocument({
390 uni.showToast({ 396 filePath: filePath,
391 title: err, 397 showMenu: true,
392 icon: 'none', 398 success: function (res) {
393 duration: 2000 399 uni.hideLoading();
394 }); 400 },
395 } 401 fail: function (err) {
396 }); 402 uni.hideLoading();
397 }, 403 uni.showToast({
398 fail: function(error) { 404 title: err,
399 uni.hideLoading(); 405 icon: 'none',
400 uni.showToast({ 406 duration: 2000
401 title: `下载失败`, 407 });
402 icon: 'none', 408 }
403 duration: 2000 409 });
404 }); 410 },
405 } 411 fail: function (error) {
406 }); 412 uni.hideLoading();
407 } 413 uni.showToast({
408 414 title: `下载失败`,
409 function payTheFees() { 415 icon: 'none',
410 if (!form.value.name) { 416 duration: 2000
411 uni.showToast({ 417 });
412 title: `请先完善单位信息`, 418 }
413 icon: 'none' 419 });
414 }); 420 }
415 return; // 新增:防止无名称时跳转 421
416 } 422 function payTheFees() {
417 uni.navigateTo({ 423 if (!form.value.name) {
418 url: `/myCenter/perfect` 424 uni.showToast({
419 }) 425 title: `请先完善单位信息`,
420 } 426 icon: 'none'
427 });
428 return; // 新增:防止无名称时跳转
429 }
430 uni.navigateTo({
431 url: `/myCenter/perfect`
432 })
433 }
421 </script> 434 </script>
422 435
423 <style scoped lang="scss">
424 // 新增:锁定滚动的核心样式
425 .lock-scroll {
426 position: fixed !important;
427 top: 0;
428 left: 0;
429 right: 0;
430 bottom: 0;
431 overflow: hidden !important;
432 height: 100vh !important;
433 }
434
435 .height1 {
436 height: 100rpx;
437 }
438
439 .photobox {
440 position: relative;
441 margin: 30rpx auto;
442
443 .photo {
444 width: 210rpx;
445 height: 280rpx;
446 background-color: #f4f4f4;
447 display: block;
448 margin: auto;
449 }
450 }
451
452 .ylImage {
453 width: 300rpx;
454 height: 200rpx;
455 display: block;
456 box-shadow: 0 0 10rpx #ddd;
457 border-radius: 8rpx;
458 }
459
460 .photoBook {
461 position: relative;
462 border-radius: 10rpx;
463 overflow: hidden;
464
465 &::after {
466 content: '';
467 position: absolute;
468 width: 100%;
469 height: 100%;
470 top: 0;
471 left: 0;
472 background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
473 }
474
475 text {
476 position: absolute;
477 z-index: 1;
478 font-size: 24rpx;
479 color: #fff;
480 bottom: 4rpx;
481 right: 8rpx;
482 }
483 }
484
485 .frrr {
486 width: 100%;
487 text-align: right;
488 text-align: right;
489 display: flex;
490 flex-wrap: wrap;
491 justify-content: flex-end;
492 }
493
494 :deep(.selected-list) {
495 font-size: 32rpx;
496 padding: 0;
497 }
498
499 :deep(.input-value) {
500 padding: 0;
501 }
502
503 :deep(.uni-list-item__extra-text) {
504 font-size: 32rpx;
505 color: #000;
506 }
507
508 :deep(.uni-list-item__extra) {
509 flex: 1 1 auto;
510 }
511
512 :deep(.uni-list-item__content) {
513 flex: 0 0 auto;
514 }
515
516 :deep(.uni-list-item__content-title) {
517 color: #999;
518 }
519
520 .flexbox {
521 padding: 30rpx;
522 background-color: #fff;
523 justify-content: space-between;
524 }
525
526 .mainbox {
527 margin: 30rpx;
528 }
529
530 .apply-dialog {
531 width: 530rpx;
532 background: #fff;
533 border-radius: 16rpx;
534 padding: 40rpx;
535 // 新增:禁止弹窗内部滚动
536 touch-action: none;
537 }
538
539 .dialog-title {
540 font-size: 32rpx;
541 font-weight: bold;
542 text-align: center;
543 margin-bottom: 30rpx;
544 }
545
546 .dialog-content {
547 margin: 40rpx;
548 }
549
550 .remind {
551 color: #FF8124;
552 font-size: 26rpx;
553 margin-top: 40rpx;
554 }
555
556 .dialog-buttons {
557 display: flex;
558 justify-content: space-between;
559 margin-top: 40rpx;
560 }
561
562 .btn-cancel {
563 width: 225rpx;
564 height: 80rpx;
565 line-height: 80rpx;
566 border: 1rpx solid #ddd;
567 border-radius: 40rpx;
568 background: #fff;
569 color: #333;
570 text-align: center;
571 font-size: 14px;
572 }
573
574 .btn-confirm {
575 width: 225rpx;
576 height: 80rpx;
577 line-height: 80rpx;
578 border-radius: 40rpx;
579 background: #C4121B;
580 font-size: 14px;
581 color: #fff;
582 text-align: center;
583 }
584
585 // 新增:给uni-popup蒙版添加禁止滚动样式
586 :deep(.uni-popup__mask) {
587 touch-action: none !important;
588 }
589 </style>
...\ No newline at end of file ...\ No newline at end of file
436 <style lang="scss" scoped>
437 // 新增:锁定滚动的核心样式
438 .lock-scroll {
439 position: fixed !important;
440 top: 0;
441 left: 0;
442 right: 0;
443 bottom: 0;
444 overflow: hidden !important;
445 height: 100vh !important;
446 }
447
448 .height1 {
449 height: 100rpx;
450 }
451
452 .photobox {
453 position: relative;
454 margin: 30rpx auto;
455
456 .photo {
457 width: 210rpx;
458 height: 280rpx;
459 background-color: #f4f4f4;
460 display: block;
461 margin: auto;
462 }
463 }
464
465 .ylImage {
466 width: 300rpx;
467 height: 200rpx;
468 display: block;
469 box-shadow: 0 0 10rpx #ddd;
470 border-radius: 8rpx;
471 }
472
473 .photoBook {
474 position: relative;
475 border-radius: 10rpx;
476 overflow: hidden;
477
478 &::after {
479 content: '';
480 position: absolute;
481 width: 100%;
482 height: 100%;
483 top: 0;
484 left: 0;
485 background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
486 }
487
488 text {
489 position: absolute;
490 z-index: 1;
491 font-size: 24rpx;
492 color: #fff;
493 bottom: 4rpx;
494 right: 8rpx;
495 }
496 }
497
498 .frrr {
499 width: 100%;
500 text-align: right;
501 text-align: right;
502 display: flex;
503 flex-wrap: wrap;
504 justify-content: flex-end;
505 }
506
507 :deep(.selected-list) {
508 font-size: 32rpx;
509 padding: 0;
510 }
511
512 :deep(.input-value) {
513 padding: 0;
514 }
515
516 :deep(.uni-list-item__extra-text) {
517 font-size: 32rpx;
518 color: #000;
519 }
520
521 :deep(.uni-list-item__extra) {
522 flex: 1 1 auto;
523 }
524
525 :deep(.uni-list-item__content) {
526 flex: 0 0 auto;
527 }
528
529 :deep(.uni-list-item__content-title) {
530 color: #999;
531 }
532
533 .flexbox {
534 padding: 30rpx;
535 background-color: #fff;
536 justify-content: space-between;
537 }
538
539 .mainbox {
540 margin: 30rpx;
541 }
542
543 .apply-dialog {
544 width: 530rpx;
545 background: #fff;
546 border-radius: 16rpx;
547 padding: 40rpx;
548 // 新增:禁止弹窗内部滚动
549 touch-action: none;
550 }
551
552 .dialog-title {
553 font-size: 32rpx;
554 font-weight: bold;
555 text-align: center;
556 margin-bottom: 30rpx;
557 }
558
559 .dialog-content {
560 margin: 40rpx;
561 }
562
563 .remind {
564 color: #FF8124;
565 font-size: 26rpx;
566 margin-top: 40rpx;
567 }
568
569 .dialog-buttons {
570 display: flex;
571 justify-content: space-between;
572 margin-top: 40rpx;
573 }
574
575 .btn-cancel {
576 width: 225rpx;
577 height: 80rpx;
578 line-height: 80rpx;
579 border: 1rpx solid #ddd;
580 border-radius: 40rpx;
581 background: #fff;
582 color: #333;
583 text-align: center;
584 font-size: 14px;
585 }
586
587 .btn-confirm {
588 width: 225rpx;
589 height: 80rpx;
590 line-height: 80rpx;
591 border-radius: 40rpx;
592 background: #C4121B;
593 font-size: 14px;
594 color: #fff;
595 text-align: center;
596 }
597
598 // 新增:给uni-popup蒙版添加禁止滚动样式
599 :deep(.uni-popup__mask) {
600 touch-action: none !important;
601 }
602 </style>
......
1 <template> 1 <template>
2 <view class="container"> 2 <view class="container">
3 <view class="content"> 3 <view class="content">
4 <view class="card"> 4 <view class="card">
5 <view class="yearRow"> 5 <view class="yearRow">
6 <view class="label">缴费年限</view> 6 <view class="label">缴费年限</view>
7 <view class="control"> 7 <view class="control">
8 <image class="icon" @click="minusYear" src="/static/dd_02.png" mode="widthFix" 8 <image v-if="form.renewYear > 1" class="icon" mode="widthFix" src="/static/dd_02.png"
9 v-if="form.renewYear > 1"></image> 9 @click="minusYear"></image>
10 <image class="icon" src="/static/dd_02_g.png" mode="widthFix" v-else></image> 10 <image v-else class="icon" mode="widthFix" src="/static/dd_02_g.png"></image>
11 <text class="num">{{ form.renewYear }}</text> 11 <text class="num">{{ form.renewYear }}</text>
12 <image class="icon" src="/static/btn_03.png" mode="widthFix" @click="plusYear" 12 <image v-if="form.renewYear < 5" class="icon" mode="widthFix" src="/static/btn_03.png"
13 v-if="form.renewYear < 5"></image> 13 @click="plusYear"></image>
14 <image class="icon" src="/static/btn_03_g.png" mode="widthFix" v-else></image> 14 <image v-else class="icon" mode="widthFix" src="/static/btn_03_g.png"></image>
15 </view> 15 </view>
16 </view> 16 </view>
17 </view> 17 </view>
18 18
19 <view class="card "> 19 <view class="card ">
20 <!-- 费用合计 --> 20 <!-- 费用合计 -->
21 <view class="row "> 21 <view class="row ">
22 <text class="label">费用合计</text> 22 <text class="label">费用合计</text>
23 <text class="value red">{{ (form.renewYear * memberFee).toFixed(2) }}</text> 23 <text class="value red">{{ (form.renewYear * memberFee).toFixed(2) }}</text>
24 </view> 24 </view>
25 25
26 <view class="hintRow" v-if="preferentialPolicy"> 26 <view v-if="preferentialPolicy" class="hintRow">
27 <text 27 <text
28 class="hintText">温馨提示:根据中国跆协{{ preferentialData.name || '优惠' }}政策减免一年费用,每个单位在政策有效期内只享受一次</text> 28 class="hintText">温馨提示:根据中国跆协{{ preferentialData.name || '优惠' }}政策减免一年费用,每个单位在政策有效期内只享受一次
29 </view> 29 </text>
30 </view> 30 </view>
31 31 </view>
32 <view class="payRow "> 32
33 <radio-group @change="onPayTypeChange"> 33 <view class="payRow ">
34 <label class="radioItem"> 34 <radio-group @change="onPayTypeChange">
35 <radio value="1" :checked="payType === '1'" class="custom-radio" /> 35 <label class="radioItem">
36 <view class="payInfo"> 36 <radio :checked="payType === '1'" class="custom-radio" value="1"/>
37 <image class="icon" src="/static/min.png" mode="widthFix"></image> 37 <view class="payInfo">
38 <text>民生付</text> 38 <image class="icon" mode="widthFix" src="/static/min.png"></image>
39 </view> 39 <text>民生付</text>
40 </label> 40 </view>
41 </radio-group> 41 </label>
42 </view> 42 </radio-group>
43 43 </view>
44 <view class="totalRow "> 44
45 <text class="label">支付费用合计</text> 45 <view class="totalRow ">
46 <text class="value redBig">{{ memberTotalFee }}</text> 46 <text class="label">支付费用合计</text>
47 </view> 47 <text class="value redBig">{{ memberTotalFee }}</text>
48 48 </view>
49 </view> 49
50 50 </view>
51 <view class="bottomBtn"> 51
52 <view class="deductRow"> 52 <view class="bottomBtn">
53 <text class="label">减免费用</text> 53 <view class="deductRow">
54 <text class="value red">-{{ memberFee.toFixed(2) }}</text> 54 <text class="label">减免费用</text>
55 </view> 55 <text class="value red">-{{ memberFee.toFixed(2) }}</text>
56 <button class="payBtn" @click="handelPay" :loading="isPaying">立即支付 ¥{{ memberTotalFee }}</button> 56 </view>
57 </view> 57 <button :loading="isPaying" class="payBtn" @click="handelPay">立即支付 ¥{{ memberTotalFee }}</button>
58 58 </view>
59 </view> 59
60 </view>
60 </template> 61 </template>
61 62
62 <script setup> 63 <script setup>
63 import { 64 import {
64 ref, 65 ref,
65 computed 66 computed
66 } from 'vue' 67 } from 'vue'
67 import { 68 import {
68 onLoad 69 onLoad
69 } from '@dcloudio/uni-app'; 70 } from '@dcloudio/uni-app';
70 import to from 'await-to-js' 71 import to from 'await-to-js'
71 import * as api from '@/common/api.js' 72 import * as api from '@/common/api.js'
72 73 import {minShengPay} from '@/common/pay.js'
73 const form = ref({ 74
74 renewYear: 1 75 const form = ref({
75 }) 76 renewYear: 1
76 const memberFee = ref(0) 77 })
77 const preferentialPolicy = ref(false) 78 const memberFee = ref(0)
78 const preferentialData = ref({ 79 const preferentialPolicy = ref(false)
79 name: '优惠' 80 const preferentialData = ref({
80 }) 81 name: '优惠'
81 const payType = ref('1') 82 })
82 const isPaying = ref(false) 83 const payType = ref('1')
83 84 const isPaying = ref(false)
84 const memberTotalFee = computed(() => { 85
85 if (preferentialPolicy.value) { 86 const memberTotalFee = computed(() => {
86 return (memberFee.value * form.value.renewYear - memberFee.value * 1).toFixed(2) 87 if (preferentialPolicy.value) {
87 } else { 88 return (memberFee.value * form.value.renewYear - memberFee.value * 1).toFixed(2)
88 return (memberFee.value * form.value.renewYear).toFixed(2) 89 } else {
89 } 90 return (memberFee.value * form.value.renewYear).toFixed(2)
90 }) 91 }
91 92 })
92 // 年限减 93
93 const minusYear = () => { 94 // 年限减
94 if (form.value.renewYear > 1) { 95 const minusYear = () => {
95 form.value.renewYear-- 96 if (form.value.renewYear > 1) {
96 } 97 form.value.renewYear--
97 } 98 }
98 // 年限加 99 }
99 const plusYear = () => { 100 // 年限加
100 if (form.value.renewYear < 6) { 101 const plusYear = () => {
101 form.value.renewYear++ 102 if (form.value.renewYear < 6) {
102 } 103 form.value.renewYear++
103 } 104 }
104 105 }
105 // 支付方式切换 106
106 const onPayTypeChange = (e) => { 107 // 支付方式切换
107 payType.value = e.detail.value 108 const onPayTypeChange = (e) => {
108 } 109 payType.value = e.detail.value
109 110 }
110 // 支付操作 111
111 const handelPay = async () => { 112 // 支付操作
112 if (memberTotalFee.value < 0) { 113 const handelPay = async () => {
113 uni.showToast({ 114 if (memberTotalFee.value < 0) {
114 title: '支付金额异常', 115 uni.showToast({
115 icon: 'none' 116 title: '支付金额异常',
116 }) 117 icon: 'none'
117 return 118 })
118 } 119 return
119 120 }
120 // 显示 loading 121
121 uni.showLoading({ 122 // 显示 loading
122 title: '支付中...', 123 uni.showLoading({
123 mask: true 124 title: '支付中...',
124 }) 125 mask: true
125 isPaying.value = true 126 })
126 127 isPaying.value = true
127 // 创建订单 128
128 const [orderErr, orderRes] = await to(api.certifiedNew(form.value.renewYear)) 129 // 创建订单
129 if (orderErr) { 130 const [orderErr, orderRes] = await to(api.certifiedNew(form.value.renewYear))
130 uni.hideLoading() 131 if (orderErr) {
131 isPaying.value = false 132 uni.hideLoading()
132 // uni.showToast({ 133 isPaying.value = false
133 // title: '创建订单失败', 134 // uni.showToast({
134 // icon: 'none' 135 // title: '创建订单失败',
135 // }) 136 // icon: 'none'
136 return 137 // })
137 } 138 return
138 139 }
139 const data = orderRes.data 140
140 // 无需支付,直接成功 141 const data = orderRes.data
141 if (data.payFlag == 0) { 142 // 无需支付,直接成功
142 uni.hideLoading() 143 if (data.payFlag == 0) {
143 isPaying.value = false 144 uni.hideLoading()
144 uni.redirectTo({ 145 isPaying.value = false
145 url: `/myCenter/sucPay?orderId=${data.orderId}` 146 uni.redirectTo({
146 }) 147 url: `/myCenter/sucPay?orderId=${data.orderId}`
147 return 148 })
148 } 149 return
149 150 }
150 // 需要支付回调 151 if (data.payResult.encryptedData) {
151 if (data.orderId) { 152 const res = minShengPay(data.orderId, data.payResult.encryptedData)
152 await to(api.callBack2(data.orderId)) 153 console.log(res)
153 uni.hideLoading() 154 }
154 isPaying.value = false 155 // 需要支付回调
155 156 // if (data.orderId) {
156 uni.redirectTo({ 157 // await to(api.callBack2(data.orderId))
157 url: `/myCenter/sucPay?orderId=${data.orderId}` 158 // uni.hideLoading()
158 }) 159 // isPaying.value = false
159 } 160 //
160 } 161 // uni.redirectTo({
161 162 // url: `/myCenter/sucPay?orderId=${data.orderId}`
162 onLoad((option) => { 163 // })
163 // 接收年限 164 // }
164 form.value.renewYear = Number(option.renewYear || 1) 165
165 // 初始化获取费用和优惠 166
166 init() 167 }
167 }) 168
168 169 onLoad((option) => {
169 // 初始化接口 170 // 接收年限
170 async function init() { 171 form.value.renewYear = Number(option.renewYear || 1)
171 uni.showLoading({ 172 // 初始化获取费用和优惠
172 title: '加载中...' 173 init()
173 }) 174 })
174 const [err] = await to(Promise.all([ 175
175 getMyMemberCertUnitFeeApi(), 176 // 初始化接口
176 canUseDiscountApi(), 177 async function init() {
177 getZtxDiscountPolicyApi() 178 uni.showLoading({
178 ])) 179 title: '加载中...'
179 uni.hideLoading() 180 })
180 if (err) { 181 const [err] = await to(Promise.all([
181 console.error('初始化失败:', err) 182 getMyMemberCertUnitFeeApi(),
182 } 183 canUseDiscountApi(),
183 } 184 getZtxDiscountPolicyApi()
184 185 ]))
185 // 获取会员单价 186 uni.hideLoading()
186 async function getMyMemberCertUnitFeeApi() { 187 if (err) {
187 const [err, res] = await to(api.getMyMemberCertUnitFee()) 188 console.error('初始化失败:', err)
188 if (!err && res.data) { 189 }
189 memberFee.value = Number(res.data || 1500) 190 }
190 } 191
191 } 192 // 获取会员单价
192 193 async function getMyMemberCertUnitFeeApi() {
193 // 是否可用优惠 194 const [err, res] = await to(api.getMyMemberCertUnitFee())
194 async function canUseDiscountApi() { 195 if (!err && res.data) {
195 const [err, res] = await to(api.canUseDiscount()) 196 memberFee.value = Number(res.data || 1500)
196 if (!err && res.data !== undefined) { 197 }
197 preferentialPolicy.value = res.data 198 }
198 } 199
199 } 200 // 是否可用优惠
200 201 async function canUseDiscountApi() {
201 // 获取优惠政策详情 202 const [err, res] = await to(api.canUseDiscount())
202 async function getZtxDiscountPolicyApi() { 203 if (!err && res.data !== undefined) {
203 const [err, res] = await to(api.getZtxDiscountPolicy()) 204 preferentialPolicy.value = res.data
204 if (!err && res.data) { 205 }
205 preferentialData.value = res.data 206 }
206 } 207
207 } 208 // 获取优惠政策详情
209 async function getZtxDiscountPolicyApi() {
210 const [err, res] = await to(api.getZtxDiscountPolicy())
211 if (!err && res.data) {
212 preferentialData.value = res.data
213 }
214 }
208 </script> 215 </script>
209 216
210 <style scoped> 217 <style scoped>
211 /* 整体容器 */
212 .container {
213 min-height: 100vh;
214 background-color: #f7f7f7;
215 }
216
217 /* 内容区域 */
218 .content {
219 padding: 20rpx 20rpx 120rpx;
220 }
221
222 /* 卡片 */
223 .card {
224 background: #fff;
225 border-radius: 8rpx;
226 padding: 25rpx 20rpx;
227 margin-bottom: 20rpx;
228 }
229
230 /* 缴费年限行 */
231 .yearRow {
232 display: flex;
233 align-items: center;
234 justify-content: space-between;
235 margin-bottom: 20rpx;
236 }
237
238 .yearRow .label {
239 font-size: 28rpx;
240 color: #333;
241 }
242
243 .yearRow .control {
244 display: flex;
245 align-items: center;
246 }
247
248 .control image {
249 width: 50rpx;
250 height: 50rpx;
251 }
252
253 /* 加减按钮样式 */
254 .num-btn {
255 width: 40rpx;
256 height: 40rpx;
257 border-radius: 50%;
258 display: flex;
259 align-items: center;
260 justify-content: center;
261 background-color: #fff;
262 border: 1rpx solid #C4121B;
263 }
264
265 .num-btn.disabled {
266 border-color: #ccc;
267 }
268
269 .num-btn.disabled .btn-icon {
270 color: #ccc;
271 }
272
273 .btn-icon {
274 font-size: 24rpx;
275 color: #C4121B;
276 font-weight: bold;
277 }
278
279 .yearRow .num {
280 font-size: 28rpx;
281 color: #333;
282 min-width: 80rpx;
283 text-align: center;
284 margin: 0 10rpx;
285 }
286
287
288 /* 通用行 */
289 .row {
290 display: flex;
291 justify-content: space-between;
292 align-items: center;
293
294 }
295
296 .row .label {
297 font-size: 28rpx;
298 color: #333;
299 }
300
301 .row .value {
302 font-size: 30rpx;
303 color: #C4121B;
304 font-weight: 500;
305 }
306
307 /* 优惠提示 */
308 .hintRow {
309 display: flex;
310 align-items: flex-start;
311 font-size: 24rpx;
312 line-height: 1.4;
313 }
314
315 .hint-icon {
316 width: 24rpx;
317 height: 24rpx;
318 border-radius: 50%;
319 background-color: #C4121B;
320 display: flex;
321 align-items: center;
322 justify-content: center;
323 margin-right: 10rpx;
324 flex-shrink: 0;
325 margin-top: 2rpx;
326 }
327
328 .icon {
329 width: 30px;
330 }
331
332 .icon-check {
333 color: #fff;
334 font-size: 16rpx;
335 }
336
337 .hintRow .hintText {
338 color: #FF8124;
339 flex: 1;
340 margin-top: 10rpx;
341 }
342
343 /* 减免费用 */
344 .deductRow {
345 background: #fff;
346 padding: 20rpx 20rpx;
347 display: flex;
348 justify-content: space-between;
349 align-items: center;
350 margin-bottom: 10rpx;
351 border-radius: 8rpx;
352 }
353
354 .deductRow .label {
355 font-size: 28rpx;
356 color: #333;
357 }
358
359 .deductRow .value {
360 font-size: 30rpx;
361 color: #C4121B;
362 }
363
364 /* 支付方式行 */
365 .payRow {
366 background: #fff;
367 border-radius: 8rpx;
368 padding: 20rpx 20rpx;
369 margin-bottom: 20rpx;
370 }
371
372 .radioItem {
373 display: flex;
374 align-items: center;
375 }
376
377 /* 自定义红色单选框 */
378 ::v-deep .custom-radio .wx-radio-input {
379 width: 30rpx;
380 height: 30rpx;
381 border-radius: 50%;
382 border: 2rpx solid #ccc;
383 }
384
385 ::v-deep .custom-radio .wx-radio-input.wx-radio-input-checked {
386 border-color: #C4121B !important;
387 background: #C4121B !important;
388 }
389
390
391 .payInfo {
392 display: flex;
393 align-items: center;
394 margin-left: 15rpx;
395 }
396
397 .payInfo .icon {
398 width: 40rpx;
399 height: 40rpx;
400 margin-right: 10rpx;
401 }
402
403 .payInfo text {
404 font-size: 28rpx;
405 color: #333;
406 }
407
408 /* 总费用行(突出显示) */
409 .totalRow {
410 background: #fff;
411 border-radius: 8rpx;
412 padding: 20rpx 20rpx;
413 display: flex;
414 justify-content: space-between;
415 align-items: center;
416 margin-top: 10rpx;
417 }
418
419 .totalRow .label {
420 font-size: 28rpx;
421 color: #333;
422 }
423
424 .redBig {
425 font-size: 32rpx;
426 color: #C4121B;
427 font-weight: bold;
428 }
429
430 /* 底部按钮 */
431 .bottomBtn {
432 position: fixed;
433 bottom: 0;
434 left: 0;
435 right: 0;
436 padding: 20rpx 20rpx;
437 background: #fff;
438 border-top: 1rpx solid #eee;
439 }
440
441 .payBtn {
442 width: 100%;
443 height: 88rpx;
444 line-height: 88rpx;
445 background-color: #C4121B;
446 color: #fff;
447 border-radius: 8rpx;
448 font-size: 32rpx;
449 text-align: center;
450 border: none;
451 }
452
453 .payBtn[disabled] {
454 background-color: #ccc;
455 color: #999;
456 }
457
458 /* 通用红色文字 */
459 .red {
460 color: #C4121B;
461 }
462 </style>
...\ No newline at end of file ...\ No newline at end of file
218 /* 整体容器 */
219 .container {
220 min-height: 100vh;
221 background-color: #f7f7f7;
222 }
223
224 /* 内容区域 */
225 .content {
226 padding: 20rpx 20rpx 120rpx;
227 }
228
229 /* 卡片 */
230 .card {
231 background: #fff;
232 border-radius: 8rpx;
233 padding: 25rpx 20rpx;
234 margin-bottom: 20rpx;
235 }
236
237 /* 缴费年限行 */
238 .yearRow {
239 display: flex;
240 align-items: center;
241 justify-content: space-between;
242 margin-bottom: 20rpx;
243 }
244
245 .yearRow .label {
246 font-size: 28rpx;
247 color: #333;
248 }
249
250 .yearRow .control {
251 display: flex;
252 align-items: center;
253 }
254
255 .control image {
256 width: 50rpx;
257 height: 50rpx;
258 }
259
260 /* 加减按钮样式 */
261 .num-btn {
262 width: 40rpx;
263 height: 40rpx;
264 border-radius: 50%;
265 display: flex;
266 align-items: center;
267 justify-content: center;
268 background-color: #fff;
269 border: 1rpx solid #C4121B;
270 }
271
272 .num-btn.disabled {
273 border-color: #ccc;
274 }
275
276 .num-btn.disabled .btn-icon {
277 color: #ccc;
278 }
279
280 .btn-icon {
281 font-size: 24rpx;
282 color: #C4121B;
283 font-weight: bold;
284 }
285
286 .yearRow .num {
287 font-size: 28rpx;
288 color: #333;
289 min-width: 80rpx;
290 text-align: center;
291 margin: 0 10rpx;
292 }
293
294
295 /* 通用行 */
296 .row {
297 display: flex;
298 justify-content: space-between;
299 align-items: center;
300
301 }
302
303 .row .label {
304 font-size: 28rpx;
305 color: #333;
306 }
307
308 .row .value {
309 font-size: 30rpx;
310 color: #C4121B;
311 font-weight: 500;
312 }
313
314 /* 优惠提示 */
315 .hintRow {
316 display: flex;
317 align-items: flex-start;
318 font-size: 24rpx;
319 line-height: 1.4;
320 }
321
322 .hint-icon {
323 width: 24rpx;
324 height: 24rpx;
325 border-radius: 50%;
326 background-color: #C4121B;
327 display: flex;
328 align-items: center;
329 justify-content: center;
330 margin-right: 10rpx;
331 flex-shrink: 0;
332 margin-top: 2rpx;
333 }
334
335 .icon {
336 width: 30px;
337 }
338
339 .icon-check {
340 color: #fff;
341 font-size: 16rpx;
342 }
343
344 .hintRow .hintText {
345 color: #FF8124;
346 flex: 1;
347 margin-top: 10rpx;
348 }
349
350 /* 减免费用 */
351 .deductRow {
352 background: #fff;
353 padding: 20rpx 20rpx;
354 display: flex;
355 justify-content: space-between;
356 align-items: center;
357 margin-bottom: 10rpx;
358 border-radius: 8rpx;
359 }
360
361 .deductRow .label {
362 font-size: 28rpx;
363 color: #333;
364 }
365
366 .deductRow .value {
367 font-size: 30rpx;
368 color: #C4121B;
369 }
370
371 /* 支付方式行 */
372 .payRow {
373 background: #fff;
374 border-radius: 8rpx;
375 padding: 20rpx 20rpx;
376 margin-bottom: 20rpx;
377 }
378
379 .radioItem {
380 display: flex;
381 align-items: center;
382 }
383
384 /* 自定义红色单选框 */
385 ::v-deep .custom-radio .wx-radio-input {
386 width: 30rpx;
387 height: 30rpx;
388 border-radius: 50%;
389 border: 2rpx solid #ccc;
390 }
391
392 ::v-deep .custom-radio .wx-radio-input.wx-radio-input-checked {
393 border-color: #C4121B !important;
394 background: #C4121B !important;
395 }
396
397
398 .payInfo {
399 display: flex;
400 align-items: center;
401 margin-left: 15rpx;
402 }
403
404 .payInfo .icon {
405 width: 40rpx;
406 height: 40rpx;
407 margin-right: 10rpx;
408 }
409
410 .payInfo text {
411 font-size: 28rpx;
412 color: #333;
413 }
414
415 /* 总费用行(突出显示) */
416 .totalRow {
417 background: #fff;
418 border-radius: 8rpx;
419 padding: 20rpx 20rpx;
420 display: flex;
421 justify-content: space-between;
422 align-items: center;
423 margin-top: 10rpx;
424 }
425
426 .totalRow .label {
427 font-size: 28rpx;
428 color: #333;
429 }
430
431 .redBig {
432 font-size: 32rpx;
433 color: #C4121B;
434 font-weight: bold;
435 }
436
437 /* 底部按钮 */
438 .bottomBtn {
439 position: fixed;
440 bottom: 0;
441 left: 0;
442 right: 0;
443 padding: 20rpx 20rpx;
444 background: #fff;
445 border-top: 1rpx solid #eee;
446 }
447
448 .payBtn {
449 width: 100%;
450 height: 88rpx;
451 line-height: 88rpx;
452 background-color: #C4121B;
453 color: #fff;
454 border-radius: 8rpx;
455 font-size: 32rpx;
456 text-align: center;
457 border: none;
458 }
459
460 .payBtn[disabled] {
461 background-color: #ccc;
462 color: #999;
463 }
464
465 /* 通用红色文字 */
466 .red {
467 color: #C4121B;
468 }
469 </style>
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
109 const res = await api.goPay(rangeId.value) 109 const res = await api.goPay(rangeId.value)
110 110
111 if (res.data?.orderId) { 111 if (res.data?.orderId) {
112 api.pcallBack2(res.data.orderId) 112 await api.pcallBack2(res.data.orderId)
113 uni.redirectTo({ 113 uni.redirectTo({
114 url: `/myCenter/sucPay?rangeId=${rangeId.value}from=payOrder` 114 url: `/myCenter/sucPay?rangeId=${rangeId.value}from=payOrder`
115 }) 115 })
...@@ -251,4 +251,4 @@ ...@@ -251,4 +251,4 @@
251 color: #fff; 251 color: #fff;
252 } 252 }
253 } 253 }
254 </style>
...\ No newline at end of file ...\ No newline at end of file
254 </style>
......
...@@ -330,6 +330,7 @@ ...@@ -330,6 +330,7 @@
330 }; 330 };
331 } 331 }
332 }) 332 })
333
333 onLoad(option => { 334 onLoad(option => {
334 let userName = uni.getStorageSync('userName') 335 let userName = uni.getStorageSync('userName')
335 if (!userName) { 336 if (!userName) {
...@@ -443,8 +444,7 @@ ...@@ -443,8 +444,7 @@
443 // deptInfo.value = app.globalData.dept || {} 444 // deptInfo.value = app.globalData.dept || {}
444 // app.globalData.deptInfo = res.dept || {} 445 // app.globalData.deptInfo = res.dept || {}
445 console.log(43,res) 446 console.log(43,res)
446 if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData 447 if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData.authenticationStatus != '4') {
447 .authenticationStatus != '4') {
448 // 注册引导 448 // 注册引导
449 uni.navigateTo({ 449 uni.navigateTo({
450 url: '/pages/index/perfect' 450 url: '/pages/index/perfect'
...@@ -524,7 +524,7 @@ ...@@ -524,7 +524,7 @@
524 }); 524 });
525 } 525 }
526 </script> 526 </script>
527 <style scope lang="scss"> 527 <style scoped lang="scss">
528 :deep(.uni-section) { 528 :deep(.uni-section) {
529 background-color: transparent !important; 529 background-color: transparent !important;
530 } 530 }
...@@ -642,4 +642,4 @@ ...@@ -642,4 +642,4 @@
642 padding: 0 20rpx 0; 642 padding: 0 20rpx 0;
643 } 643 }
644 } 644 }
645 </style>
...\ No newline at end of file ...\ No newline at end of file
645 </style>
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
84 <button 84 <button
85 class="action-btn submit-btn" 85 class="action-btn submit-btn"
86 @click.stop="commitFN(item)" 86 @click.stop="commitFN(item)"
87 :disabled="item.auditStatus != 0"> 87 :disabled="item.auditStatus != 0&&item.auditStatus != 9">
88 提交审核 88 提交审核
89 </button> 89 </button>
90 </view> 90 </view>
...@@ -630,4 +630,4 @@ onUnmounted(() => { ...@@ -630,4 +630,4 @@ onUnmounted(() => {
630 border-radius:46rpx; 630 border-radius:46rpx;
631 font-weight:600; 631 font-weight:600;
632 } 632 }
633 </style>
...\ No newline at end of file ...\ No newline at end of file
633 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!