8d0f93af by lttnew

单位注册支付

1 parent 37eb19e7
...@@ -47,14 +47,14 @@ ...@@ -47,14 +47,14 @@
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 === '0'" class="custom-radio" value="0"/> 50 <radio :checked="payType == '1'" 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>
54 </view> 54 </view>
55 </label> 55 </label>
56 <label class="radioItem mt10"> 56 <label class="radioItem mt10">
57 <radio :checked="payType === '3'" class="custom-radio" value="3"/> 57 <radio :checked="payType == '3'" class="custom-radio" value="3"/>
58 <view class="payInfo"> 58 <view class="payInfo">
59 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon" mode="widthFix"></image> 59 <image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon" mode="widthFix"></image>
60 <text>对公转账</text> 60 <text>对公转账</text>
......
1 <template> 1 <template>
2 <view class="perfect-page"> 2 <view class="perfect-page">
3 <!-- 顶部步骤条 --> 3 <!-- 顶部步骤条 -->
4 <view class="steps-bar"> 4 <view class="steps-bar">
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
204 <view class="notice-box"> 204 <view class="notice-box">
205 <checkbox-group @change="onNoticeChange"> 205 <checkbox-group @change="onNoticeChange">
206 <label class="notice-label"> 206 <label class="notice-label">
207 <checkbox :checked="form.notice" color="#e64329" value="1"/> 207 <checkbox :checked="form.notice" color="#AD181F" value="1"/>
208 <text class="notice-text">我已阅读并同意</text> 208 <text class="notice-text">我已阅读并同意</text>
209 <text class="notice-link" @click.stop="showNotice(1)">《注册须知》</text> 209 <text class="notice-link" @click.stop="showNotice(1)">《注册须知》</text>
210 <text class="notice-link" @click.stop="showNotice(2)">《入会须知》</text> 210 <text class="notice-link" @click.stop="showNotice(2)">《入会须知》</text>
...@@ -418,24 +418,30 @@ function onNoticeChange(e) { ...@@ -418,24 +418,30 @@ function onNoticeChange(e) {
418 } 418 }
419 419
420 // 社会信用代码失焦校验 420 // 社会信用代码失焦校验
421 function onCreditCodeBlur() { 421 async function onCreditCodeBlur(showErrorToast = true) {
422 return new Promise((resolve, reject) => { 422 const currentCreditCode = (form.value.creditCode || '').trim()
423 const creditCode = form.value.creditCode 423 if (!currentCreditCode) {
424 if (!creditCode) return 424 creditCodeValid.value = true
425 api.creditCodeExist(creditCode).then(res => { 425 return true
426 if (res.data) { 426 }
427 creditCodeValid.value = false 427 try {
428 const res = await api.creditCodeExist(currentCreditCode)
429 if (res.data) {
430 creditCodeValid.value = false
431 if (showErrorToast) {
428 uni.showToast({title: '社会信用代码已存在,请联系中跆协修改', icon: 'none', duration: 3000}) 432 uni.showToast({title: '社会信用代码已存在,请联系中跆协修改', icon: 'none', duration: 3000})
429 return reject()
430 } else {
431 creditCodeValid.value = true
432 return resolve()
433 } 433 }
434 }).catch(() => { 434 return false
435 creditCodeValid.value = true 435 }
436 return reject() 436 creditCodeValid.value = true
437 }) 437 return true
438 }) 438 } catch (e) {
439 creditCodeValid.value = false
440 if (showErrorToast) {
441 uni.showToast({title: '社会信用代码校验失败,请稍后重试', icon: 'none', duration: 3000})
442 }
443 return false
444 }
439 } 445 }
440 446
441 // 查看须知 - 跳转到须知页面 447 // 查看须知 - 跳转到须知页面
...@@ -759,9 +765,9 @@ function changeAddress(e) { ...@@ -759,9 +765,9 @@ function changeAddress(e) {
759 console.log("选择的地址:", selectedValue); 765 console.log("选择的地址:", selectedValue);
760 766
761 // 直接赋值纯ID,不要再取 .value 767 // 直接赋值纯ID,不要再取 .value
762 form.value.provinceId = selectedValue[0] || ''; 768 form.value.provinceId = selectedValue[0].value || '';
763 form.value.cityId = selectedValue[1] || ''; 769 form.value.cityId = selectedValue[1].value || '';
764 form.value.regionId = selectedValue[2] || ''; 770 form.value.regionId = selectedValue[2] ? selectedValue[2].value || '' : '';
765 771
766 // 同步更新选择器显示 772 // 同步更新选择器显示
767 coordinates1.value = selectedValue; 773 coordinates1.value = selectedValue;
...@@ -905,7 +911,11 @@ async function submitStep2() { ...@@ -905,7 +911,11 @@ async function submitStep2() {
905 return 911 return
906 } 912 }
907 913
908 await onCreditCodeBlur() 914 const creditCodePass = await onCreditCodeBlur(false)
915 if (!creditCodePass) {
916 uni.showToast({title: '社会信用代码已存在,请联系中跆协修改', icon: 'none', duration: 3000})
917 return
918 }
909 uni.showLoading({title: '验证中...'}) 919 uni.showLoading({title: '验证中...'})
910 await api.checkBusinessLicense({ 920 await api.checkBusinessLicense({
911 creditCode: form.value.creditCode, 921 creditCode: form.value.creditCode,
...@@ -1020,6 +1030,7 @@ function onBusinessLicenseSelect() { ...@@ -1020,6 +1030,7 @@ function onBusinessLicenseSelect() {
1020 form.value.creditCode = data.data.creditCode 1030 form.value.creditCode = data.data.creditCode
1021 form.value.companyName = data.data.companyName 1031 form.value.companyName = data.data.companyName
1022 name = data.data.name || '营业执照' 1032 name = data.data.name || '营业执照'
1033 onCreditCodeBlur()
1023 } 1034 }
1024 // 存储为数组格式的JSON字符串 1035 // 存储为数组格式的JSON字符串
1025 form.value.businessLicense = JSON.stringify([{ 1036 form.value.businessLicense = JSON.stringify([{
...@@ -1370,7 +1381,7 @@ watch(activeStep, (newVal) => { ...@@ -1370,7 +1381,7 @@ watch(activeStep, (newVal) => {
1370 1381
1371 .tips-title { 1382 .tips-title {
1372 display: inline-block; 1383 display: inline-block;
1373 background: #e64329; 1384 background: #AD181F;
1374 color: #fff; 1385 color: #fff;
1375 font-size: 22rpx; 1386 font-size: 22rpx;
1376 padding: 4rpx 16rpx; 1387 padding: 4rpx 16rpx;
...@@ -1446,12 +1457,12 @@ watch(activeStep, (newVal) => { ...@@ -1446,12 +1457,12 @@ watch(activeStep, (newVal) => {
1446 1457
1447 .logout-icon { 1458 .logout-icon {
1448 font-size: 28rpx; 1459 font-size: 28rpx;
1449 color: #e64329; 1460 color: #AD181F;
1450 } 1461 }
1451 1462
1452 .logout-text { 1463 .logout-text {
1453 font-size: 24rpx; 1464 font-size: 24rpx;
1454 color: #e64329; 1465 color: #AD181F;
1455 } 1466 }
1456 1467
1457 1468
...@@ -1486,12 +1497,12 @@ watch(activeStep, (newVal) => { ...@@ -1486,12 +1497,12 @@ watch(activeStep, (newVal) => {
1486 1497
1487 .logout-icon { 1498 .logout-icon {
1488 font-size: 28rpx; 1499 font-size: 28rpx;
1489 color: #e64329; 1500 color: #AD181F;
1490 } 1501 }
1491 1502
1492 .logout-text { 1503 .logout-text {
1493 font-size: 22rpx; 1504 font-size: 22rpx;
1494 color: #e64329; 1505 color: #AD181F;
1495 } 1506 }
1496 } 1507 }
1497 1508
...@@ -1509,7 +1520,7 @@ watch(activeStep, (newVal) => { ...@@ -1509,7 +1520,7 @@ watch(activeStep, (newVal) => {
1509 } 1520 }
1510 1521
1511 .btn-row button:first-child { 1522 .btn-row button:first-child {
1512 background: #e64329; 1523 background: #AD181F;
1513 color: #fff; 1524 color: #fff;
1514 } 1525 }
1515 1526
...@@ -1590,7 +1601,7 @@ watch(activeStep, (newVal) => { ...@@ -1590,7 +1601,7 @@ watch(activeStep, (newVal) => {
1590 position: absolute; 1601 position: absolute;
1591 top: 10rpx; 1602 top: 10rpx;
1592 right: 10rpx; 1603 right: 10rpx;
1593 background: #e64329; 1604 background: #AD181F;
1594 color: #fff; 1605 color: #fff;
1595 width: 40rpx; 1606 width: 40rpx;
1596 height: 40rpx; 1607 height: 40rpx;
...@@ -1653,7 +1664,7 @@ watch(activeStep, (newVal) => { ...@@ -1653,7 +1664,7 @@ watch(activeStep, (newVal) => {
1653 width: 300rpx; 1664 width: 300rpx;
1654 height: 80rpx; 1665 height: 80rpx;
1655 line-height: 80rpx; 1666 line-height: 80rpx;
1656 background: #e64329; 1667 background: #AD181F;
1657 color: #fff; 1668 color: #fff;
1658 border-radius: 40rpx; 1669 border-radius: 40rpx;
1659 font-size: 28rpx; 1670 font-size: 28rpx;
...@@ -1670,7 +1681,7 @@ watch(activeStep, (newVal) => { ...@@ -1670,7 +1681,7 @@ watch(activeStep, (newVal) => {
1670 } 1681 }
1671 1682
1672 .text-danger { 1683 .text-danger {
1673 color: #e64329; 1684 color: #AD181F;
1674 } 1685 }
1675 1686
1676 .text-success { 1687 .text-success {
...@@ -1966,7 +1977,7 @@ watch(activeStep, (newVal) => { ...@@ -1966,7 +1977,7 @@ watch(activeStep, (newVal) => {
1966 1977
1967 .status-reject { 1978 .status-reject {
1968 background: linear-gradient(135deg, #fef0f0 0%, #fde8e8 100%); 1979 background: linear-gradient(135deg, #fef0f0 0%, #fde8e8 100%);
1969 color: #e64329; 1980 color: #AD181F;
1970 } 1981 }
1971 1982
1972 .status-pending { 1983 .status-pending {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!