fix: 只要任意一张实名了就可以不强制跳
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 59s
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 59s
This commit is contained in:
@@ -91,7 +91,9 @@
|
||||
<view class="form-label">收件人电话</view>
|
||||
<up-input
|
||||
v-model="form.recipient_phone"
|
||||
placeholder="请输入收件人电话"
|
||||
placeholder="请输入11位手机号"
|
||||
type="number"
|
||||
maxlength="11"
|
||||
border="surround"
|
||||
/>
|
||||
</view>
|
||||
@@ -188,6 +190,24 @@
|
||||
return String(time).split('T').join(' ').slice(0, 19);
|
||||
};
|
||||
|
||||
const getRecipientPhone = () => String(form.recipient_phone || '').trim();
|
||||
|
||||
const validateRecipientPhone = () => {
|
||||
const phone = getRecipientPhone();
|
||||
|
||||
if (!phone) {
|
||||
uni.showToast({ title: '请输入收件人电话', icon: 'none' });
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!PHONE_REG.test(phone)) {
|
||||
uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
||||
return '';
|
||||
}
|
||||
|
||||
return phone;
|
||||
};
|
||||
|
||||
const syncAreaPickerState = (regionCodes = []) => {
|
||||
const { columns, defaultIndex } = buildRegionColumns(regionCodes);
|
||||
areaPickerColumns.value = columns;
|
||||
@@ -307,15 +327,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (!form.recipient_phone.trim()) {
|
||||
uni.showToast({ title: '请输入收件人电话', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PHONE_REG.test(form.recipient_phone.trim())) {
|
||||
uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const recipientPhone = validateRecipientPhone();
|
||||
if (!recipientPhone) return;
|
||||
|
||||
if (form.recipient_region_codes.length !== 3) {
|
||||
uni.showToast({ title: '请选择省市区', icon: 'none' });
|
||||
@@ -336,7 +349,7 @@
|
||||
await exchangeApi.submitShippingInfo(
|
||||
exchangeData.value.id,
|
||||
form.recipient_name.trim(),
|
||||
form.recipient_phone.trim(),
|
||||
recipientPhone,
|
||||
recipientAddress
|
||||
);
|
||||
uni.showToast({ title: '提交成功', icon: 'success' });
|
||||
|
||||
Reference in New Issue
Block a user