From 0093c2efe4dc21e1f051472c693386145c782d47 Mon Sep 17 00:00:00 2001 From: "Mr.jiang" <714156421@qq.com> Date: Tue, 25 Jun 2024 10:32:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index b92b835..47d4b84 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -24,7 +24,7 @@ + @tap="Cityshow = true" style="line-height: 68rpx;"> {{ city }} @@ -356,7 +356,8 @@ let that = this that.XCXIsSelect = this.$queue.getData("XCXIsSelect"); that.city = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市' - that.token = uni.getStorageSync('token') + that.token = uni.getStorageSync('token'); + that.getKTCityList(); // if (uni.getStorageSync('token')) { if (that.latitude && that.longitude) { // that.getlist() @@ -484,10 +485,36 @@ console.log("得到的城市-------------》",e[0].label); this.city = e[0].label; uni.setStorageSync('city', this.city) - // this.getKTCityList(); + this.getKTCityList(); + this.getHomeArtificerList(); // this.page = 1 // this.getlist() }, + getKTCityList() { + this.$Request.getT('/app/trip/selectTripList').then(res => { + if (res.code == 0) { + this.cityList = []; + let isOpen = false + let cityName = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市' + res.data.forEach((d, index) => { + if (cityName === d.city) { + isOpen = true; + } + let data = {} + data.label = d.city + data.value = index + this.cityList.push(data); + }); + + if (!isOpen) { + this.orderList = [] + // this.showTP = true; + } else { + this.showTP = false; + } + } + }); + }, showCityList() { // #ifdef APP-PLUS if (this.latitude === '' || this.longitude === '') { @@ -535,9 +562,9 @@ var data={ isStart: 1, status: 1, - city: "长春市", - longitude:'125.281198', - latitude:'43.883036', + city: this.city, + longitude:this.longitude, + latitude:this.latitude, page: 1, limit: 3 } @@ -996,7 +1023,7 @@ margin-top: 10px; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 2; + -webkit-line-clamp: 1; overflow: hidden; } .index-fujin-jie-name{