|
|
|
@ -5,7 +5,8 @@ |
|
|
|
|
<view class="header" :style="{position:headerPosition}"> |
|
|
|
|
<view class="addr" @click="goPostion"> |
|
|
|
|
<!-- <view class="icon location"></view> --> |
|
|
|
|
{{city}}<image mode="widthFix" style="width: 15px;" :src="imagewxUrl+imgadres"></image> |
|
|
|
|
{{city}} |
|
|
|
|
<image mode="widthFix" style="width: 15px;" :src="imagewxUrl+imgadres"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="input-box"> |
|
|
|
|
<input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> |
|
|
|
@ -22,9 +23,46 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 占位 --> |
|
|
|
|
<view class="place"></view> |
|
|
|
|
<view class="category-list"> |
|
|
|
|
<!-- <view class="category-list"> --> |
|
|
|
|
<view class="width100 height45l backcorfff" v-if="MerchantList != ''"> |
|
|
|
|
<view class="width90"> |
|
|
|
|
<view class="stuMenu flleft fotct" @click="showPopup() ">{{showCategoryIndex}} |
|
|
|
|
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="stuMenu flleft fotct" @click="showPopup(2)">{{showCategoryIndex}} |
|
|
|
|
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="stuMenu flleft fotct" @click="showPopup(3)">{{showCategoryIndex}} |
|
|
|
|
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666 fotct width100"> |
|
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width96 height100p backcorfff border-r mart10" v-for="(box,i) in categoryList" :key="i"> |
|
|
|
|
<image mode="widthFix" :src="imageUrl+box.ext1" class="recontleft flleft mart10 border-r" |
|
|
|
|
style="max-height: 80px;" @click="toCategory(box)"> |
|
|
|
|
</image> |
|
|
|
|
<view class="recontright"> |
|
|
|
|
<view class="text2 width100 font18 fontwig6 paddtop15" @click="toCategory(box)"> |
|
|
|
|
{{box.storeName}} |
|
|
|
|
</view> |
|
|
|
|
<view class="width100 mart10 height22"> |
|
|
|
|
<view class="width70 flleft text1 font13 fcor999" @click="toCategory(box)"> |
|
|
|
|
{{box.address}} |
|
|
|
|
</view> |
|
|
|
|
<view class="width30 flright font13 fcor666 fotct" @click="seeloaction(item)"> |
|
|
|
|
<image mode="widthFix" :src="imagewxUrl+imgadres4" style="width: 10px;"></image> |
|
|
|
|
{{box.distance}}km |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 左侧分类导航 --> |
|
|
|
|
<scroll-view scroll-y="true" class="left"> |
|
|
|
|
<!-- <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"> |
|
|
|
@ -33,13 +71,10 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</scroll-view> |
|
|
|
|
</scroll-view> --> |
|
|
|
|
<!-- 右侧子导航 --> |
|
|
|
|
<scroll-view scroll-y="true" class="right"> |
|
|
|
|
<!-- <scroll-view scroll-y="true" class="right"> |
|
|
|
|
<view class="category"> |
|
|
|
|
<!-- <view class="banner"> |
|
|
|
|
<image src="/static/img/banner3.png"></image> |
|
|
|
|
</view> --> |
|
|
|
|
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666"> |
|
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres1"></image> |
|
|
|
|
</view> |
|
|
|
@ -51,10 +86,17 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="loading-text" @click="getCouponList">{{ loadingText }}</view> --> |
|
|
|
|
</scroll-view> |
|
|
|
|
</scroll-view> --> |
|
|
|
|
<!-- </view> --> |
|
|
|
|
<wybPopup ref="popup" type="top" height="800" width="500" radius="6" :showCloseIcon="false"> |
|
|
|
|
<view class="fotct font18 fontwig6 fcor333 mart10 height30">筛选门店</view> |
|
|
|
|
<view class="mart15"> |
|
|
|
|
<view :class="item.merchantName == showCategoryIndex?'activeRefuel':'refuel'" |
|
|
|
|
v-for="(item,index) in MerchantList" :key="index" @click="showCategory(item.merchantName,item.id)"> |
|
|
|
|
{{item.merchantName}} |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</wybPopup> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
@ -63,15 +105,22 @@ |
|
|
|
|
getStoreListByMerchant, |
|
|
|
|
getMerchantList |
|
|
|
|
} from "../../../Utils/Api.js"; |
|
|
|
|
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; |
|
|
|
|
let app = getApp(); |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
wybPopup |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
showCategoryIndex: 0, |
|
|
|
|
showCategoryIndex: '', |
|
|
|
|
headerPosition: "fixed", |
|
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
|
imgadres: 'jt.png', |
|
|
|
|
imgadres2: 'xiala.png', |
|
|
|
|
imgadres1: 'noorder.png', |
|
|
|
|
imgadres4: 'dh.png', |
|
|
|
|
imgadres3: 'noorder.png', |
|
|
|
|
city: "", |
|
|
|
|
imageUrl: app.globalData.imgUrl, |
|
|
|
|
//分类列表 |
|
|
|
@ -91,8 +140,7 @@ |
|
|
|
|
this.headerPosition = "absolute"; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
}, |
|
|
|
|
onLoad() {}, |
|
|
|
|
onShow() { |
|
|
|
|
this.categoryList = []; |
|
|
|
|
this.MerchantList = []; |
|
|
|
@ -105,6 +153,10 @@ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//显示弹出 |
|
|
|
|
showPopup() { |
|
|
|
|
this.$refs.popup.show(); |
|
|
|
|
}, |
|
|
|
|
postionIng() { |
|
|
|
|
let that = this; |
|
|
|
|
uni.getLocation({ |
|
|
|
@ -160,6 +212,7 @@ |
|
|
|
|
getMerchantList(params).then(res => { |
|
|
|
|
if (res.return_code == '000000' && res.return_data != '') { |
|
|
|
|
this.MerchantList = res.return_data; |
|
|
|
|
this.showCategoryIndex = res.return_data[0].merchantName; |
|
|
|
|
this.getStoreListByMerchant(res.return_data[0].id); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
@ -221,6 +274,7 @@ |
|
|
|
|
//分类切换显示 |
|
|
|
|
showCategory(index, item) { |
|
|
|
|
this.showCategoryIndex = index; |
|
|
|
|
this.$refs.popup.hide(); |
|
|
|
|
this.getStoreListByMerchant(item); |
|
|
|
|
}, |
|
|
|
|
toCategory(e) { |
|
|
|
@ -242,6 +296,10 @@ |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss"> |
|
|
|
|
page { |
|
|
|
|
background-color: #f1f3f5; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.status { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 0; |
|
|
|
@ -258,6 +316,55 @@ |
|
|
|
|
border: none |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.recontleft { |
|
|
|
|
width: 80px; |
|
|
|
|
margin-left: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.recontright { |
|
|
|
|
margin-left: 100px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.refuel { |
|
|
|
|
padding: 6px 5px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
background-color: #f6f6f6; |
|
|
|
|
color: #666666; |
|
|
|
|
margin-left: 10px; |
|
|
|
|
margin-top: 15px; |
|
|
|
|
display: inline-block; |
|
|
|
|
font-size: 13px; |
|
|
|
|
width: 18%; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.activeRefuel { |
|
|
|
|
padding: 6px 5px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
border: 1px solid #089bf5; |
|
|
|
|
color: #089bf5; |
|
|
|
|
margin-left: 10px; |
|
|
|
|
margin-top: 15px; |
|
|
|
|
display: inline-block; |
|
|
|
|
font-size: 13px; |
|
|
|
|
width: 18%; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.stuMenu { |
|
|
|
|
width: 33.3%; |
|
|
|
|
height: 30px; |
|
|
|
|
line-height: 30px; |
|
|
|
|
font-size: 14px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
color: #333333; |
|
|
|
|
|
|
|
|
|
.stuimg { |
|
|
|
|
width: 10px; |
|
|
|
|
vertical-align: middle; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.loading-text { |
|
|
|
|
width: 100%; |
|
|
|
|
display: flex; |
|
|
|
@ -290,6 +397,7 @@ |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
font-size: 28upx; |
|
|
|
|
|
|
|
|
|
.icon { |
|
|
|
|
height: 60upx; |
|
|
|
|
margin-right: 5upx; |
|
|
|
@ -358,7 +466,6 @@ |
|
|
|
|
|
|
|
|
|
.category-list { |
|
|
|
|
width: 100%; |
|
|
|
|
background-color: #fff; |
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
.left, |
|
|
|
|