|
@@ -1,30 +1,37 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
<view class="container_text" >
|
|
|
- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image>
|
|
|
+ <!-- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image> -->
|
|
|
+ <view class="banner-img" style="background-color: #f63332;">
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="loginTitle"><text>注册</text></view>
|
|
|
- <view class="login_text">
|
|
|
+ <view class="login_text">
|
|
|
+ <view class="login_input flex">
|
|
|
+ <view class="login_img"><image src="/static/icon/img03.png"></image></view>
|
|
|
+ <view class="login_name"><input class="uni-input" v-model="nickname" type="text" placeholder="请输入姓名"/></view>
|
|
|
+ </view>
|
|
|
<view class="login_input flex">
|
|
|
<view class="login_img"><image src="/static/icon/img03.png"></image></view>
|
|
|
- <view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入手机号" /></view>
|
|
|
+ <view class="login_name"><input class="uni-input" type="number" v-model="phone" placeholder="请输入手机号" /></view>
|
|
|
</view>
|
|
|
<view class="login_input flex">
|
|
|
<view class="login_img"><image src="/static/icon/img04.png"></image></view>
|
|
|
- <view class="login_name"><input class="uni-input" type="password" v-model="password" focus placeholder="请输入密码" /></view>
|
|
|
+ <view class="login_name"><input class="uni-input" type="password" v-model="password" placeholder="请输入密码" /></view>
|
|
|
</view>
|
|
|
<view class="login_input flex">
|
|
|
<view class="login_img"><image src="/static/icon/img04.png"></image></view>
|
|
|
- <view class="login_name"><input class="uni-input" type="password" v-model="repassword" focus placeholder="请重复输入密码" /></view>
|
|
|
+ <view class="login_name"><input class="uni-input" type="password" v-model="repassword" placeholder="请重复输入密码" /></view>
|
|
|
</view>
|
|
|
<view class="login_input flex">
|
|
|
<view class="login_img"><image src="/static/icon/img07.png"></image></view>
|
|
|
- <view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus placeholder="请输入邀请码" /></view>
|
|
|
+ <view class="login_name"><input class="uni-input" type="number" v-model="invitation" placeholder="请输入邀请人手机号" /></view>
|
|
|
</view>
|
|
|
- <view class="login_input flex">
|
|
|
+ <view class="login_input flex" style="display: none;">
|
|
|
<view class="login_img"><image src="/static/icon/img06.png"></image></view>
|
|
|
<view class="login_name flex">
|
|
|
- <input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
|
|
|
+ <input class="uni-input width" v-model="code" placeholder="请输入验证码" />
|
|
|
<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -37,12 +44,13 @@
|
|
|
import { register, verify } from '@/api/login.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
- return {
|
|
|
+ return {
|
|
|
+ nickname: '',//用户昵称
|
|
|
phone: '', //用户
|
|
|
password: '', //密码
|
|
|
repassword: '',
|
|
|
invitation: '', //邀请码
|
|
|
- code: '', //验证码
|
|
|
+ code: '123456', //验证码
|
|
|
time: '', //保存倒计时对象
|
|
|
countDown: 0 ,//倒计时
|
|
|
};
|
|
@@ -62,7 +70,11 @@ export default {
|
|
|
methods: {
|
|
|
// 注册
|
|
|
register() {
|
|
|
- let obj = this;
|
|
|
+ let obj = this;
|
|
|
+ if(obj.nickname == '') {
|
|
|
+ obj.$api.msg('请输入姓名');
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (obj.phone == '') {
|
|
|
obj.$api.msg('请输入电话号码');
|
|
|
return;
|
|
@@ -83,15 +95,16 @@ export default {
|
|
|
obj.$api.msg('两次密码不正确');
|
|
|
return;
|
|
|
}
|
|
|
- // if ((obj.invitation = '')) {
|
|
|
- // obj.$api.msg('请输入邀请码');
|
|
|
- // return;
|
|
|
- // }
|
|
|
+ if ((obj.invitation == '')) {
|
|
|
+ obj.$api.msg('请输入邀请码');
|
|
|
+ return;
|
|
|
+ }
|
|
|
// if (obj.code == '') {
|
|
|
// obj.$api.msg('请输入验证码');
|
|
|
// return;
|
|
|
// }
|
|
|
- register({
|
|
|
+ register({
|
|
|
+ nickname: obj.nickname,
|
|
|
account: obj.phone, //账号
|
|
|
captcha: obj.code, //验证码
|
|
|
password: obj.password ,//密码
|
|
@@ -229,15 +242,15 @@ page {
|
|
|
|
|
|
.uni-button-green {
|
|
|
color: #ffffff;
|
|
|
- background-color: #5dbc7c;
|
|
|
+ background-color: #ff4c4c;
|
|
|
margin: 40rpx 10rpx;
|
|
|
border-radius: 50rpx;
|
|
|
}
|
|
|
.uni-button-green-plain {
|
|
|
- border: 1px solid #5dbc7c;
|
|
|
+ border: 1px solid #ff4c4c;
|
|
|
margin: 40rpx 10rpx;
|
|
|
border-radius: 50rpx;
|
|
|
- color: #5dbc7c;
|
|
|
+ color: #ff4c4c;
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
.uni-button {
|
|
@@ -265,7 +278,7 @@ page {
|
|
|
width: 325rpx !important;
|
|
|
}
|
|
|
.code {
|
|
|
- color: #5dbc7c;
|
|
|
+ color: #ff4c4c;
|
|
|
font-size: 23rpx;
|
|
|
border-left: 1px solid #eeeeee;
|
|
|
width: 150rpx;
|