|
|
@ -47,19 +47,19 @@
|
|
|
|
</a-row>
|
|
|
|
</a-row>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="login-input" v-else-if="activeName === '2'">
|
|
|
|
<div class="login-input" v-else-if="activeName === '2'">
|
|
|
|
<a-select
|
|
|
|
<a-cascader :options="cityList" placeholder="请选择城市" v-model='cityvalue' :show-search="{ filter }" @change="onChange" :field-names="{ label: 'name', value: 'id', children: 'cityList' }"/>
|
|
|
|
placeholder="请选择小区"
|
|
|
|
|
|
|
|
v-model="communityCode"
|
|
|
|
<span class="form">
|
|
|
|
>
|
|
|
|
<a-select v-model="communityCode" notFoundContent='该城市无可选择小区' :disabled='cityvalue.length===0' placeholder="请选择小区">
|
|
|
|
<a-select-option value="123456">华西村</a-select-option>
|
|
|
|
<a-select-option v-for="item in communityList" :key='item.id' :value='item.code'>{{item.name}}</a-select-option>
|
|
|
|
<a-select-option value="1234">地球村</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select>
|
|
|
|
<a-input placeholder="请输入手机号码" v-model="form.tel"></a-input>
|
|
|
|
<a-input placeholder="请输入手机号码" v-model="form.tel"></a-input>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
placeholder="请输入验证码"
|
|
|
|
v-model="form.code"
|
|
|
|
v-model="form.code"
|
|
|
|
style="width: 60%"
|
|
|
|
style="width: 60%"
|
|
|
|
></a-input>
|
|
|
|
></a-input>
|
|
|
|
</span>
|
|
|
|
<a-button type="primary" @click="getCode">获取验证码</a-button>
|
|
|
|
<a-button type="primary" @click="getCode">获取验证码</a-button>
|
|
|
|
<a-row>
|
|
|
|
<a-row>
|
|
|
|
<a-col :span="12" style="margin-left: 23px"
|
|
|
|
<a-col :span="12" style="margin-left: 23px"
|
|
|
@ -194,7 +194,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { loginTel, sendTelCode } from "../../api/public/login";
|
|
|
|
import { loginTel, sendTelCode, allCity, findcommunity } from "../../api/public/login";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Login",
|
|
|
|
name: "Login",
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
@ -234,10 +234,14 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
cityList:[],//城市列表
|
|
|
|
|
|
|
|
cityvalue:[], //省市区级联绑定值
|
|
|
|
|
|
|
|
communityList:[] //小区列表
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.keyupEnter();
|
|
|
|
this.keyupEnter();
|
|
|
|
|
|
|
|
this.getCity()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
communityCode:{
|
|
|
|
communityCode:{
|
|
|
@ -247,6 +251,30 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
async getCity(){
|
|
|
|
|
|
|
|
let res = await allCity()
|
|
|
|
|
|
|
|
this.cityList = res.data
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getCommunity(cityId){
|
|
|
|
|
|
|
|
this.$axios({
|
|
|
|
|
|
|
|
method:'get',
|
|
|
|
|
|
|
|
url:process.env.VUE_APP_URL+'manage/community/findAll',
|
|
|
|
|
|
|
|
params:{ //这里是发送给后台的数据
|
|
|
|
|
|
|
|
cityId:cityId
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).then((response) =>{ //这里使用了ES6的语法
|
|
|
|
|
|
|
|
this.communityList = response.data.data
|
|
|
|
|
|
|
|
}).catch((error) =>{
|
|
|
|
|
|
|
|
console.log(error) //请求失败返回的数据
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
onChange(data){
|
|
|
|
|
|
|
|
this.getCommunity(data[2])
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
filter(inputValue, path) {
|
|
|
|
|
|
|
|
return path.some(cityList => cityList.name.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
|
|
|
|
|
|
|
|
},
|
|
|
|
// 绑定enter事件
|
|
|
|
// 绑定enter事件
|
|
|
|
keyupEnter() {
|
|
|
|
keyupEnter() {
|
|
|
|
document.onkeydown = (e) => {
|
|
|
|
document.onkeydown = (e) => {
|
|
|
@ -367,7 +395,7 @@ export default {
|
|
|
|
/deep/.ant-form-item {
|
|
|
|
/deep/.ant-form-item {
|
|
|
|
margin-top: -10px;
|
|
|
|
margin-top: -10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.login-input {
|
|
|
|
.login-input .form{
|
|
|
|
text-align: left;
|
|
|
|
text-align: left;
|
|
|
|
margin-top: 20px;
|
|
|
|
margin-top: 20px;
|
|
|
|
/deep/.ant-input {
|
|
|
|
/deep/.ant-input {
|
|
|
@ -375,7 +403,8 @@ export default {
|
|
|
|
border-bottom: 1px solid #f4eded;
|
|
|
|
border-bottom: 1px solid #f4eded;
|
|
|
|
border-radius: 0;
|
|
|
|
border-radius: 0;
|
|
|
|
width: 90%;
|
|
|
|
width: 90%;
|
|
|
|
margin: 25px;
|
|
|
|
margin-left: 25px;
|
|
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/deep/.ant-select {
|
|
|
|
/deep/.ant-select {
|
|
|
|
border: 0px;
|
|
|
|
border: 0px;
|
|
|
@ -383,7 +412,16 @@ export default {
|
|
|
|
border-radius: 0;
|
|
|
|
border-radius: 0;
|
|
|
|
width: 90%;
|
|
|
|
width: 90%;
|
|
|
|
margin-left: 25px;
|
|
|
|
margin-left: 25px;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/.ant-cascader-picker{
|
|
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
|
|
margin-left: 25px;
|
|
|
|
|
|
|
|
width:90%;
|
|
|
|
|
|
|
|
overflow-y:hidden;
|
|
|
|
|
|
|
|
overflow-x:hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|