8d0f93af by lttnew

单位注册支付

1 parent 37eb19e7
......@@ -47,14 +47,14 @@
<view class="payRow ">
<radio-group @change="onPayTypeChange">
<label class="radioItem">
<radio :checked="payType === '0'" class="custom-radio" value="0"/>
<radio :checked="payType == '1'" class="custom-radio" value="0"/>
<view class="payInfo">
<image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon" mode="widthFix"></image>
<text>民生付</text>
</view>
</label>
<label class="radioItem mt10">
<radio :checked="payType === '3'" class="custom-radio" value="3"/>
<radio :checked="payType == '3'" class="custom-radio" value="3"/>
<view class="payInfo">
<image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon" mode="widthFix"></image>
<text>对公转账</text>
......
<template>
<template>
<view class="perfect-page">
<!-- 顶部步骤条 -->
<view class="steps-bar">
......@@ -204,7 +204,7 @@
<view class="notice-box">
<checkbox-group @change="onNoticeChange">
<label class="notice-label">
<checkbox :checked="form.notice" color="#e64329" value="1"/>
<checkbox :checked="form.notice" color="#AD181F" value="1"/>
<text class="notice-text">我已阅读并同意</text>
<text class="notice-link" @click.stop="showNotice(1)">《注册须知》</text>
<text class="notice-link" @click.stop="showNotice(2)">《入会须知》</text>
......@@ -418,24 +418,30 @@ function onNoticeChange(e) {
}
// 社会信用代码失焦校验
function onCreditCodeBlur() {
return new Promise((resolve, reject) => {
const creditCode = form.value.creditCode
if (!creditCode) return
api.creditCodeExist(creditCode).then(res => {
if (res.data) {
creditCodeValid.value = false
async function onCreditCodeBlur(showErrorToast = true) {
const currentCreditCode = (form.value.creditCode || '').trim()
if (!currentCreditCode) {
creditCodeValid.value = true
return true
}
try {
const res = await api.creditCodeExist(currentCreditCode)
if (res.data) {
creditCodeValid.value = false
if (showErrorToast) {
uni.showToast({title: '社会信用代码已存在,请联系中跆协修改', icon: 'none', duration: 3000})
return reject()
} else {
creditCodeValid.value = true
return resolve()
}
}).catch(() => {
creditCodeValid.value = true
return reject()
})
})
return false
}
creditCodeValid.value = true
return true
} catch (e) {
creditCodeValid.value = false
if (showErrorToast) {
uni.showToast({title: '社会信用代码校验失败,请稍后重试', icon: 'none', duration: 3000})
}
return false
}
}
// 查看须知 - 跳转到须知页面
......@@ -759,9 +765,9 @@ function changeAddress(e) {
console.log("选择的地址:", selectedValue);
// 直接赋值纯ID,不要再取 .value
form.value.provinceId = selectedValue[0] || '';
form.value.cityId = selectedValue[1] || '';
form.value.regionId = selectedValue[2] || '';
form.value.provinceId = selectedValue[0].value || '';
form.value.cityId = selectedValue[1].value || '';
form.value.regionId = selectedValue[2] ? selectedValue[2].value || '' : '';
// 同步更新选择器显示
coordinates1.value = selectedValue;
......@@ -905,7 +911,11 @@ async function submitStep2() {
return
}
await onCreditCodeBlur()
const creditCodePass = await onCreditCodeBlur(false)
if (!creditCodePass) {
uni.showToast({title: '社会信用代码已存在,请联系中跆协修改', icon: 'none', duration: 3000})
return
}
uni.showLoading({title: '验证中...'})
await api.checkBusinessLicense({
creditCode: form.value.creditCode,
......@@ -1020,6 +1030,7 @@ function onBusinessLicenseSelect() {
form.value.creditCode = data.data.creditCode
form.value.companyName = data.data.companyName
name = data.data.name || '营业执照'
onCreditCodeBlur()
}
// 存储为数组格式的JSON字符串
form.value.businessLicense = JSON.stringify([{
......@@ -1370,7 +1381,7 @@ watch(activeStep, (newVal) => {
.tips-title {
display: inline-block;
background: #e64329;
background: #AD181F;
color: #fff;
font-size: 22rpx;
padding: 4rpx 16rpx;
......@@ -1446,12 +1457,12 @@ watch(activeStep, (newVal) => {
.logout-icon {
font-size: 28rpx;
color: #e64329;
color: #AD181F;
}
.logout-text {
font-size: 24rpx;
color: #e64329;
color: #AD181F;
}
......@@ -1486,12 +1497,12 @@ watch(activeStep, (newVal) => {
.logout-icon {
font-size: 28rpx;
color: #e64329;
color: #AD181F;
}
.logout-text {
font-size: 22rpx;
color: #e64329;
color: #AD181F;
}
}
......@@ -1509,7 +1520,7 @@ watch(activeStep, (newVal) => {
}
.btn-row button:first-child {
background: #e64329;
background: #AD181F;
color: #fff;
}
......@@ -1590,7 +1601,7 @@ watch(activeStep, (newVal) => {
position: absolute;
top: 10rpx;
right: 10rpx;
background: #e64329;
background: #AD181F;
color: #fff;
width: 40rpx;
height: 40rpx;
......@@ -1653,7 +1664,7 @@ watch(activeStep, (newVal) => {
width: 300rpx;
height: 80rpx;
line-height: 80rpx;
background: #e64329;
background: #AD181F;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
......@@ -1670,7 +1681,7 @@ watch(activeStep, (newVal) => {
}
.text-danger {
color: #e64329;
color: #AD181F;
}
.text-success {
......@@ -1966,7 +1977,7 @@ watch(activeStep, (newVal) => {
.status-reject {
background: linear-gradient(135deg, #fef0f0 0%, #fde8e8 100%);
color: #e64329;
color: #AD181F;
}
.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!