feat: 将注册手机号改为必填项
This commit is contained in:
parent
2edc9beef3
commit
72e7244ea0
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 4.2.20 on 2026-03-25 07:46
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounts', '0002_verificationcode'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='user',
|
||||||
|
name='phone',
|
||||||
|
field=models.CharField(max_length=20),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -55,7 +55,7 @@ class User(AbstractUser):
|
||||||
('seeker', '求职者'),
|
('seeker', '求职者'),
|
||||||
]
|
]
|
||||||
role = models.CharField(max_length=20, choices=ROLE_CHOICES, default='seeker')
|
role = models.CharField(max_length=20, choices=ROLE_CHOICES, default='seeker')
|
||||||
phone = models.CharField(max_length=20, blank=True)
|
phone = models.CharField(max_length=20)
|
||||||
organization = models.ForeignKey(
|
organization = models.ForeignKey(
|
||||||
'organizations.Organization',
|
'organizations.Organization',
|
||||||
null=True, blank=True,
|
null=True, blank=True,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<el-form :model="form" @submit.prevent="handleRegister">
|
<el-form :model="form" @submit.prevent="handleRegister">
|
||||||
<el-form-item><el-input v-model="form.username" placeholder="用户名" /></el-form-item>
|
<el-form-item><el-input v-model="form.username" placeholder="用户名" /></el-form-item>
|
||||||
<el-form-item><el-input v-model="form.email" placeholder="邮箱" /></el-form-item>
|
<el-form-item><el-input v-model="form.email" placeholder="邮箱" /></el-form-item>
|
||||||
<el-form-item><el-input v-model="form.phone" placeholder="手机号(可选)" /></el-form-item>
|
<el-form-item><el-input v-model="form.phone" placeholder="手机号" /></el-form-item>
|
||||||
<el-form-item><el-input v-model="form.password" type="password" placeholder="密码(至少6位)" show-password /></el-form-item>
|
<el-form-item><el-input v-model="form.password" type="password" placeholder="密码(至少6位)" show-password /></el-form-item>
|
||||||
<el-button type="primary" native-type="submit" :loading="loading" style="width:100%">注册</el-button>
|
<el-button type="primary" native-type="submit" :loading="loading" style="width:100%">注册</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue