|
|
@@ -42,7 +42,7 @@
|
|
|
}
|
|
|
|
|
|
userRegister(payload)
|
|
|
- .then(res => {
|
|
|
+ .then(() => {
|
|
|
ElMessageBox.alert(
|
|
|
`${name.value},感谢您的注册!`,
|
|
|
'注册成功',
|
|
|
@@ -81,9 +81,9 @@
|
|
|
|
|
|
<template>
|
|
|
|
|
|
- <el-main>
|
|
|
+ <el-main class="main-frame bgimage">
|
|
|
|
|
|
- <el-card>
|
|
|
+ <el-card class="login-card">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
@@ -97,13 +97,14 @@
|
|
|
|
|
|
<el-col :span="15">
|
|
|
<el-form-item>
|
|
|
- <label for="name" >昵称</label>
|
|
|
+ <label for="name">昵称</label>
|
|
|
<el-input id="name"
|
|
|
v-model="name"
|
|
|
placeholder="请输入昵称" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
+ <el-col :span="1"></el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
<el-form-item>
|
|
|
@@ -127,19 +128,21 @@
|
|
|
<label v-if="!hasTelInput" for="tel">
|
|
|
注册手机号
|
|
|
</label>
|
|
|
- <label v-else-if="!telLegal" for="tel">
|
|
|
+ <label v-else-if="!telLegal" for="tel" class="error-warn">
|
|
|
手机号不合法
|
|
|
</label>
|
|
|
<label v-else for="tel">
|
|
|
注册手机号
|
|
|
</label>
|
|
|
|
|
|
- <el-input type="tel" id="tel"
|
|
|
- v-model="tel"
|
|
|
+ <el-input id="tel"
|
|
|
+ v-model="tel" :class="{'error-warn-input' :(hasTelInput && !telLegal)}"
|
|
|
placeholder="请输入手机号" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
+ <el-col :span="1"></el-col>
|
|
|
+
|
|
|
<el-col :span="15">
|
|
|
<el-form-item>
|
|
|
|
|
|
@@ -167,11 +170,11 @@
|
|
|
|
|
|
<el-form-item>
|
|
|
<label v-if="!hasConfirmPasswordInput">确认密码</label>
|
|
|
- <label v-else-if="!isPasswordIdentical">密码不一致</label>
|
|
|
+ <label v-else-if="!isPasswordIdentical" class="error-warn">密码不一致</label>
|
|
|
<label v-else>确认密码</label>
|
|
|
|
|
|
<el-input type="password" id="confirm-password"
|
|
|
- v-model="confirmPassword"
|
|
|
+ v-model="confirmPassword" :class="{'error-warn-input' :(hasConfirmPasswordInput && !isPasswordIdentical)}"
|
|
|
placeholder="••••••••" />
|
|
|
</el-form-item>
|
|
|
|
|
|
@@ -192,9 +195,10 @@
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
|
- <el-form-item>
|
|
|
+ <span class="button-group">
|
|
|
<el-button @click.prevent="handleRegister"
|
|
|
- :disabled="registerDisabled">
|
|
|
+ :disabled="registerDisabled"
|
|
|
+ type="primary">
|
|
|
创建账户
|
|
|
</el-button>
|
|
|
|
|
|
@@ -203,7 +207,7 @@
|
|
|
返回登录
|
|
|
</el-button>
|
|
|
</router-link>
|
|
|
- </el-form-item>
|
|
|
+ </span>
|
|
|
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -216,4 +220,39 @@
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
+.bgimage {
|
|
|
+ background-image: url("../assets/shopping-1s-1084px.svg");
|
|
|
+}
|
|
|
+
|
|
|
+.main-frame {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.login-card {
|
|
|
+ width: 60%;
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.error-warn {
|
|
|
+ color: red;
|
|
|
+}
|
|
|
+
|
|
|
+.error-warn-input {
|
|
|
+ --el-input-focus-border-color: red;
|
|
|
+}
|
|
|
+
|
|
|
+.button-group {
|
|
|
+ padding-top: 10px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ gap: 30px;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: right;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|