首页定位
This commit is contained in:
parent
366746a765
commit
0093c2efe4
|
@ -24,7 +24,7 @@
|
|||
</view>
|
||||
<view class="padding-top-sm flex align-center index-mian">
|
||||
<view v-if="XCXIsSelect != '否'" class="flex align-center justify-between margin-right-sm"
|
||||
@tap="showCityList" style="line-height: 68rpx;">
|
||||
@tap="Cityshow = true" style="line-height: 68rpx;">
|
||||
<image src="../../static/liliao-1.png" class="dingwei-img"></image>
|
||||
<view class="localName">{{ city }}</view>
|
||||
</view>
|
||||
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue