From b638ef550f6583df4ee5ab7037a2988380cbf7ef Mon Sep 17 00:00:00 2001 From: jimmyxuexue <1002661758@qq.com> Date: Mon, 5 Dec 2022 10:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=92=84=20=E9=80=89=E6=8B=A9=E5=9F=8E?= =?UTF-8?q?=E5=B8=82=E9=A1=B5=E9=9D=A2=E6=94=AF=E6=8C=81=E7=B2=98=E6=80=A7?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/home/home.vue | 85 ++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/src/page/home/home.vue b/src/page/home/home.vue index 85208fb3..25afef47 100644 --- a/src/page/home/home.vue +++ b/src/page/home/home.vue @@ -55,46 +55,46 @@ export default { }, mounted(){ - // 获取当前城市 - cityGuess().then(res => { - this.guessCity = res.name; - this.guessCityid = res.id; - }) - - //获取热门城市 - hotcity().then(res => { - this.hotcity = res; - }) - - //获取所有城市 - groupcity().then(res => { - this.groupcity = res; - }) - }, - - components:{ - headTop - }, - - computed:{ - //将获取的数据按照A-Z字母开头排序 - sortgroupcity(){ - let sortobj = {}; - for (let i = 65; i <= 90; i++) { - if (this.groupcity[String.fromCharCode(i)]) { - sortobj[String.fromCharCode(i)] = this.groupcity[String.fromCharCode(i)]; - } - } - return sortobj - } - }, - - methods:{ - //点击图标刷新页面 - reload(){ - window.location.reload(); - } - }, + // 获取当前城市 + cityGuess().then(res => { + this.guessCity = res.name; + this.guessCityid = res.id; + }) + + //获取热门城市 + hotcity().then(res => { + this.hotcity = res; + }) + + //获取所有城市 + groupcity().then(res => { + this.groupcity = res; + }) + }, + + components:{ + headTop + }, + + computed:{ + //将获取的数据按照A-Z字母开头排序 + sortgroupcity(){ + let sortobj = {}; + for (let i = 65; i <= 90; i++) { + if (this.groupcity[String.fromCharCode(i)]) { + sortobj[String.fromCharCode(i)] = this.groupcity[String.fromCharCode(i)]; + } + } + return sortobj + } + }, + + methods:{ + //点击图标刷新页面 + reload(){ + window.location.reload(); + } + }, } @@ -171,8 +171,11 @@ export default { span{ @include sc(0.475rem, #999); } + position: sticky; + top: 1.95rem; + background-color: #fff; } - + .letter_classify_li{ margin-bottom: 0.4rem; background-color: #fff;