|
|
|
@ -11,163 +11,164 @@
|
|
|
|
|
</a-col> -->
|
|
|
|
|
<!-- <a-col :span="1" class="box-cen"></a-col> -->
|
|
|
|
|
<!-- 登录 -->
|
|
|
|
|
<a-col class="box-b" v-if="status === 1">
|
|
|
|
|
<a-tabs v-model="activeName" @change="tabsSwitch">
|
|
|
|
|
<!-- <a-tab-pane key="1" tab="密码登录">
|
|
|
|
|
</a-tab-pane> -->
|
|
|
|
|
<a-tab-pane key="2" tab="验证码登录"> </a-tab-pane>
|
|
|
|
|
</a-tabs>
|
|
|
|
|
<div class="login-input" v-if="activeName === '1'">
|
|
|
|
|
<a-input placeholder="请输入手机号码"></a-input>
|
|
|
|
|
<a-input type="password" placeholder="请输入密码"></a-input>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="12" style="margin-left: 23px"
|
|
|
|
|
><a-checkbox></a-checkbox> 三天之内免登陆</a-col
|
|
|
|
|
>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="login"
|
|
|
|
|
style="width: 90%; margin: 30px"
|
|
|
|
|
>
|
|
|
|
|
登录
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-row style="margin-top: 20px; margin-left: 23px">
|
|
|
|
|
<a-col :span="14">
|
|
|
|
|
<a-checkbox></a-checkbox> 我已同意用户协议
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="10">
|
|
|
|
|
<span class="logintext" @click="status = 3">忘记密码</span
|
|
|
|
|
> <span
|
|
|
|
|
class="logintext"
|
|
|
|
|
@click="status = 2"
|
|
|
|
|
>免费注册</span
|
|
|
|
|
<a-col class="box-b" v-if="status === 1">
|
|
|
|
|
<a-tabs v-model="activeName" @change="tabsSwitch">
|
|
|
|
|
<!-- <a-tab-pane key="1" tab="密码登录">
|
|
|
|
|
</a-tab-pane> -->
|
|
|
|
|
<a-tab-pane key="2" tab="验证码登录"> </a-tab-pane>
|
|
|
|
|
</a-tabs>
|
|
|
|
|
<div class="login-input" v-if="activeName === '1'">
|
|
|
|
|
<a-input placeholder="请输入手机号码"></a-input>
|
|
|
|
|
<a-input type="password" placeholder="请输入密码"></a-input>
|
|
|
|
|
<!-- <a-row>
|
|
|
|
|
<a-col :span="12" style="margin-left: 23px"
|
|
|
|
|
><a-checkbox></a-checkbox> 三天之内免登陆</a-col
|
|
|
|
|
>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="login-input" v-else-if="activeName === '2'">
|
|
|
|
|
<a-cascader
|
|
|
|
|
:options="cityList"
|
|
|
|
|
placeholder="请选择城市"
|
|
|
|
|
v-model="cityvalue"
|
|
|
|
|
:show-search="{ filter }"
|
|
|
|
|
@change="onChange"
|
|
|
|
|
:field-names="{
|
|
|
|
|
label: 'name',
|
|
|
|
|
value: 'id',
|
|
|
|
|
children: 'cityList',
|
|
|
|
|
}"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<span class="form">
|
|
|
|
|
<a-select
|
|
|
|
|
v-model="communityCode"
|
|
|
|
|
notFoundContent="该城市无可选择小区"
|
|
|
|
|
:disabled="cityvalue.length === 0"
|
|
|
|
|
placeholder="请选择小区"
|
|
|
|
|
</a-row> -->
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="login"
|
|
|
|
|
style="width: 90%; margin: 30px"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option
|
|
|
|
|
v-for="item in communityList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
>{{ item.name }}</a-select-option
|
|
|
|
|
登录
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-row style="margin-top: 20px; margin-left: 23px">
|
|
|
|
|
<a-col :span="14">
|
|
|
|
|
<a-checkbox></a-checkbox> 我已同意<a href="/#/rule" target="tar">《用户协议》</a>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="10">
|
|
|
|
|
<span class="logintext" @click="status = 3">忘记密码</span
|
|
|
|
|
> <span
|
|
|
|
|
class="logintext"
|
|
|
|
|
@click="status = 2"
|
|
|
|
|
>免费注册</span
|
|
|
|
|
>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="login-input" v-else-if="activeName === '2'">
|
|
|
|
|
<a-cascader
|
|
|
|
|
:options="cityList"
|
|
|
|
|
placeholder="请选择城市"
|
|
|
|
|
v-model="cityvalue"
|
|
|
|
|
:show-search="{ filter }"
|
|
|
|
|
@change="onChange"
|
|
|
|
|
:field-names="{
|
|
|
|
|
label: 'name',
|
|
|
|
|
value: 'id',
|
|
|
|
|
children: 'cityList',
|
|
|
|
|
}"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<span class="form">
|
|
|
|
|
<a-select
|
|
|
|
|
v-model="communityCode"
|
|
|
|
|
notFoundContent="该城市无可选择小区"
|
|
|
|
|
:disabled="cityvalue.length === 0"
|
|
|
|
|
placeholder="请选择小区"
|
|
|
|
|
>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入手机号码"
|
|
|
|
|
v-model="form.tel"
|
|
|
|
|
></a-input>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
|
v-model="form.code"
|
|
|
|
|
style="width: 60%"
|
|
|
|
|
></a-input>
|
|
|
|
|
</span>
|
|
|
|
|
<a-button type="primary" @click="getCode">获取验证码</a-button>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="12" style="margin-left: 23px"
|
|
|
|
|
><a-checkbox></a-checkbox> 三天之内免登陆</a-col
|
|
|
|
|
>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="login"
|
|
|
|
|
style="
|
|
|
|
|
width: 90%;
|
|
|
|
|
margin-left: 30px;
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
height:38px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
登录
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-row style="margin-top: 20px; margin-left: 23px">
|
|
|
|
|
<a-col :span="14">
|
|
|
|
|
<a-checkbox></a-checkbox> 我已同意用户协议
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="10">
|
|
|
|
|
<span class="logintext" @click="status = 3">忘记密码</span
|
|
|
|
|
> <span
|
|
|
|
|
class="logintext"
|
|
|
|
|
@click="status = 2"
|
|
|
|
|
>免费注册</span
|
|
|
|
|
<a-select-option
|
|
|
|
|
v-for="item in communityList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
>{{ item.name }}</a-select-option
|
|
|
|
|
>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入手机号码"
|
|
|
|
|
v-model="form.tel"
|
|
|
|
|
></a-input>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
|
v-model="form.code"
|
|
|
|
|
style="width: 60%"
|
|
|
|
|
></a-input>
|
|
|
|
|
</span>
|
|
|
|
|
<a-button type="primary" @click="getCode">获取验证码</a-button>
|
|
|
|
|
<!-- <a-row>
|
|
|
|
|
<a-col :span="12" style="margin-left: 23px"
|
|
|
|
|
><a-checkbox></a-checkbox> 三天之内免登陆</a-col
|
|
|
|
|
>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</div>
|
|
|
|
|
</a-col>
|
|
|
|
|
<!-- 注册 -->
|
|
|
|
|
<a-col class="box-b" v-if="status === 2">
|
|
|
|
|
<div class="cardTitle">新建账号</div>
|
|
|
|
|
<a-form-model
|
|
|
|
|
ref="ruleForm"
|
|
|
|
|
:model="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
layout="vertical"
|
|
|
|
|
>
|
|
|
|
|
<a-form-model-item ref="tel" label="手机号码" prop="tel">
|
|
|
|
|
<a-input
|
|
|
|
|
v-model="form.tel"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入手机号"
|
|
|
|
|
@blur="
|
|
|
|
|
() => {
|
|
|
|
|
$refs.tel.onFieldBlur();
|
|
|
|
|
}
|
|
|
|
|
</a-row> -->
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="login"
|
|
|
|
|
style="
|
|
|
|
|
width: 90%;
|
|
|
|
|
margin-left: 30px;
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
height:38px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
"
|
|
|
|
|
/>
|
|
|
|
|
<a-row style="margin-top: 20px">
|
|
|
|
|
<a-col :span="16" style="margin-right: 10px">
|
|
|
|
|
<a-input
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
v-model="form.verificationCode"
|
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
|
/>
|
|
|
|
|
>
|
|
|
|
|
登录
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-row style="margin-top: 20px; margin-left: 23px">
|
|
|
|
|
<a-col :span="14">
|
|
|
|
|
<a-checkbox v-model="isChecked"></a-checkbox> 我已同意<a href="/#/rule" target="tar">《用户协议》</a>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-button type="primary" @click="getCode"
|
|
|
|
|
>获取验证码</a-button
|
|
|
|
|
<a-col :span="10">
|
|
|
|
|
<span class="logintext" @click="status = 3">忘记密码</span
|
|
|
|
|
> <span
|
|
|
|
|
class="logintext"
|
|
|
|
|
@click="status = 2"
|
|
|
|
|
>免费注册</span
|
|
|
|
|
>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item label="设置密码" prop="psw">
|
|
|
|
|
<a-input placeholder="请输入密码" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item label="确认密码" prop="confirmPsw">
|
|
|
|
|
<a-input placeholder="请再次输入密码" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item>
|
|
|
|
|
<a-button type="primary" style="width: 100%"> 确定 </a-button>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item>
|
|
|
|
|
<span>已有账号?</span
|
|
|
|
|
><span class="logintext" @click="status = 1">登录</span>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
</a-col>
|
|
|
|
|
</div>
|
|
|
|
|
</a-col>
|
|
|
|
|
<!-- 注册 -->
|
|
|
|
|
<a-col class="box-b" v-if="status === 2">
|
|
|
|
|
<div class="cardTitle">新建账号</div>
|
|
|
|
|
<a-form-model
|
|
|
|
|
ref="ruleForm"
|
|
|
|
|
:model="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
layout="vertical"
|
|
|
|
|
>
|
|
|
|
|
<a-form-model-item ref="tel" label="手机号码" prop="tel">
|
|
|
|
|
<a-input
|
|
|
|
|
v-model="form.tel"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请输入手机号"
|
|
|
|
|
@blur="
|
|
|
|
|
() => {
|
|
|
|
|
$refs.tel.onFieldBlur();
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
/>
|
|
|
|
|
<a-row style="margin-top: 20px">
|
|
|
|
|
<a-col :span="16" style="margin-right: 10px">
|
|
|
|
|
<a-input
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
v-model="form.verificationCode"
|
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-button type="primary" @click="getCode"
|
|
|
|
|
>获取验证码</a-button
|
|
|
|
|
>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item label="设置密码" prop="psw">
|
|
|
|
|
<a-input placeholder="请输入密码" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item label="确认密码" prop="confirmPsw">
|
|
|
|
|
<a-input placeholder="请再次输入密码" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item>
|
|
|
|
|
<a-button type="primary" style="width: 100%"> 确定 </a-button>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item>
|
|
|
|
|
<span>已有账号?</span
|
|
|
|
|
><span class="logintext" @click="status = 1">登录</span>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
</a-col>
|
|
|
|
|
<!-- 找回密码 -->
|
|
|
|
|
<a-col class="box-b" v-if="status === 3">
|
|
|
|
|
<div class="cardTitle">找回密码</div>
|
|
|
|
@ -235,6 +236,7 @@ export default {
|
|
|
|
|
tel: "",
|
|
|
|
|
code: "",
|
|
|
|
|
},
|
|
|
|
|
isChecked: false,
|
|
|
|
|
communityCode: undefined,
|
|
|
|
|
rules: {
|
|
|
|
|
tel: [
|
|
|
|
@ -334,7 +336,11 @@ export default {
|
|
|
|
|
if (this.communityCode === undefined) {
|
|
|
|
|
this.$message.error("先选择小区");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
if (this.isChecked == false) {
|
|
|
|
|
this.$message.error("请阅读并同意《用户协议》");
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
loginTel(this.form).then((res) => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.$message.success(res.msg);
|
|
|
|
@ -352,10 +358,10 @@ export default {
|
|
|
|
|
this.$message.error("先选择小区");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.getCommunityCode);
|
|
|
|
|
sendTelCode(this.form).then((res) => {
|
|
|
|
|
if (res) {
|
|
|
|
|
this.$message.success(res.msg + " " + res.data);
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.$message.success(res.msg);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|