Commit ee761ac0 authored by Mac's avatar Mac

1

parent 07fd45dc
......@@ -14,14 +14,25 @@
@change="changeHandler"
></u-search>
</view>
<view class="kaitong">
<view v-if="show==true">
<scroll-view
:scroll-y="true"
style="height: calc(100vh - 50px)">
<view class="txtype">
<view class="list-cell" v-for="(x, index) in searchList" :key="index" @click="goback(x,2)">
{{x.Name}}
</view>
</view>
</scroll-view>
</view>
<view class="kaitong" v-if="show==false">
<div style='width: 100%;'><span style='color: #9A9A9A;font-size: 12px;'>已开通城市</span></div>
<view v-for="(item, index) in RegionList" :key="index" class="region" @click="goback(item,1)">
{{item.RegionName}}
</view>
</view>
<div style='height: calc(100vh - 50px);'>
<div style='height: calc(100vh - 50px);' v-if="show==false">
<u-index-list :scrollTop="scrollTop">
<view v-for="(item, index) in indexList" :key="index">
<u-index-anchor :index="item.ti" />
......@@ -32,7 +43,7 @@
</view>
</u-index-list>
</div>
</view>
</view>
......@@ -49,7 +60,9 @@
secondary:'',
RegionList:[],
cityList:[],
searchList:[],//搜索出来的
searchKey: "",
show:false,
indexList: [{ti:"A"}, {ti:"B"}, {ti:"C"}, {ti:"D"}, {ti:"E"}, {ti:"F"}, {ti:"G"},{ ti:"H"}, {ti:"I"}, {ti:"J"}, {ti:"K"}, {ti:"L"},
{ti:"M"}, {ti:"N"}, {ti:"O"}, {ti:"P"},{ ti:"Q"}, {ti:"R"}, {ti:"S"}, {ti:"T"}, {ti:"U"},
{ti:"V"}, {ti:"W"}, {ti:"X"}, {ti:"Y"}, {ti:"Z"}
......@@ -96,6 +109,7 @@
})
})
uni.hideLoading();
}
);
......@@ -136,7 +150,19 @@
},
searchHandler(val){
console.log(val)
if(val!=''){
this.searchList = []
this.cityList.forEach(x=>{
if(x.Name.indexOf(val)!=-1){
this.searchList.push(x)
}
})
this.show=true
}else{
this.show=false
}
},
changeHandler(val) {
......@@ -162,6 +188,7 @@
font-size: 14px;
line-height: 24px;
background-color: #fff;
position: relative;
}
.pickcarcity .anchor-text {
......@@ -189,4 +216,11 @@
.pickcarcity .ctrl-box {
padding: 5px 10px;
}
.pickcarcity .txtype{
width: 100%;
background: #FFF;
height: calc(100vh - 50px);
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment