uniapp【修复】:添加地址时,验证手机号

This commit is contained in:
15093570141
2024-10-23 14:16:18 +08:00
parent 6dcd665a41
commit 1edaa65fad

View File

@@ -64,7 +64,8 @@
import { useShopConfigStore } from '@/core/store';
import { handleShowToast } from '@/core/utils';
import { useLoadingFn } from '@/core/hooks';
import { mobile } from '@/uni_modules/uv-ui-tools/libs/function/test.js';
interface QueryParams {
type : string;
id : string | number;
@@ -294,7 +295,7 @@
if (!state.form.mobile) {
handleShowToast('请输入收货人手机号'); return;
}
if (state.form.mobile.length !== 11) {
if (!mobile(state.form.mobile)) {
handleShowToast('收货人手机号格式不正确'); return;
}
if (state.form.areaId <= 0) {