d437ba67 by 张猛

小程序支付标志位

1 parent 256a8622
...@@ -1552,7 +1552,7 @@ export function certifiedNew(data) { ...@@ -1552,7 +1552,7 @@ export function certifiedNew(data) {
1552 let url = '/system/certifiedNew/commit' 1552 let url = '/system/certifiedNew/commit'
1553 const params = [] 1553 const params = []
1554 if (data.renewYear) params.push(`renewYear=${data.renewYear}`) 1554 if (data.renewYear) params.push(`renewYear=${data.renewYear}`)
1555 if (data.type) params.push(`type=${data.type}`) 1555 params.push(`type=${data.type}`)
1556 if (data.contactPerson) params.push(`contactPerson=${data.contactPerson}`) 1556 if (data.contactPerson) params.push(`contactPerson=${data.contactPerson}`)
1557 if (data.contactTel) params.push(`contactTel=${data.contactTel}`) 1557 if (data.contactTel) params.push(`contactTel=${data.contactTel}`)
1558 if (params.length > 0) { 1558 if (params.length > 0) {
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
47 <view class="payRow "> 47 <view class="payRow ">
48 <radio-group @change="onPayTypeChange"> 48 <radio-group @change="onPayTypeChange">
49 <label class="radioItem"> 49 <label class="radioItem">
50 <radio :checked="payType == '1'" class="custom-radio" value="0"/> 50 <radio :checked="payType == '0'" class="custom-radio" value="0"/>
51 <view class="payInfo"> 51 <view class="payInfo">
52 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon" mode="widthFix"></image> 52 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon" mode="widthFix"></image>
53 <text>民生付</text> 53 <text>民生付</text>
...@@ -116,7 +116,7 @@ const preferentialPolicy = ref(false) ...@@ -116,7 +116,7 @@ const preferentialPolicy = ref(false)
116 const preferentialData = ref({ 116 const preferentialData = ref({
117 name: '优惠' 117 name: '优惠'
118 }) 118 })
119 const payType = ref('1') 119 const payType = ref('0')
120 const isPaying = ref(false) 120 const isPaying = ref(false)
121 const payName = ref('') 121 const payName = ref('')
122 const assoName = ref('') 122 const assoName = ref('')
...@@ -194,7 +194,7 @@ const handelPay = async () => { ...@@ -194,7 +194,7 @@ const handelPay = async () => {
194 // 构建请求参数 194 // 构建请求参数
195 const params = { 195 const params = {
196 renewYear: form.value.renewYear, 196 renewYear: form.value.renewYear,
197 type: payType.value 197 type: payType.value,
198 } 198 }
199 199
200 // 对公转账需要传联系人信息 200 // 对公转账需要传联系人信息
......
...@@ -30,32 +30,32 @@ ...@@ -30,32 +30,32 @@
30 <view class="section-title">选择支付方式</view> 30 <view class="section-title">选择支付方式</view>
31 <view class="payment-methods"> 31 <view class="payment-methods">
32 <radio-group @change="handlePayTypeChange"> 32 <radio-group @change="handlePayTypeChange">
33 <label class="payment-item" :class="{ selected: payType === '1' }"> 33 <label :class="{ selected: payType === '1' }" class="payment-item">
34 <radio :checked="payType === '1'" value="0" /> 34 <radio :checked="payType =='0'" value="0"/>
35 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon ml10" mode="widthFix"></image> 35 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon ml10" mode="widthFix"></image>
36 <text class="pay-name ml10">民生付</text> 36 <text class="pay-name ml10">民生付</text>
37 </label> 37 </label>
38 <label class="payment-item" :class="{ selected: payType === '3' }"> 38 <label :class="{ selected: payType === '3' }" class="payment-item">
39 <radio :checked="payType === '3'" value="1" /> 39 <radio :checked="payType === '3'" value="1"/>
40 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon ml10" mode="widthFix"></image> 40 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon ml10" mode="widthFix"></image>
41 <text class="pay-name ml10">对公转账</text> 41 <text class="pay-name ml10">对公转账</text>
42 </label> 42 </label>
43 </radio-group> 43 </radio-group>
44 </view> 44 </view>
45 </view> 45 </view>
46 46
47 <!-- 对公转账表单 --> 47 <!-- 对公转账表单 -->
48 <view v-if="payType === '3'" class="transfer-form"> 48 <view v-if="payType === '3'" class="transfer-form">
49 <view class="form-item"> 49 <view class="form-item">
50 <text class="form-label">联系人</text> 50 <text class="form-label">联系人</text>
51 <input class="form-input" v-model="form.contactPerson" placeholder="请输入联系人" /> 51 <input v-model="form.contactPerson" class="form-input" placeholder="请输入联系人"/>
52 </view> 52 </view>
53 <view class="form-item"> 53 <view class="form-item">
54 <text class="form-label">联系电话</text> 54 <text class="form-label">联系电话</text>
55 <input class="form-input" v-model="form.contactTel" type="number" placeholder="请输入联系电话" /> 55 <input v-model="form.contactTel" class="form-input" placeholder="请输入联系电话" type="number"/>
56 </view> 56 </view>
57 </view> 57 </view>
58 58
59 <!-- 底部支付按钮 --> 59 <!-- 底部支付按钮 -->
60 <view class="fixed-bottom"> 60 <view class="fixed-bottom">
61 <button :loading="payLoading" class="pay-btn red-bg" @click="handlePay">立即支付</button> 61 <button :loading="payLoading" class="pay-btn red-bg" @click="handlePay">立即支付</button>
...@@ -77,7 +77,7 @@ import {minShengPay} from "@/common/pay"; ...@@ -77,7 +77,7 @@ import {minShengPay} from "@/common/pay";
77 // 核心数据 77 // 核心数据
78 const formData = ref({}) // 订单统计数据 78 const formData = ref({}) // 订单统计数据
79 const rangeId = ref('') // 核心业务ID 79 const rangeId = ref('') // 核心业务ID
80 const payType = ref('1') // 支付方式(默认0=民生付) 80 const payType = ref('0') // 支付方式(默认0=民生付)
81 const payLoading = ref(false) // 支付按钮加载状态 81 const payLoading = ref(false) // 支付按钮加载状态
82 const form = ref({ 82 const form = ref({
83 contactPerson: '', 83 contactPerson: '',
...@@ -112,7 +112,7 @@ async function getCount() { ...@@ -112,7 +112,7 @@ async function getCount() {
112 112
113 // 支付方式切换 113 // 支付方式切换
114 function handlePayTypeChange(e) { 114 function handlePayTypeChange(e) {
115 payType.value = e.detail.value == '0' ? '1' : '3' 115 payType.value = e.detail.value == '0' ? '0' : '3'
116 console.log('支付方式:', payType.value) 116 console.log('支付方式:', payType.value)
117 if (payType.value === '3') { 117 if (payType.value === '3') {
118 form.value.contactPerson = '' 118 form.value.contactPerson = ''
...@@ -129,28 +129,28 @@ async function handlePay() { ...@@ -129,28 +129,28 @@ async function handlePay() {
129 icon: 'none' 129 icon: 'none'
130 }) 130 })
131 } 131 }
132 132
133 // 对公转账校验 133 // 对公转账校验
134 if (payType.value === '3') { 134 if (payType.value === '3') {
135 if (!form.value.contactPerson) { 135 if (!form.value.contactPerson) {
136 return uni.showToast({ title: '请输入联系人', icon: 'none' }) 136 return uni.showToast({title: '请输入联系人', icon: 'none'})
137 } 137 }
138 if (!form.value.contactTel) { 138 if (!form.value.contactTel) {
139 return uni.showToast({ title: '请输入联系电话', icon: 'none' }) 139 return uni.showToast({title: '请输入联系电话', icon: 'none'})
140 } 140 }
141 // 手机号格式校验 141 // 手机号格式校验
142 if (!/^1[3-9]\d{9}$/.test(form.value.contactTel)) { 142 if (!/^1[3-9]\d{9}$/.test(form.value.contactTel)) {
143 return uni.showToast({ title: '请输入正确的手机号', icon: 'none' }) 143 return uni.showToast({title: '请输入正确的手机号', icon: 'none'})
144 } 144 }
145 } 145 }
146 146
147 try { 147 try {
148 payLoading.value = true 148 payLoading.value = true
149 uni.showLoading({ 149 uni.showLoading({
150 title: '提交中...', 150 title: '提交中...',
151 mask: true 151 mask: true
152 }) 152 })
153 153
154 // 构建请求参数 154 // 构建请求参数
155 const params = { 155 const params = {
156 id: rangeId.value, 156 id: rangeId.value,
...@@ -160,10 +160,10 @@ async function handlePay() { ...@@ -160,10 +160,10 @@ async function handlePay() {
160 params.contactPerson = form.value.contactPerson 160 params.contactPerson = form.value.contactPerson
161 params.contactTel = form.value.contactTel 161 params.contactTel = form.value.contactTel
162 } 162 }
163 163
164 const res = await api.goPay(params) 164 const res = await api.goPay(params)
165 const resData = res.data 165 const resData = res.data
166 166
167 // 对公转账 - 跳转转账信息页面 167 // 对公转账 - 跳转转账信息页面
168 if (resData.payFlag == 2) { 168 if (resData.payFlag == 2) {
169 uni.hideLoading() 169 uni.hideLoading()
...@@ -172,12 +172,12 @@ async function handlePay() { ...@@ -172,12 +172,12 @@ async function handlePay() {
172 }) 172 })
173 return 173 return
174 } 174 }
175 175
176 // 民生付 176 // 民生付
177 if (resData.payResult && resData.payResult.encryptedData) { 177 if (resData.payResult && resData.payResult.encryptedData) {
178 const reason = await minShengPay(resData.orderId, resData.payResult.encryptedData) 178 const reason = await minShengPay(resData.orderId, resData.payResult.encryptedData)
179 if (reason == 'OK') { 179 if (reason == 'OK') {
180 uni.showToast({ title: '支付成功', icon: 'success' }) 180 uni.showToast({title: '支付成功', icon: 'success'})
181 setTimeout(() => { 181 setTimeout(() => {
182 uni.hideLoading() 182 uni.hideLoading()
183 uni.redirectTo({ 183 uni.redirectTo({
...@@ -186,7 +186,7 @@ async function handlePay() { ...@@ -186,7 +186,7 @@ async function handlePay() {
186 }, 1500) 186 }, 1500)
187 } 187 }
188 } 188 }
189 189
190 } catch (err) { 190 } catch (err) {
191 console.log(err) 191 console.log(err)
192 const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试' 192 const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试'
...@@ -271,7 +271,7 @@ async function handlePay() { ...@@ -271,7 +271,7 @@ async function handlePay() {
271 // 支付方式区域 271 // 支付方式区域
272 .pay-type-section { 272 .pay-type-section {
273 margin-bottom: 30rpx; 273 margin-bottom: 30rpx;
274 274
275 .section-title { 275 .section-title {
276 font-size: 32rpx; 276 font-size: 32rpx;
277 font-weight: 600; 277 font-weight: 600;
...@@ -279,7 +279,7 @@ async function handlePay() { ...@@ -279,7 +279,7 @@ async function handlePay() {
279 margin-bottom: 20rpx; 279 margin-bottom: 20rpx;
280 position: relative; 280 position: relative;
281 padding-left: 20rpx; 281 padding-left: 20rpx;
282 282
283 &::before { 283 &::before {
284 content: ''; 284 content: '';
285 position: absolute; 285 position: absolute;
...@@ -298,19 +298,19 @@ async function handlePay() { ...@@ -298,19 +298,19 @@ async function handlePay() {
298 background: #f8f9fa; 298 background: #f8f9fa;
299 border-radius: 12rpx; 299 border-radius: 12rpx;
300 padding: 20rpx; 300 padding: 20rpx;
301 301
302 .payment-item { 302 .payment-item {
303 display: flex; 303 display: flex;
304 align-items: center; 304 align-items: center;
305 padding: 16rpx; 305 padding: 16rpx;
306 border-radius: 12rpx; 306 border-radius: 12rpx;
307 border: 2rpx solid transparent; 307 border: 2rpx solid transparent;
308 308
309 &.selected { 309 &.selected {
310 border-color: #e4393c; 310 border-color: #e4393c;
311 background: #fff; 311 background: #fff;
312 } 312 }
313 313
314 // 覆盖原生 radio 样式 314 // 覆盖原生 radio 样式
315 ::v-deep radio .wx-radio-input, 315 ::v-deep radio .wx-radio-input,
316 ::v-deep radio .uni-radio-input { 316 ::v-deep radio .uni-radio-input {
...@@ -318,24 +318,24 @@ async function handlePay() { ...@@ -318,24 +318,24 @@ async function handlePay() {
318 height: 36rpx; 318 height: 36rpx;
319 border-color: #ccc !important; 319 border-color: #ccc !important;
320 } 320 }
321 321
322 ::v-deep radio .wx-radio-input.wx-radio-input-checked, 322 ::v-deep radio .wx-radio-input.wx-radio-input-checked,
323 ::v-deep radio .uni-radio-input-checked { 323 ::v-deep radio .uni-radio-input-checked {
324 border-color: #e4393c !important; 324 border-color: #e4393c !important;
325 background: #e4393c !important; 325 background: #e4393c !important;
326 } 326 }
327 327
328 .icon { 328 .icon {
329 width: 40rpx; 329 width: 40rpx;
330 height: 40rpx; 330 height: 40rpx;
331 } 331 }
332 332
333 .pay-name { 333 .pay-name {
334 font-size: 30rpx; 334 font-size: 30rpx;
335 color: #333; 335 color: #333;
336 font-weight: 500; 336 font-weight: 500;
337 } 337 }
338 338
339 .ml10 { 339 .ml10 {
340 margin-left: 10rpx; 340 margin-left: 10rpx;
341 } 341 }
...@@ -348,25 +348,25 @@ async function handlePay() { ...@@ -348,25 +348,25 @@ async function handlePay() {
348 border-radius: 12rpx; 348 border-radius: 12rpx;
349 padding: 20rpx; 349 padding: 20rpx;
350 margin-bottom: 30rpx; 350 margin-bottom: 30rpx;
351 351
352 .form-item { 352 .form-item {
353 display: flex; 353 display: flex;
354 align-items: center; 354 align-items: center;
355 padding: 20rpx 0; 355 padding: 20rpx 0;
356 border-bottom: 1rpx solid #eee; 356 border-bottom: 1rpx solid #eee;
357 357
358 &:last-child { 358 &:last-child {
359 border-bottom: none; 359 border-bottom: none;
360 } 360 }
361 } 361 }
362 362
363 .form-label { 363 .form-label {
364 font-size: 28rpx; 364 font-size: 28rpx;
365 color: #333; 365 color: #333;
366 width: 140rpx; 366 width: 140rpx;
367 flex-shrink: 0; 367 flex-shrink: 0;
368 } 368 }
369 369
370 .form-input { 370 .form-input {
371 flex: 1; 371 flex: 1;
372 font-size: 28rpx; 372 font-size: 28rpx;
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
96 <text>我的订单</text> 96 <text>我的订单</text>
97 <view class="arrow"></view> 97 <view class="arrow"></view>
98 </view> 98 </view>
99 <view class="level-item" @click="goPath('/level/chooseExaminer?pageType=1')"> 99 <view class="level-item" @click="goPath('/level/chooseExaminer?pageType=1')">
100 <image :src="config.loginImage_api + '/fs/static/dg/icon11@2x.png'" class="level-icon"></image> 100 <image :src="config.loginImage_api + '/fs/static/dg/icon11@2x.png'" class="level-icon"></image>
101 <text>考官库</text> 101 <text>考官库</text>
102 <view class="arrow"></view> 102 <view class="arrow"></view>
...@@ -569,7 +569,7 @@ ...@@ -569,7 +569,7 @@
569 </view> 569 </view>
570 </view> 570 </view>
571 </uni-popup> 571 </uni-popup>
572 572
573 <uni-popup ref="authPayPopup" :mask-click="false" type="center"> 573 <uni-popup ref="authPayPopup" :mask-click="false" type="center">
574 <view class="dialog-wrapper auth-pay-dialog"> 574 <view class="dialog-wrapper auth-pay-dialog">
575 <view class="dialog-title">提示</view> 575 <view class="dialog-title">提示</view>
...@@ -581,7 +581,7 @@ ...@@ -581,7 +581,7 @@
581 </view> 581 </view>
582 </view> 582 </view>
583 </uni-popup> 583 </uni-popup>
584 584
585 <!-- 密码长期未更新提示弹框 --> 585 <!-- 密码长期未更新提示弹框 -->
586 <uni-popup ref="passwordTipPopup" :mask-click="false" type="center"> 586 <uni-popup ref="passwordTipPopup" :mask-click="false" type="center">
587 <view class="dialog-wrapper password-tip-dialog"> 587 <view class="dialog-wrapper password-tip-dialog">
...@@ -637,7 +637,7 @@ const associateIdForAuthPay = ref(0) ...@@ -637,7 +637,7 @@ const associateIdForAuthPay = ref(0)
637 637
638 // 是否是道馆用户 638 // 是否是道馆用户
639 const isDaoGuan = computed(() => { 639 const isDaoGuan = computed(() => {
640 console.log('isDaoGuan', app.globalData.deptType,userType.value) 640 console.log('isDaoGuan', app.globalData.deptType, userType.value)
641 return userType.value == '4' || app.globalData.deptType == '6' || app.globalData.deptType == '3' 641 return userType.value == '4' || app.globalData.deptType == '6' || app.globalData.deptType == '3'
642 }) 642 })
643 643
...@@ -691,7 +691,7 @@ onLoad(option => { ...@@ -691,7 +691,7 @@ onLoad(option => {
691 menus: ['shareAppMessage', 'shareTimeline'] 691 menus: ['shareAppMessage', 'shareTimeline']
692 }); 692 });
693 } 693 }
694 console.log('app.globalData22',app.globalData.changePassFlag,app.globalData.memberInfo?.activeStatus,app.globalData.authenticationStatus) 694 console.log('app.globalData22', app.globalData.changePassFlag, app.globalData.memberInfo?.activeStatus, app.globalData.authenticationStatus)
695 }); 695 });
696 696
697 697
...@@ -1027,14 +1027,14 @@ async function handleNoDisplay() { ...@@ -1027,14 +1027,14 @@ async function handleNoDisplay() {
1027 function checkDialogs() { 1027 function checkDialogs() {
1028 const user = app.globalData.userInfo || {} 1028 const user = app.globalData.userInfo || {}
1029 const memberInfoData = app.globalData.memberInfo || {} 1029 const memberInfoData = app.globalData.memberInfo || {}
1030 1030
1031 // 密码长期未更新提示: changePassFlag='1' && activeStatus=1 && authenticationStatus=2 1031 // 密码长期未更新提示: changePassFlag='1' && activeStatus=1 && authenticationStatus=2
1032 if (app.globalData.changePassFlag == '1' && 1032 if (app.globalData.changePassFlag == '1' &&
1033 app.globalData.memberInfo?.activeStatus == '1' && 1033 app.globalData.memberInfo?.activeStatus == '1' &&
1034 app.globalData.authenticationStatus == 2) { 1034 app.globalData.authenticationStatus == 2) {
1035 passwordTipPopup.value.open() 1035 // passwordTipPopup.value.open()
1036 } 1036 }
1037 1037
1038 // 绑定手机号条件: changePassFlag='1' && activeStatus=1 && authenticationStatus=2 && phonenumber为空 && checkFlag=1 1038 // 绑定手机号条件: changePassFlag='1' && activeStatus=1 && authenticationStatus=2 && phonenumber为空 && checkFlag=1
1039 if (app.globalData.changePassFlag === '1' && 1039 if (app.globalData.changePassFlag === '1' &&
1040 app.globalData.memberInfo?.activeStatus == 1 && 1040 app.globalData.memberInfo?.activeStatus == 1 &&
...@@ -1044,7 +1044,7 @@ function checkDialogs() { ...@@ -1044,7 +1044,7 @@ function checkDialogs() {
1044 refreshCaptcha() 1044 refreshCaptcha()
1045 bindingPhonePopup.value.open() 1045 bindingPhonePopup.value.open()
1046 } 1046 }
1047 1047
1048 // 申请考点条件: activeStatus=1 && authenticationStatus=2 && hintFlag=1 && deptType=6 && isPoints=1 1048 // 申请考点条件: activeStatus=1 && authenticationStatus=2 && hintFlag=1 && deptType=6 && isPoints=1
1049 if (app.globalData.memberInfo?.activeStatus == 1 && 1049 if (app.globalData.memberInfo?.activeStatus == 1 &&
1050 app.globalData.authenticationStatus == 2 && 1050 app.globalData.authenticationStatus == 2 &&
...@@ -1484,6 +1484,7 @@ function checkDialogs() { ...@@ -1484,6 +1484,7 @@ function checkDialogs() {
1484 .dialog-icon { 1484 .dialog-icon {
1485 color: #AD181F; 1485 color: #AD181F;
1486 } 1486 }
1487
1487 .dialog-message { 1488 .dialog-message {
1488 font-size: 28rpx; 1489 font-size: 28rpx;
1489 color: #606266; 1490 color: #606266;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!