diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/api/core/captcha.ts b/Yi.Vben5.Vue3/apps/web-antd/src/api/core/captcha.ts index 734ff637..83a826e7 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/api/core/captcha.ts +++ b/Yi.Vben5.Vue3/apps/web-antd/src/api/core/captcha.ts @@ -2,12 +2,12 @@ import { requestClient } from '#/api/request'; /** * 发送短信验证码 - * @param phonenumber 手机号 + * @param phone 手机号 * @returns void */ -export function sendSmsCode(phonenumber: string) { +export function sendSmsCode(phone: string) { return requestClient.get('/resource/sms/code', { - params: { phonenumber }, + params: { phone }, }); } diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/api/core/user.ts b/Yi.Vben5.Vue3/apps/web-antd/src/api/core/user.ts index 744ad3b4..981a7d8c 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/api/core/user.ts +++ b/Yi.Vben5.Vue3/apps/web-antd/src/api/core/user.ts @@ -20,7 +20,7 @@ export interface User { loginDate: string; loginIp: string; nick: string; - phonenumber: string; + phone: string; remark: string; roles: Role[]; sex: string; diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/model.d.ts b/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/model.d.ts index a25873e5..3d5c3068 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/model.d.ts +++ b/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/model.d.ts @@ -35,7 +35,7 @@ export interface User { nick: string; userType: string; email: string; - phonenumber: string; + phone: string; sex: string; avatar: string; status: string; diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/authentication/code-login.vue b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/authentication/code-login.vue index 657a902d..faf25957 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/authentication/code-login.vue +++ b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/authentication/code-login.vue @@ -65,7 +65,7 @@ const formSchema = computed((): VbenFormSchema[] => { componentProps: { placeholder: $t('authentication.mobile'), }, - fieldName: 'phoneNumber', + fieldName: 'phone', label: $t('authentication.mobile'), rules: z .string() @@ -89,7 +89,7 @@ const formSchema = computed((): VbenFormSchema[] => { codeLength: CODE_LENGTH, placeholder: $t('authentication.code'), handleSendCode: async () => { - const { valid, value } = await form.validateField('phoneNumber'); + const { valid, value } = await form.validateField('phone'); if (!valid) { // 必须抛异常 不能直接return throw new Error('未填写手机号'); @@ -114,7 +114,7 @@ async function handleLogin(values: LoginCodeParams) { try { const requestParams: any = { tenantId: values.tenantId, - phonenumber: values.phoneNumber, + phone: values.phone, smsCode: values.code, grantType: 'sms', }; diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue index b6a8ab1e..fc16b4ed 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue +++ b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue @@ -68,7 +68,7 @@ const [BasicForm, formApi] = useVbenForm({ }, { component: 'Input', - fieldName: 'phonenumber', + fieldName: 'phone', label: '电话', rules: z.string().regex(/^1[3-9]\d{9}$/, '请输入正确的电话'), }, @@ -106,7 +106,7 @@ onMounted(() => { 'userId', 'nick', 'email', - 'phonenumber', + 'phone', 'sex', ]); formApi.setValues(data); diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/profile-panel.vue b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/profile-panel.vue index 781eaabc..da693853 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/profile-panel.vue +++ b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/profile-panel.vue @@ -61,7 +61,7 @@ const poetrySrc = computed(() => { {{ profile.user.userName }} - {{ profile.user.phonenumber || '未绑定手机号' }} + {{ profile.user.phone || '未绑定手机号' }} {{ profile.user.email || '未绑定邮箱' }} diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/views/system/role-assign/data.tsx b/Yi.Vben5.Vue3/apps/web-antd/src/views/system/role-assign/data.tsx index 2cc5e98c..7db1c90f 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/views/system/role-assign/data.tsx +++ b/Yi.Vben5.Vue3/apps/web-antd/src/views/system/role-assign/data.tsx @@ -9,7 +9,7 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Input', - fieldName: 'phonenumber', + fieldName: 'phone', label: '手机号码', }, ]; @@ -30,7 +30,7 @@ export const columns: VxeGridProps['columns'] = [ }, { title: '手机号', - field: 'phonenumber', + field: 'phone', }, { field: 'action', diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/views/workflow/components/user-select-modal.vue b/Yi.Vben5.Vue3/apps/web-antd/src/views/workflow/components/user-select-modal.vue index 60790114..8e43f8b2 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/views/workflow/components/user-select-modal.vue +++ b/Yi.Vben5.Vue3/apps/web-antd/src/views/workflow/components/user-select-modal.vue @@ -308,7 +308,7 @@ function handleSubmit() {
{{ row.nick }}
- {{ row.phonenumber || '暂无手机号' }} + {{ row.phone || '暂无手机号' }}
@@ -340,7 +340,7 @@ function handleSubmit() { {{ row.nick }}
- {{ row.phonenumber || '暂无手机号' }} + {{ row.phone || '暂无手机号' }}
diff --git a/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/code-login.vue b/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/code-login.vue index a87c1ae7..c1ad655c 100644 --- a/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/code-login.vue +++ b/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/code-login.vue @@ -48,7 +48,7 @@ const props = withDefaults(defineProps(), { }); const emit = defineEmits<{ - submit: [{ code: string; phoneNumber: string; tenantId: string }]; + submit: [{ code: string; phone: string; tenantId: string }]; }>(); const router = useRouter(); @@ -71,7 +71,7 @@ async function handleSubmit() { emit('submit', { tenantId: values?.tenantId, code: values?.code, - phoneNumber: values?.phoneNumber, + phone: values?.phone, }); } } diff --git a/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/types.ts b/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/types.ts index 0e4288f0..894be24b 100644 --- a/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/types.ts +++ b/Yi.Vben5.Vue3/packages/effects/common-ui/src/ui/authentication/types.ts @@ -91,7 +91,7 @@ interface LoginAndRegisterParams { interface LoginCodeParams { tenantId: string; code: string; - phoneNumber: string; + phone: string; } interface LoginEmits { diff --git a/Yi.Vben5.Vue3/playground/src/views/_core/authentication/code-login.vue b/Yi.Vben5.Vue3/playground/src/views/_core/authentication/code-login.vue index 3b50c626..a0754a22 100644 --- a/Yi.Vben5.Vue3/playground/src/views/_core/authentication/code-login.vue +++ b/Yi.Vben5.Vue3/playground/src/views/_core/authentication/code-login.vue @@ -15,7 +15,7 @@ const loading = ref(false); const CODE_LENGTH = 6; const loginRef = useTemplateRef>('loginRef'); -function sendCodeApi(phoneNumber: string) { +function sendCodeApi(phone: string) { message.loading({ content: $t('page.auth.sendingCode'), duration: 0, @@ -24,11 +24,11 @@ function sendCodeApi(phoneNumber: string) { return new Promise((resolve) => { setTimeout(() => { message.success({ - content: $t('page.auth.codeSentTo', [phoneNumber]), + content: $t('page.auth.codeSentTo', [phone]), duration: 3, key: 'sending-code', }); - resolve({ code: '123456', phoneNumber }); + resolve({ code: '123456', phone }); }, 3000); }); } @@ -39,7 +39,7 @@ const formSchema = computed((): VbenFormSchema[] => { componentProps: { placeholder: $t('authentication.mobile'), }, - fieldName: 'phoneNumber', + fieldName: 'phone', label: $t('authentication.mobile'), rules: z .string() @@ -68,14 +68,14 @@ const formSchema = computed((): VbenFormSchema[] => { loading.value = false; throw new Error('formApi is not ready'); } - await formApi.validateField('phoneNumber'); - const isPhoneReady = await formApi.isFieldValid('phoneNumber'); + await formApi.validateField('phone'); + const isPhoneReady = await formApi.isFieldValid('phone'); if (!isPhoneReady) { loading.value = false; throw new Error('Phone number is not Ready'); } - const { phoneNumber } = await formApi.getValues(); - await sendCodeApi(phoneNumber); + const { phone } = await formApi.getValues(); + await sendCodeApi(phone); loading.value = false; }, placeholder: $t('authentication.code'), diff --git a/Yi.Vben5.Vue3/playground/src/views/examples/form/custom.vue b/Yi.Vben5.Vue3/playground/src/views/examples/form/custom.vue index 7fab17a6..efd4e1b5 100644 --- a/Yi.Vben5.Vue3/playground/src/views/examples/form/custom.vue +++ b/Yi.Vben5.Vue3/playground/src/views/examples/form/custom.vue @@ -18,7 +18,7 @@ const [Form] = useVbenForm({ }, labelClass: 'w-2/6', }, - fieldMappingTime: [['field4', ['phoneType', 'phoneNumber'], null]], + fieldMappingTime: [['field4', ['phoneType', 'phone'], null]], // 提交函数 handleSubmit: onSubmit, // 垂直布局,label和input在不同行,值为vertical