Преглед изворни кода

Merge branch 'dev' into atsMaster

twt пре 2 недеља
родитељ
комит
6eefdfaa84
1 измењених фајлова са 46 додато и 1 уклоњено
  1. 46 1
      pages/index/shopList.vue

+ 46 - 1
pages/index/shopList.vue

@@ -2,7 +2,7 @@
 	<view class="box">
 		<view class="sstop">
 			<image src="../../static/timg/icon_search@2x.png" mode="" class="sstopimg"></image>
-			<input type="text" v-model="shopName" placeholder="请输入门店名称" class="sstopInput" @confirm="getqueryShopList">
+			<input type="text" v-model="shopName" placeholder="请输入门店名称" class="sstopInput" @confirm="getqueryShopList2">
 			<image src="../../static/img/icon_close.png" mode="" @click="empty" v-if="inputChShow" class="inputCh"></image>
 		</view>
         <view class="regionBox">
@@ -182,6 +182,7 @@
 				this.cityCode=selectCity.code
 				this.areaName='区域'
 				this.area=''
+				this.shopName=''
 				this.getAreaList()
 				this.getqueryShopList() //获取门店列表
 			}
@@ -319,6 +320,7 @@
 				})
 			},
 			checkarea(item){
+				this.shopName=''
 				if(this.area==item.code){
 					this.areaName='区域'
 					this.area=''
@@ -328,6 +330,7 @@
 					this.area=item.code
 					this.getqueryShopList() //获取门店列表
 				}
+				
 				this.$refs.popup.close()
 			},
 			bindPickerChange(e){
@@ -420,6 +423,48 @@
 				
 				})
 			},
+			getqueryShopList2(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.loading=false;
+				this.$http('opencarOwnerHome/queryShopInfoList', {
+				
+					lat: this.location.lat ? this.location.lat : '',
+					lng: this.location.lng ? this.location.lng : '',
+				    city:'',
+				    area:'',
+					shopName:this.shopName
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					this.queryShopList = res.data.shop;
+					this.loading=true;
+					//console.log('list+=', this.queryShopList);
+					if(this.queryShopList.length==0){
+						/* uni.showToast({
+							title: '当前城市暂无门店,请切换城市查看',
+							icon: 'none',
+							duration: 4000
+						}); */
+						uni.showModal({
+						        title: '提示',
+						        content: '当前城市暂无门店,请切换城市查看',
+						        success: function(res) {
+						        if (res.confirm) {
+						            // 执行确认后的操作
+									uni.navigateTo({
+										url:'/pages/subPack/chooseCity?type=1'
+									})
+						        } 
+						        else {
+						            // 执行取消后的操作
+						        }
+						    }
+						})
+					}
+				
+				})
+			},
 			getqueryShopList() {
 				uni.showLoading({
 					title: '加载中'