|
|
|
@ -13,12 +13,11 @@
|
|
|
|
|
label-position="left"
|
|
|
|
|
>
|
|
|
|
|
<el-card class="box-card">
|
|
|
|
|
<div style="text-align: center; margin-top: 10px">
|
|
|
|
|
<img alt="element-logo" src="@/assets/logo/logo.png" />
|
|
|
|
|
<div style="text-align: center; margin-top: 20px">
|
|
|
|
|
<img alt="element-logo" src="@/assets/logo/logo.png"/>
|
|
|
|
|
</div>
|
|
|
|
|
<h3 class="title">用户注册</h3>
|
|
|
|
|
<el-form-item prop="mobile" class="item" style="margin-top: -20px">
|
|
|
|
|
|
|
|
|
|
<h3 class="title">企业注册</h3>
|
|
|
|
|
<el-form-item prop="mobile" class="item" style="margin-top: -10px">
|
|
|
|
|
<el-input
|
|
|
|
|
size="small"
|
|
|
|
|
placeholder="请输入手机号"
|
|
|
|
@ -65,7 +64,7 @@
|
|
|
|
|
style="width: 60%; margin-bottom: 30px"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
@click.native="handleLogin()"
|
|
|
|
|
>注册
|
|
|
|
|
>注册
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -91,8 +90,8 @@
|
|
|
|
|
import Verify from "vue2-verify";
|
|
|
|
|
import axios from "axios";
|
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
|
import { decrypt, encrypt } from "@/utils/jsencrypt";
|
|
|
|
|
import {checkCode,getCheckcode,encrypts} from "@/api/login";
|
|
|
|
|
import {decrypt, encrypt} from "@/utils/jsencrypt";
|
|
|
|
|
import {checkCode, getCheckcode, encrypts} from "@/api/login";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -106,20 +105,20 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return {
|
|
|
|
|
yzm:"",
|
|
|
|
|
jmobile:"",
|
|
|
|
|
inputQuery :{
|
|
|
|
|
mobile : "",
|
|
|
|
|
checkCode : "",
|
|
|
|
|
yzm: "",
|
|
|
|
|
jmobile: "",
|
|
|
|
|
inputQuery: {
|
|
|
|
|
mobile: "",
|
|
|
|
|
checkCode: "",
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
tel: [
|
|
|
|
|
{ required: true, message: "请输入联系电话", trigger: "blur" },
|
|
|
|
|
{ validator: validatePhone, trigger: "blur" },
|
|
|
|
|
{required: true, message: "请输入联系电话", trigger: "blur"},
|
|
|
|
|
{validator: validatePhone, trigger: "blur"},
|
|
|
|
|
// { pattern:/^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/, message: "请输入正确的电话号码", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
checkCode: [
|
|
|
|
|
{ required: true, message: "请输入手机验证码", trigger: "blur" },
|
|
|
|
|
{required: true, message: "请输入手机验证码", trigger: "blur"},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
isTimer: false,
|
|
|
|
@ -128,28 +127,28 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
handleLogin(){
|
|
|
|
|
checkCode(this.inputQuery).then( (res) => {
|
|
|
|
|
if(res.code == 20000 ){
|
|
|
|
|
methods: {
|
|
|
|
|
handleLogin() {
|
|
|
|
|
checkCode(this.inputQuery).then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
//加密验证码
|
|
|
|
|
this.jmobile=res.data;
|
|
|
|
|
this.jmobile = res.data;
|
|
|
|
|
|
|
|
|
|
let param={
|
|
|
|
|
mobile:this.jmobile,
|
|
|
|
|
captcha:this.yzm,
|
|
|
|
|
key:"key",
|
|
|
|
|
let param = {
|
|
|
|
|
mobile: this.jmobile,
|
|
|
|
|
captcha: this.yzm,
|
|
|
|
|
key: "key",
|
|
|
|
|
}
|
|
|
|
|
encrypts(param).then((res)=>{
|
|
|
|
|
if(res.code == 20000){
|
|
|
|
|
encrypts(param).then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
//跳转到完善信息页面
|
|
|
|
|
this.$router.push({path: "/improveInfo",query:{mobile:res.data.mobile,captcha:res.data.captcha}});
|
|
|
|
|
this.$router.push({path: "/improveInfo", query: {mobile: res.data.mobile, captcha: res.data.captcha}});
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -163,7 +162,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
getCheckcode(tquery).then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.yzm=response.data;
|
|
|
|
|
this.yzm = response.data;
|
|
|
|
|
this.validateBtn();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
@ -188,9 +187,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
Verify,
|
|
|
|
@ -274,6 +270,7 @@ $light_gray: #eee;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
margin-bottom: 50px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.textTitle {
|
|
|
|
|
width: 50%;
|
|
|
|
|
font-size: 45px;
|
|
|
|
@ -285,6 +282,7 @@ $light_gray: #eee;
|
|
|
|
|
margin-top: 132px;
|
|
|
|
|
margin-bottom: -10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.topSubtitle {
|
|
|
|
|
color: #fcd38b;
|
|
|
|
|
text-align: center;
|
|
|
|
|