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' });
|
||||
|
||||
@@ -360,12 +360,12 @@
|
||||
|
||||
const startHomepageRenewal = () => {
|
||||
const packageId = Number(deviceInfo.currentPackageId || 0);
|
||||
if (!packageId) {
|
||||
const packageName = String(deviceInfo.packageName || '').trim();
|
||||
if (!packageId || !packageName || packageName === '-') {
|
||||
uni.showToast({ title: '当前资产暂无可续费套餐', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const packageName = deviceInfo.packageName === '-' ? '' : deviceInfo.packageName;
|
||||
renewalPopupRef.value?.open([packageId], [packageName]);
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, computed } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { assetApi, orderApi, walletApi } from '@/api/index.js';
|
||||
import { assetApi, isAssetRealNameCompleted, orderApi, walletApi } from '@/api/index.js';
|
||||
import { useUserStore } from '@/store/index.js';
|
||||
import {
|
||||
consumePendingPaymentRefresh,
|
||||
@@ -208,7 +208,7 @@
|
||||
const buyPackage = async (item) => {
|
||||
await loadAssetType();
|
||||
if (assetInfo.value.effective_realname_policy === 'before_order' &&
|
||||
assetInfo.value.realname_required && Number(assetInfo.value.real_name_status) !== 1) {
|
||||
assetInfo.value.realname_required && !isAssetRealNameCompleted(assetInfo.value)) {
|
||||
uni.showModal({
|
||||
title: '需要实名认证',
|
||||
content: '当前资产下单前需要完成实名认证',
|
||||
|
||||
Reference in New Issue
Block a user