首页定位
This commit is contained in:
parent
366746a765
commit
0093c2efe4
|
@ -24,7 +24,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-top-sm flex align-center index-mian">
|
<view class="padding-top-sm flex align-center index-mian">
|
||||||
<view v-if="XCXIsSelect != '否'" class="flex align-center justify-between margin-right-sm"
|
<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>
|
<image src="../../static/liliao-1.png" class="dingwei-img"></image>
|
||||||
<view class="localName">{{ city }}</view>
|
<view class="localName">{{ city }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -356,7 +356,8 @@
|
||||||
let that = this
|
let that = this
|
||||||
that.XCXIsSelect = this.$queue.getData("XCXIsSelect");
|
that.XCXIsSelect = this.$queue.getData("XCXIsSelect");
|
||||||
that.city = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市'
|
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 (uni.getStorageSync('token')) {
|
||||||
if (that.latitude && that.longitude) {
|
if (that.latitude && that.longitude) {
|
||||||
// that.getlist()
|
// that.getlist()
|
||||||
|
@ -484,10 +485,36 @@
|
||||||
console.log("得到的城市-------------》",e[0].label);
|
console.log("得到的城市-------------》",e[0].label);
|
||||||
this.city = e[0].label;
|
this.city = e[0].label;
|
||||||
uni.setStorageSync('city', this.city)
|
uni.setStorageSync('city', this.city)
|
||||||
// this.getKTCityList();
|
this.getKTCityList();
|
||||||
|
this.getHomeArtificerList();
|
||||||
// this.page = 1
|
// this.page = 1
|
||||||
// this.getlist()
|
// 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() {
|
showCityList() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
if (this.latitude === '' || this.longitude === '') {
|
if (this.latitude === '' || this.longitude === '') {
|
||||||
|
@ -535,9 +562,9 @@
|
||||||
var data={
|
var data={
|
||||||
isStart: 1,
|
isStart: 1,
|
||||||
status: 1,
|
status: 1,
|
||||||
city: "长春市",
|
city: this.city,
|
||||||
longitude:'125.281198',
|
longitude:this.longitude,
|
||||||
latitude:'43.883036',
|
latitude:this.latitude,
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 3
|
limit: 3
|
||||||
}
|
}
|
||||||
|
@ -996,7 +1023,7 @@
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.index-fujin-jie-name{
|
.index-fujin-jie-name{
|
||||||
|
|
Loading…
Reference in New Issue