|
@@ -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>
|