From 3f9032e92fdd383bfefc87a0bec9b242e1223851 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 09 六月 2026 17:08:44 +0800
Subject: [PATCH] 改bug
---
small-program/pages/index/index.vue | 89 +++++++++++++++++++++++---------------------
1 files changed, 47 insertions(+), 42 deletions(-)
diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index eef60e0..af69cb0 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -207,6 +207,7 @@
return
}
uni.setStorageSync("orderStatus",status)
+ // uni.$emit('shuaxin', status)
uni.switchTab({
url: '/pages/itinerary/itinerary'
})
@@ -272,48 +273,51 @@
});
},
chooseLocation() {
- var that = this;
- uni.chooseLocation({
- type: 'gcj02',
- success: async function(addr) {
- console.log(addr, '==================uniapp閫夋嫨浣嶇疆鎴愬姛');
- if (addr.errMsg === 'chooseLocation:ok' && addr.latitude) {
- const locParam = { latitude: addr.latitude, longitude: addr.longitude };
- var myAmapFun = new amapFile.AMapWX({ key: that.$gaodeMapKey });
- myAmapFun.getRegeo({
- location: addr.longitude + ',' + addr.latitude,
- success: async function(data) {
- console.log(data, '==================閫夋嫨鍦板潃閫嗚В鏋�');
- let info = data[0];
- locParam.province = info.province;
- locParam.adcode = info.regeocodeData.addressComponent.adcode
- var ta = addr.name || '鍦板潃鑾峰彇澶辫触';
- locParam.address = ta
- const resCity = await that.$u.api.getCityByName({ code: locParam.adcode })
- if (resCity.code === 200 && resCity.data) {
- locParam.cityId = resCity.data.id
- that.$store.commit('setPosition', locParam)
- that.pointList = []
- that.getNearbyShopList()
- } else {
- that.$store.commit('setPosition', locParam)
- that.$store.commit('clearCityId')
- that.pointList = []
- }
- },
- fail: function(err) {
- console.error('鑾峰彇浣嶇疆澶辫触===========', err);
- that.$store.commit('setPosition', locParam)
- that.pointList = []
- that.getNearbyShopList()
- }
- });
- }
- },
- fail: function(err) {
- console.error('閫夋嫨浣嶇疆澶辫触===========', err);
- }
- });
+ uni.navigateTo({
+ url: '/shop/pages/storage-point/storage-point'
+ })
+ // var that = this;
+ // uni.chooseLocation({
+ // type: 'gcj02',
+ // success: async function(addr) {
+ // console.log(addr, '==================uniapp閫夋嫨浣嶇疆鎴愬姛');
+ // if (addr.errMsg === 'chooseLocation:ok' && addr.latitude) {
+ // const locParam = { latitude: addr.latitude, longitude: addr.longitude };
+ // var myAmapFun = new amapFile.AMapWX({ key: that.$gaodeMapKey });
+ // myAmapFun.getRegeo({
+ // location: addr.longitude + ',' + addr.latitude,
+ // success: async function(data) {
+ // console.log(data, '==================閫夋嫨鍦板潃閫嗚В鏋�');
+ // let info = data[0];
+ // locParam.province = info.province;
+ // locParam.adcode = info.regeocodeData.addressComponent.adcode
+ // var ta = addr.name || '鍦板潃鑾峰彇澶辫触';
+ // locParam.address = ta
+ // const resCity = await that.$u.api.getCityByName({ code: locParam.adcode })
+ // if (resCity.code === 200 && resCity.data) {
+ // locParam.cityId = resCity.data.id
+ // that.$store.commit('setPosition', locParam)
+ // that.pointList = []
+ // that.getNearbyShopList()
+ // } else {
+ // that.$store.commit('setPosition', locParam)
+ // that.$store.commit('clearCityId')
+ // that.pointList = []
+ // }
+ // },
+ // fail: function(err) {
+ // console.error('鑾峰彇浣嶇疆澶辫触===========', err);
+ // that.$store.commit('setPosition', locParam)
+ // that.pointList = []
+ // that.getNearbyShopList()
+ // }
+ // });
+ // }
+ // },
+ // fail: function(err) {
+ // console.error('閫夋嫨浣嶇疆澶辫触===========', err);
+ // }
+ // });
},
// 瀹氫綅
positioning() {
@@ -334,6 +338,7 @@
locParam.adcode = info.regeocodeData.addressComponent.adcode;
locParam.area = info.district;
locParam.street = info.street;
+ locParam.cityName = info.regeocodeData.addressComponent.city;
var ta = info.name || '鍦板潃鑾峰彇澶辫触';
locParam.address = ta
const resCity = await that.$u.api.getCityByName({ code: locParam.adcode })
--
Gitblit v1.9.3