|
|
@@ -953,6 +953,7 @@ export default {
|
|
|
console.log(res, '地理位置');
|
|
|
that.latitude = res.latitude;
|
|
|
that.longitude = res.longitude;
|
|
|
+ if(that.$queue.array_column(that.sxTypeList,'id').indexOf(3)<0)
|
|
|
that.sxTypeList.push({
|
|
|
id: 3,
|
|
|
name: '附近'
|
|
|
@@ -970,16 +971,23 @@ export default {
|
|
|
// #ifdef APP-PLUS
|
|
|
if (res.address) {
|
|
|
that.city = res.address.city
|
|
|
+ if(go=='go')
|
|
|
+ that.goNav('/package/screen/city?city=' + that.city + '&county=' + that.county + '&type=' + 'search')
|
|
|
+ return;
|
|
|
} else {
|
|
|
- that.getSelectCity(that.longitude, that.latitude);
|
|
|
+ that.getSelectCity(that.longitude, that.latitude,go);
|
|
|
+ return
|
|
|
}
|
|
|
// #endif
|
|
|
// #ifndef APP
|
|
|
- that.getSelectCity(that.longitude, that.latitude);
|
|
|
+ that.getSelectCity(that.longitude, that.latitude,go);
|
|
|
+ return
|
|
|
// #endif
|
|
|
+ }else{
|
|
|
+ that.city=uni.getStorageSync('city')
|
|
|
+ if(go=='go')
|
|
|
+ that.goNav('/package/screen/city?city=' + that.city + '&county=' + that.county + '&type=' + 'search')
|
|
|
}
|
|
|
- if(go=='go')
|
|
|
- that.goNav('/package/screen/city?city=' + that.city + '&county=' + that.county + '&type=' + 'search')
|
|
|
},
|
|
|
fail: function () {
|
|
|
console.log('获取地址失败');
|
|
|
@@ -1413,12 +1421,14 @@ export default {
|
|
|
* @param {Object} latitude
|
|
|
* 使用经纬度获取城市
|
|
|
*/
|
|
|
- getSelectCity(longitude, latitude) {
|
|
|
+ getSelectCity(longitude, latitude,go) {
|
|
|
this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
// console.log(res, '获取地址信息')
|
|
|
this.city = res.data.city ? res.data.city : '区域'
|
|
|
uni.setStorageSync('city', res.data.city)
|
|
|
+ if(go=='go')
|
|
|
+ this.goNav('/package/screen/city?city=' + this.city + '&county=' + this.county + '&type=' + 'search')
|
|
|
if (this.userType == 1) {
|
|
|
this.getUserList()
|
|
|
} else {
|