Преглед на файлове

fix: 优化获取门店列表

zhanghui преди 2 години
родител
ревизия
7c629f4d6a
променени са 2 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 1 1
      pages/index/index.vue
  2. 5 1
      storePages/store/store-choose.vue

+ 1 - 1
pages/index/index.vue

@@ -274,7 +274,7 @@
 						this.isGetAddress = !this.isGetAddress
 						this.getStoreListData(this.reqParm)
 					}
-				},5000)
+				},3000)
 				// 获取位置信息查询门店列表数据
 				this.getLocation();
 			} else {

+ 5 - 1
storePages/store/store-choose.vue

@@ -114,7 +114,7 @@
                     this.isGetAddress = !this.isGetAddress
                     this.getStoreListData()
                 }
-            },5000)
+            },3000)
             // 判断Openid是否为空
             if (option.type) {
                 this.type = option.type;
@@ -150,6 +150,9 @@
                 })
             },
             getLocation() {
+                uni.showLoading({
+                    title: '加载中...'
+                });
                 let that = this
                 uni.getLocation({
                     type: 'gcj02',
@@ -207,6 +210,7 @@
                     latitude: this.latitude,
                     longitude: this.longitude,
                 }).then((res) => {
+                    uni.hideLoading();
                     console.log(res)
                     that.storeList = res.data.data
                     that.latitude = res.data.data[0].latitude