feat:登录注册完成
This commit is contained in:
70
src/pages/register/index.vue
Normal file
70
src/pages/register/index.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<view class="auth-form-page">
|
||||
<app-navbar title="注册" />
|
||||
<view class="auth-form-page__body">
|
||||
<text class="auth-form-page__heading">注册用户</text>
|
||||
|
||||
<base-input v-model="phone" icon="phone" type="number" placeholder="请输入手机号" :maxlength="11" />
|
||||
<base-input v-model="code" icon="shield" type="number" placeholder="请输入验证码" :maxlength="6">
|
||||
<template #suffix>
|
||||
<sms-code-btn :counting="counting" :seconds="seconds" @send="onSendCode" />
|
||||
</template>
|
||||
</base-input>
|
||||
<base-input v-model="password" icon="lock" type="password" placeholder="请输入密码" />
|
||||
<base-input v-model="confirmPassword" icon="lock" type="password" placeholder="请确认密码" />
|
||||
|
||||
<view class="auth-form-page__btn">
|
||||
<primary-button text="立即注册" @click="submit" />
|
||||
</view>
|
||||
|
||||
<view class="auth-form-page__agreement">
|
||||
<agreement-checkbox v-model="agreed" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRegister } from './use-register'
|
||||
|
||||
const {
|
||||
phone,
|
||||
code,
|
||||
password,
|
||||
confirmPassword,
|
||||
agreed,
|
||||
counting,
|
||||
seconds,
|
||||
onSendCode,
|
||||
submit,
|
||||
} = useRegister()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.auth-form-page {
|
||||
min-height: 100vh;
|
||||
background: $color-bg-page;
|
||||
}
|
||||
|
||||
.auth-form-page__body {
|
||||
padding: 32rpx $page-padding-x 48rpx;
|
||||
}
|
||||
|
||||
.auth-form-page__heading {
|
||||
display: block;
|
||||
font-size: 44rpx;
|
||||
font-weight: 700;
|
||||
color: $color-text;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
|
||||
.auth-form-page__btn {
|
||||
margin-top: 16rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.auth-form-page__agreement {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user