|
|
@ -5,7 +5,8 @@ |
|
|
|
<view class="header" :style="{position:headerPosition}"> |
|
|
|
<view class="header" :style="{position:headerPosition}"> |
|
|
|
<view class="addr" @click="goPostion"> |
|
|
|
<view class="addr" @click="goPostion"> |
|
|
|
<!-- <view class="icon location"></view> --> |
|
|
|
<!-- <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> |
|
|
|
<view class="input-box"> |
|
|
|
<view class="input-box"> |
|
|
|
<input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> |
|
|
|
<input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> |
|
|
@ -22,9 +23,46 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 占位 --> |
|
|
|
<!-- 占位 --> |
|
|
|
<view class="place"></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" |
|
|
|
<view class="row" v-for="(mers,index) in MerchantList" :key="mers.id" |
|
|
|
:class="[index==showCategoryIndex?'on':'']" @click="showCategory(index,mers.id)"> |
|
|
|
:class="[index==showCategoryIndex?'on':'']" @click="showCategory(index,mers.id)"> |
|
|
|
<view class="text"> |
|
|
|
<view class="text"> |
|
|
@ -33,13 +71,10 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</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="category"> |
|
|
|
<!-- <view class="banner"> |
|
|
|
|
|
|
|
<image src="/static/img/banner3.png"></image> |
|
|
|
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666"> |
|
|
|
<view v-if="categoryList == '' " class="mart60 fotct font14 fcor666"> |
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres1"></image> |
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -51,10 +86,17 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</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> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</wybPopup> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
@ -63,15 +105,22 @@ |
|
|
|
getStoreListByMerchant, |
|
|
|
getStoreListByMerchant, |
|
|
|
getMerchantList |
|
|
|
getMerchantList |
|
|
|
} from "../../../Utils/Api.js"; |
|
|
|
} from "../../../Utils/Api.js"; |
|
|
|
|
|
|
|
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; |
|
|
|
let app = getApp(); |
|
|
|
let app = getApp(); |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
|
|
|
|
components: { |
|
|
|
|
|
|
|
wybPopup |
|
|
|
|
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
showCategoryIndex: 0, |
|
|
|
showCategoryIndex: '', |
|
|
|
headerPosition: "fixed", |
|
|
|
headerPosition: "fixed", |
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
imgadres:'jt.png', |
|
|
|
imgadres: 'jt.png', |
|
|
|
imgadres1:'noorder.png', |
|
|
|
imgadres2: 'xiala.png', |
|
|
|
|
|
|
|
imgadres1: 'noorder.png', |
|
|
|
|
|
|
|
imgadres4: 'dh.png', |
|
|
|
|
|
|
|
imgadres3: 'noorder.png', |
|
|
|
city: "", |
|
|
|
city: "", |
|
|
|
imageUrl: app.globalData.imgUrl, |
|
|
|
imageUrl: app.globalData.imgUrl, |
|
|
|
//分类列表 |
|
|
|
//分类列表 |
|
|
@ -91,20 +140,23 @@ |
|
|
|
this.headerPosition = "absolute"; |
|
|
|
this.headerPosition = "absolute"; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() {}, |
|
|
|
}, |
|
|
|
|
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.categoryList = []; |
|
|
|
this.categoryList = []; |
|
|
|
this.MerchantList = []; |
|
|
|
this.MerchantList = []; |
|
|
|
if (app.globalData.cityName != '') { |
|
|
|
if (app.globalData.cityName != '') { |
|
|
|
this.city = app.globalData.cityName; |
|
|
|
this.city = app.globalData.cityName; |
|
|
|
this.getMerchantList(); |
|
|
|
this.getMerchantList(); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.postionIng(); |
|
|
|
this.postionIng(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
//显示弹出 |
|
|
|
|
|
|
|
showPopup() { |
|
|
|
|
|
|
|
this.$refs.popup.show(); |
|
|
|
|
|
|
|
}, |
|
|
|
postionIng() { |
|
|
|
postionIng() { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
uni.getLocation({ |
|
|
|
uni.getLocation({ |
|
|
@ -158,8 +210,9 @@ |
|
|
|
regionId: app.globalData.cityId |
|
|
|
regionId: app.globalData.cityId |
|
|
|
} |
|
|
|
} |
|
|
|
getMerchantList(params).then(res => { |
|
|
|
getMerchantList(params).then(res => { |
|
|
|
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.getStoreListByMerchant(res.return_data[0].id); |
|
|
|
this.getStoreListByMerchant(res.return_data[0].id); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -221,6 +274,7 @@ |
|
|
|
//分类切换显示 |
|
|
|
//分类切换显示 |
|
|
|
showCategory(index, item) { |
|
|
|
showCategory(index, item) { |
|
|
|
this.showCategoryIndex = index; |
|
|
|
this.showCategoryIndex = index; |
|
|
|
|
|
|
|
this.$refs.popup.hide(); |
|
|
|
this.getStoreListByMerchant(item); |
|
|
|
this.getStoreListByMerchant(item); |
|
|
|
}, |
|
|
|
}, |
|
|
|
toCategory(e) { |
|
|
|
toCategory(e) { |
|
|
@ -242,6 +296,10 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="scss"> |
|
|
|
<style lang="scss"> |
|
|
|
|
|
|
|
page { |
|
|
|
|
|
|
|
background-color: #f1f3f5; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.status { |
|
|
|
.status { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 0; |
|
|
|
height: 0; |
|
|
@ -258,6 +316,55 @@ |
|
|
|
border: none |
|
|
|
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 { |
|
|
|
.loading-text { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
@ -290,6 +397,7 @@ |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
font-size: 28upx; |
|
|
|
font-size: 28upx; |
|
|
|
|
|
|
|
|
|
|
|
.icon { |
|
|
|
.icon { |
|
|
|
height: 60upx; |
|
|
|
height: 60upx; |
|
|
|
margin-right: 5upx; |
|
|
|
margin-right: 5upx; |
|
|
@ -358,7 +466,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
.category-list { |
|
|
|
.category-list { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
|
|
.left, |
|
|
|
.left, |
|
|
|