Explorar el Código

建档若没有手机号 field 通过身份证获取用户信息则移除 phone 字段

cc12458 hace 3 meses
padre
commit
b63fc1d18a
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/pages/register.page.vue

+ 1 - 0
src/pages/register.page.vue

@@ -34,6 +34,7 @@ const { loading: submitting, send: submit } = useRequest(registerAccountMethod,
 const { loading: searching, send: search } = useRequest((data) => searchAccountMethod(data), {
   immediate: false,
 }).onSuccess(({ data }) => {
+  if (!fields.value.some(field => field.name === 'phone')) Reflect.deleteProperty(data, 'phone');
   const modelLabel = {} as Record<string, any>;
   const modelValue = {} as Record<string, any>;