|
@@ -1,17 +1,16 @@
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
import CountDown from '@/components/count-down.vue'
|
|
import CountDown from '@/components/count-down.vue'
|
|
|
|
+import PhoneFront from '@/components/phone-front.vue'
|
|
const formRef = ref<any>()
|
|
const formRef = ref<any>()
|
|
const account = reactive({
|
|
const account = reactive({
|
|
name: '',
|
|
name: '',
|
|
- password: '',
|
|
|
|
|
|
+ code: '',
|
|
})
|
|
})
|
|
const accountRules = {
|
|
const accountRules = {
|
|
name: [
|
|
name: [
|
|
{ required: true, type: 'string', message: '请输入正确手机号', trigger: ['blur', 'change'] },
|
|
{ required: true, type: 'string', message: '请输入正确手机号', trigger: ['blur', 'change'] },
|
|
],
|
|
],
|
|
- password: [
|
|
|
|
- { required: true, type: 'string', message: '请输入验证码', trigger: ['blur', 'change'] },
|
|
|
|
- ],
|
|
|
|
|
|
+ code: [{ required: true, type: 'string', message: '请输入验证码', trigger: ['blur', 'change'] }],
|
|
}
|
|
}
|
|
|
|
|
|
function loginAction(isKeep: boolean) {
|
|
function loginAction(isKeep: boolean) {
|
|
@@ -42,23 +41,15 @@ defineExpose({
|
|
:rules="accountRules"
|
|
:rules="accountRules"
|
|
>
|
|
>
|
|
<uv-form-item prop="name">
|
|
<uv-form-item prop="name">
|
|
- <view class="user-account-front">+ 86</view>
|
|
|
|
- <uv-input placeholder="11位手机号" size="large"></uv-input>
|
|
|
|
|
|
+ <PhoneFront />
|
|
|
|
+ <uv-input v-model="account.name" placeholder="11位手机号" size="large"></uv-input>
|
|
</uv-form-item>
|
|
</uv-form-item>
|
|
- <uv-form-item prop="password">
|
|
|
|
- <uv-input placeholder="输入验证码" size="large"></uv-input>
|
|
|
|
|
|
+ <uv-form-item prop="code">
|
|
|
|
+ <uv-input v-model="account.code" placeholder="输入验证码" size="large"></uv-input>
|
|
<count-down />
|
|
<count-down />
|
|
</uv-form-item>
|
|
</uv-form-item>
|
|
</uv-form>
|
|
</uv-form>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
-.user-account-front {
|
|
|
|
- height: 24px;
|
|
|
|
- padding: 6px 10px;
|
|
|
|
- line-height: 24px;
|
|
|
|
- border: 0.5px solid #ccc;
|
|
|
|
- border-radius: 4px 0 0 4px;
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|
|
|
|
+<style lang="scss" scoped></style>
|