|
|
@@ -81,87 +81,75 @@
|
|
|
|
|
|
<template>
|
|
|
|
|
|
- <div class="bgimage h-full w-full flex flex-col items-center justify-center px-6 py-6 space-y-10">
|
|
|
+ <el-main>
|
|
|
|
|
|
+ <el-card>
|
|
|
|
|
|
- <span class="flex items-center text-2xl font-semibold text-gray-900">
|
|
|
- Blue Whale Shopping Online
|
|
|
- </span>
|
|
|
+ <div>
|
|
|
|
|
|
- <el-card class="w-3/5 min-w-max max-w-xl bg-white rounded-lg shadow-md overflow-y-scroll">
|
|
|
-
|
|
|
- <div class="p-6 space-y-4 overflow-auto min-h-max">
|
|
|
-
|
|
|
- <h1 class="text-2xl font-bold leading-tight tracking-tight text-gray-900">
|
|
|
+ <h1>
|
|
|
创建一个新的账户
|
|
|
</h1>
|
|
|
|
|
|
- <el-form class="space-y-6 h-full">
|
|
|
+ <el-form>
|
|
|
|
|
|
- <el-row class="flex flex-row justify-between">
|
|
|
+ <el-row>
|
|
|
|
|
|
<el-col :span="15">
|
|
|
- <el-form-item class="mb-0">
|
|
|
- <label for="name" class="inline-block mb-2 text-sm font-medium text-gray-900">昵称</label>
|
|
|
- <input id="name"
|
|
|
+ <el-form-item>
|
|
|
+ <label for="name" >昵称</label>
|
|
|
+ <el-input id="name"
|
|
|
v-model="name"
|
|
|
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5"
|
|
|
- placeholder="小明">
|
|
|
+ placeholder="请输入昵称" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item class="mb-0">
|
|
|
- <label for="identity" class="block mb-2 text-sm font-medium text-gray-900">身份</label>
|
|
|
- <select id="identity"
|
|
|
+ <el-form-item>
|
|
|
+ <label for="identity">身份</label>
|
|
|
+ <el-select id="identity"
|
|
|
v-model="identity"
|
|
|
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5">
|
|
|
- <option disabled value="" selected>请选择</option>
|
|
|
- <option value="CUSTOMER">顾客</option>
|
|
|
- <option value="STAFF">商家</option>
|
|
|
- </select>
|
|
|
+ >
|
|
|
+ <el-option disabled value="" selected>请选择</el-option>
|
|
|
+ <el-option value="CUSTOMER">顾客</el-option>
|
|
|
+ <el-option value="STAFF">商家</el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
- <el-row class="flex flex-row justify-between">
|
|
|
+ <el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item>
|
|
|
- <!-- <label for="tel" class="block mb-2 text-sm font-medium text-gray-900">手机号</label>-->
|
|
|
|
|
|
- <label v-if="!hasTelInput" for="tel" class="inline-block mb-2 text-sm font-medium text-gray-900">
|
|
|
+ <label v-if="!hasTelInput" for="tel">
|
|
|
注册手机号
|
|
|
</label>
|
|
|
- <label v-else-if="!telLegal" for="tel"
|
|
|
- class="inline-block mb-2 font-medium text-red-500 text-sm">
|
|
|
+ <label v-else-if="!telLegal" for="tel">
|
|
|
手机号不合法
|
|
|
</label>
|
|
|
- <label v-else for="tel" class="inline-block mb-2 text-sm font-medium text-gray-900">
|
|
|
+ <label v-else for="tel">
|
|
|
注册手机号
|
|
|
</label>
|
|
|
|
|
|
- <input type="tel" id="tel"
|
|
|
+ <el-input type="tel" id="tel"
|
|
|
v-model="tel"
|
|
|
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5"
|
|
|
- :class="{'focus:outline-red-600':hasTelInput && !telLegal}"
|
|
|
- placeholder="请输入手机号">
|
|
|
+ placeholder="请输入手机号" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="15">
|
|
|
<el-form-item>
|
|
|
- <!-- <label for="tel" class="block mb-2 text-sm font-medium text-gray-900">手机号</label>-->
|
|
|
|
|
|
- <label for="address" class="inline-block mb-2 text-sm font-medium text-gray-900">
|
|
|
+ <label for="address">
|
|
|
地址
|
|
|
</label>
|
|
|
|
|
|
- <input id="address"
|
|
|
+ <el-input id="address"
|
|
|
v-model="address"
|
|
|
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5"
|
|
|
- placeholder="请输入地址">
|
|
|
+ placeholder="请输入地址" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
@@ -171,23 +159,20 @@
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
- <label for="password" class="block mb-2 text-sm font-medium text-gray-900">密码</label>
|
|
|
- <input type="password" id="password"
|
|
|
+ <label for="password">密码</label>
|
|
|
+ <el-input type="password" id="password"
|
|
|
v-model="password"
|
|
|
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5"
|
|
|
- placeholder="••••••••">
|
|
|
+ placeholder="••••••••" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
- <label v-if="!hasConfirmPasswordInput" class="inline-block mb-2 text-sm font-medium text-gray-900">确认密码</label>
|
|
|
- <label v-else-if="!isPasswordIdentical" class="inline-block mb-2 text-sm font-medium text-red-600">密码不一致</label>
|
|
|
- <label v-else class="inline-block mb-2 text-sm font-medium text-gray-900">确认密码</label>
|
|
|
+ <label v-if="!hasConfirmPasswordInput">确认密码</label>
|
|
|
+ <label v-else-if="!isPasswordIdentical">密码不一致</label>
|
|
|
+ <label v-else>确认密码</label>
|
|
|
|
|
|
- <input type="password" id="confirm-password"
|
|
|
+ <el-input type="password" id="confirm-password"
|
|
|
v-model="confirmPassword"
|
|
|
- class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5"
|
|
|
- :class="{'focus:outline-red-600': hasConfirmPasswordInput && !isPasswordIdentical}"
|
|
|
- placeholder="••••••••">
|
|
|
+ placeholder="••••••••" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- <el-form-item class="flex items-start">-->
|
|
|
@@ -208,43 +193,27 @@
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
- <button @click.prevent="handleRegister"
|
|
|
- :disabled="registerDisabled"
|
|
|
- class="my-3 w-full text-white bg-primary-600 hover:bg-primary-700 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center disabled:bg-primary-100">
|
|
|
+ <el-button @click.prevent="handleRegister"
|
|
|
+ :disabled="registerDisabled">
|
|
|
创建账户
|
|
|
- </button>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
+ </el-button>
|
|
|
|
|
|
- <p class="text-sm font-light text-gray-500 ">
|
|
|
- 已经有账户了?
|
|
|
<router-link to="/login" v-slot="{navigate}">
|
|
|
- <a @click="navigate" class="font-medium text-primary-600 hover:underline">
|
|
|
- 点击登陆
|
|
|
- </a>
|
|
|
+ <el-button @click="navigate">
|
|
|
+ 返回登录
|
|
|
+ </el-button>
|
|
|
</router-link>
|
|
|
- </p>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
</div>
|
|
|
|
|
|
</el-card>
|
|
|
+ </el-main>
|
|
|
|
|
|
- </div>
|
|
|
</template>
|
|
|
|
|
|
-<style>
|
|
|
-
|
|
|
-.customDialog {
|
|
|
- @apply w-1/4 space-y-5 text-4xl font-semibold rounded-2xl pb-5 pt-2
|
|
|
-}
|
|
|
-
|
|
|
-</style>
|
|
|
-
|
|
|
|
|
|
<style scoped>
|
|
|
-.bgimage {
|
|
|
- background-image: url("../assets/shopping-1s-1084px.svg");
|
|
|
-}
|
|
|
|
|
|
</style>
|