|
|
@ -61,33 +61,6 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 左侧分类导航 --> |
|
|
|
|
|
|
|
<!-- <scroll-view scroll-y="true" class="left"> |
|
|
|
|
|
|
|
<view class="row" v-for="(mers,index) in MerchantList" :key="mers.id" |
|
|
|
|
|
|
|
:class="[index==showCategoryIndex?'on':'']" @click="showCategory(index,mers.id)"> |
|
|
|
|
|
|
|
<view class="text"> |
|
|
|
|
|
|
|
<view class="block"></view> |
|
|
|
|
|
|
|
{{mers.merchantName}} |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</scroll-view> --> |
|
|
|
|
|
|
|
<!-- 右侧子导航 --> |
|
|
|
|
|
|
|
<!-- <scroll-view scroll-y="true" class="right"> |
|
|
|
|
|
|
|
<view class="category"> |
|
|
|
|
|
|
|
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666"> |
|
|
|
|
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres1"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="list"> |
|
|
|
|
|
|
|
<view class="box" v-for="(box,i) in categoryList" :key="i" @tap="toCategory(box)" |
|
|
|
|
|
|
|
v-show="i==showCategoryIndex"> |
|
|
|
|
|
|
|
<image :src="imageUrl+box.ext1"></image> |
|
|
|
|
|
|
|
<view class="text">{{box.storeName}}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</scroll-view> --> |
|
|
|
|
|
|
|
<!-- </view> --> |
|
|
|
|
|
|
|
<wybPopup ref="popup" type="top" height="800" width="500" radius="6" :showCloseIcon="false"> |
|
|
|
<wybPopup ref="popup" type="top" height="800" width="500" radius="6" :showCloseIcon="false"> |
|
|
|
<view class="fotct font18 fontwig6 fcor333 mart10 height30">筛选门店</view> |
|
|
|
<view class="fotct font18 fontwig6 fcor333 mart10 height30">筛选门店</view> |
|
|
|
<view class="mart15"> |
|
|
|
<view class="mart15"> |
|
|
@ -114,6 +87,7 @@ |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
showCategoryIndex: '', |
|
|
|
showCategoryIndex: '', |
|
|
|
|
|
|
|
showCategoryIndexId: '', |
|
|
|
headerPosition: "fixed", |
|
|
|
headerPosition: "fixed", |
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
imgadres: 'jt.png', |
|
|
|
imgadres: 'jt.png', |
|
|
@ -152,6 +126,10 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//上拉加载,需要自己在page.json文件中配置"onReachBottomDistance" |
|
|
|
|
|
|
|
onReachBottom() { |
|
|
|
|
|
|
|
this.getStoreListByMerchant(); |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
//显示弹出 |
|
|
|
//显示弹出 |
|
|
|
showPopup() { |
|
|
|
showPopup() { |
|
|
@ -213,7 +191,8 @@ |
|
|
|
if (res.return_code == '000000' && res.return_data != '') { |
|
|
|
if (res.return_code == '000000' && res.return_data != '') { |
|
|
|
this.MerchantList = res.return_data; |
|
|
|
this.MerchantList = res.return_data; |
|
|
|
this.showCategoryIndex = res.return_data[0].merchantName; |
|
|
|
this.showCategoryIndex = res.return_data[0].merchantName; |
|
|
|
this.getStoreListByMerchant(res.return_data[0].id); |
|
|
|
this.showCategoryIndexId = res.return_data[0].id; |
|
|
|
|
|
|
|
this.getStoreListByMerchant(); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.MerchantList = []; |
|
|
|
this.MerchantList = []; |
|
|
@ -251,20 +230,33 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//门店列表 |
|
|
|
//门店列表 |
|
|
|
getStoreListByMerchant(item) { |
|
|
|
getStoreListByMerchant() { |
|
|
|
uni.showLoading({ |
|
|
|
uni.showLoading({ |
|
|
|
title: '加载中...' |
|
|
|
title: '加载中...' |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if (this.isNoMoreData) { |
|
|
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let pagenum = this.pageNum; |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
merchantId: item, |
|
|
|
merchantId: this.showCategoryIndexId, |
|
|
|
longitude: app.globalData.longitude, |
|
|
|
longitude: app.globalData.longitude, |
|
|
|
latitude: app.globalData.latitude |
|
|
|
latitude: app.globalData.latitude, |
|
|
|
|
|
|
|
pageNum: pagenum, |
|
|
|
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
getStoreListByMerchant(params).then(res => { |
|
|
|
getStoreListByMerchant(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.categoryList = res.return_data |
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; |
|
|
|
|
|
|
|
this.categoryList = this.categoryList.concat(res.return_data.list); |
|
|
|
|
|
|
|
if (res.return_data.total == (this.pageNum * this.pageSize)) { |
|
|
|
|
|
|
|
this.isNoMoreData = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.categoryList = []; |
|
|
|
this.categoryList = []; |
|
|
|
} |
|
|
|
} |
|
|
@ -275,7 +267,12 @@ |
|
|
|
showCategory(index, item) { |
|
|
|
showCategory(index, item) { |
|
|
|
this.showCategoryIndex = index; |
|
|
|
this.showCategoryIndex = index; |
|
|
|
this.$refs.popup.hide(); |
|
|
|
this.$refs.popup.hide(); |
|
|
|
this.getStoreListByMerchant(item); |
|
|
|
this.showCategoryIndexId = item; |
|
|
|
|
|
|
|
this.pageNum = 1; |
|
|
|
|
|
|
|
this.pageSize = 10; |
|
|
|
|
|
|
|
this.isNoMoreData = false; |
|
|
|
|
|
|
|
this.categoryList = []; |
|
|
|
|
|
|
|
this.getStoreListByMerchant(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
toCategory(e) { |
|
|
|
toCategory(e) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|