Browse Source

车辆列表搜索

twt 7 months ago
parent
commit
bd6ba0e02e
3 changed files with 66 additions and 7 deletions
  1. 62 3
      pages/index/shopList.vue
  2. 2 2
      pages/shop/shop.vue
  3. 2 2
      utils/request.js

+ 62 - 3
pages/index/shopList.vue

@@ -14,7 +14,13 @@
 				<image src="../../static/timg/icon_arrow_def@2x.png" mode="" class="jtbelow"></image>
 			</view>
 		</view>
-		<view style="height: 90rpx;"></view>
+		
+		<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">
+			<image src="../../static/img/icon_close.png" mode="" @click="empty" v-if="inputChShow" class="inputCh"></image>
+		</view>
+		<view style="height: 210rpx;"></view>
 		<view class="shopline" v-for="(item,index) in queryShopList" @click="goDetail(item)">
 			<view class="shoplineLeft">
 				<image :src="item.photoPath" mode="" class="shopImg" v-if="item.photoPath"></image>
@@ -127,9 +133,19 @@
 				authorizShow:false,
 				wxOpenData:'',
 				userInfo: '',
+				shopName:'',
+				inputChShow:false,
 			}
 		},
-
+        watch:{
+			shopName(val){
+				console.log(val)
+				if(val){
+					this.inputChShow=true
+				}
+			},
+        		
+        },
 		onLoad() {
 			var that = this;
 			uni.removeStorageSync('selectCity');
@@ -170,6 +186,14 @@
 			}
 		},
 		methods: {
+			empty(){
+				
+				this.shopName='';
+				this.inputChShow=false;
+				this.queryShopList=[];
+				this.page=1;
+				this.getqueryShopList()
+			},
 			authorizShowno(){
 				this.authorizShow=false
 			},
@@ -390,7 +414,8 @@
 					lat: this.location.lat ? this.location.lat : '',
 					lng: this.location.lng ? this.location.lng : '',
                     city:this.cityCode,
-                    area:this.area
+                    area:this.area,
+					shopName:this.shopName
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					this.queryShopList = res.data.shop;
@@ -811,4 +836,38 @@
 		margin-top: 62rpx;
 		margin-left:71rpx;
 	}
+	.sstopInput{
+		width: 626rpx;
+		height: 72rpx;
+		background: #F4F5F7;
+		border-radius: 36rpx;
+		line-height: 72rpx;
+		font-size: 28rpx;
+		padding-left: 76rpx;
+	}
+	.sstop{
+		position: fixed;
+		padding-top: 24rpx;
+		padding-left: 24rpx;
+		background: #ffffff;
+		width: 100vw;
+		top: 72rpx;
+		left: 0;
+		padding-bottom: 20rpx;
+	}
+	.sstopimg{
+		width: 40rpx;
+		height: 40rpx;
+		position: absolute;
+		left: 44rpx;
+		top: 40rpx;
+	}
+	.inputCh{
+	width:40rpx;
+	height: 40rpx;
+	position: absolute;
+	right: 60rpx;
+	top: 40rpx;
+	z-index: 11;
+	}
 </style>

+ 2 - 2
pages/shop/shop.vue

@@ -511,7 +511,7 @@
 		height: 100rpx;
 		position: fixed;
 		right: 24rpx;
-		bottom: 60rpx;
+		bottom: 40rpx;
 	}
 	.timeTbox{
 			
@@ -560,7 +560,7 @@
 width:40rpx;
 height: 40rpx;
 position: absolute;
-right: 40rpx;
+right: 60rpx;
 top: 40rpx;
 z-index: 11;
 }

+ 2 - 2
utils/request.js

@@ -8,10 +8,10 @@
 import $store from '../store'
 const extConfig = uni.getExtConfigSync();		
 console.log(extConfig)
-const baseUrl=extConfig.url+'/'
+//const baseUrl=extConfig.url+'/'
 
 //const baseUrl='http://dms.66km.com.cn/'
-/* const baseUrl='http://192.168.0.8:20187/' */
+ const baseUrl='http://192.168.0.23:20187/' 
 //const baseUrl='https://store-api.qdbtl.cn/'
 //const baseUrl='https://apidms.66km.com/'