Commit 86a9704a authored by zhangyanni's avatar zhangyanni

搜索城市

parent 3fb4e7b7
......@@ -61,6 +61,9 @@
<h3>H</h3>
<p v-for='(item,index) in cityH' v-on:click='cityactive(index,cityH,false,"H")'
:class="citySortIndexH==index?'activeSortCity':''">{{item.name}}</p>
<h3>I</h3>
<p v-for='(item,index) in cityI' v-on:click='cityactive(index,cityI,false,"I")'
:class="citySortIndexI==index?'activeSortCity':''">{{item.name}}</p>
<h3>J</h3>
<p v-for='(item,index) in cityJ' v-on:click='cityactive(index,cityJ,false,"J")'
:class="citySortIndexJ==index?'activeSortCity':''">{{item.name}}</p>
......@@ -76,6 +79,9 @@
<h3>N</h3>
<p v-for='(item,index) in cityN' v-on:click='cityactive(index,cityN,false,"N")'
:class="citySortIndexN==index?'activeSortCity':''">{{item.name}}</p>
<h3>O</h3>
<p v-for='(item,index) in cityO' v-on:click='cityactive(index,cityO,false,"O")'
:class="citySortIndexO==index?'activeSortCity':''">{{item.name}}</p>
<h3>P</h3>
<p v-for='(item,index) in cityP' v-on:click='cityactive(index,cityP,false,"P")'
:class="citySortIndexP==index?'activeSortCity':''">{{item.name}}</p>
......@@ -91,6 +97,12 @@
<h3>T</h3>
<p v-for='(item,index) in cityT' v-on:click='cityactive(index,cityT,false,"T")'
:class="citySortIndexT==index?'activeSortCity':''">{{item.name}}</p>
<h3>U</h3>
<p v-for='(item,index) in cityU' v-on:click='cityactive(index,cityU,false,"U")'
:class="citySortIndexU==index?'activeSortCity':''">{{item.name}}</p>
<h3>V</h3>
<p v-for='(item,index) in cityV' v-on:click='cityactive(index,cityV,false,"V")'
:class="citySortIndexV==index?'activeSortCity':''">{{item.name}}</p>
<h3>W</h3>
<p v-for='(item,index) in cityW' v-on:click='cityactive(index,cityW,false,"W")'
:class="citySortIndexW==index?'activeSortCity':''">{{item.name}}</p>
......@@ -147,7 +159,7 @@
ssval: '',
zimText: '',
sidabers: [
'热门', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'W', 'X', 'Y', 'Z'
'热门', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H','I', 'J', 'K', 'L', 'M', 'N', 'O','P', 'Q', 'R', 'S', 'T','U','V', 'W', 'X', 'Y', 'Z'
],
citys: [],
hostCitys: [],
......@@ -161,16 +173,20 @@
citySortIndexF: -1,
citySortIndexG: -1,
citySortIndexH: -1,
citySortIndexI: -1,
citySortIndexJ: -1,
citySortIndexK: -1,
citySortIndexL: -1,
citySortIndexM: -1,
citySortIndexN: -1,
citySortIndexO: -1,
citySortIndexP: -1,
citySortIndexQ: -1,
citySortIndexR: -1,
citySortIndexS: -1,
citySortIndexT: -1,
citySortIndexU: -1,
citySortIndexV: -1,
citySortIndexW: -1,
citySortIndexX: -1,
citySortIndexY: -1,
......@@ -403,16 +419,20 @@
this.citySortIndexF = -1;
this.citySortIndexG = -1;
this.citySortIndexH = -1;
this.citySortIndexI = -1;
this.citySortIndexJ = -1;
this.citySortIndexK = -1;
this.citySortIndexL = -1;
this.citySortIndexM = -1;
this.citySortIndexN = -1;
this.citySortIndexO = -1;
this.citySortIndexP = -1;
this.citySortIndexQ = -1;
this.citySortIndexR = -1;
this.citySortIndexS = -1;
this.citySortIndexT = -1;
this.citySortIndexU = -1;
this.citySortIndexV = -1;
this.citySortIndexW = -1;
this.citySortIndexX = -1;
this.citySortIndexY = -1;
......@@ -466,6 +486,11 @@
return item.firstChar.substr(0, 1) == 'h' || item.firstChar.substr(0, 1) == 'H';
});
},
cityI: function () {
return this.citys.filter(function (item) {
return item.firstChar.substr(0, 1) == 'i' || item.firstChar.substr(0, 1) == 'I';
});
},
cityJ: function () {
return this.citys.filter(function (item) {
return item.firstChar.substr(0, 1) == 'j' || item.firstChar.substr(0, 1) == 'J';
......@@ -491,6 +516,11 @@
return item.firstChar.substr(0, 1) == 'n' || item.firstChar.substr(0, 1) == 'N';
});
},
cityO: function () {
return this.citys.filter(function (item) {
return item.firstChar.substr(0, 1) == 'o' || item.firstChar.substr(0, 1) == 'O';
});
},
cityP: function () {
return this.citys.filter(function (item) {
return item.firstChar.substr(0, 1) == 'p' || item.firstChar.substr(0, 1) == 'P';
......@@ -516,6 +546,16 @@
return item.firstChar.substr(0, 1) == 't' || item.firstChar.substr(0, 1) == 'T';
});
},
cityU: function () {
return this.citys.filter(function (item) {
return item.firstChar.substr(0, 1) == 'u' || item.firstChar.substr(0, 1) == 'U';
});
},
cityV: function () {
return this.citys.filter(function (item) {
return item.firstChar.substr(0, 1) == 'v' || item.firstChar.substr(0, 1) == 'V';
});
},
cityW: function () {
return this.citys.filter(function (item) {
return item.firstChar.substr(0, 1) == 'w' || item.firstChar.substr(0, 1) == 'W';
......
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