You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
294 lines
7.0 KiB
294 lines
7.0 KiB
<template>
|
|
<view>
|
|
<view class="width100 backcorfff">
|
|
<image mode="widthFix" class=" flleft sear mart15" src="../../../static/img/btjy.png"></image>
|
|
<uSearchBar @confirm="search" @input="input"></uSearchBar>
|
|
</view>
|
|
<!-- <slFilter :independence="true" :color="titleColor" :themeColor="themeColor" :menuList.sync="menuList"
|
|
@result="result"></slFilter> -->
|
|
<view class="width100 height40 backcorfff">
|
|
<view class="width90">
|
|
<view class="stuMenu flleft fotct" @click="showPopup(1)">50km内<image mode="widthFix" class="stuimg margle"
|
|
src="../../../static/img/xiala.png"></image>
|
|
</view>
|
|
<view class="stuMenu flleft fotct">距离优先<image mode="widthFix" class="stuimg margle"
|
|
src="../../../static/img/xiala.png"></image>
|
|
</view>
|
|
<view class="stuMenu flleft fotct">92#<image mode="widthFix" class="stuimg margle"
|
|
src="../../../static/img/xiala.png"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="width90 height100p backcorfff border-r mart10" v-for="(item,index) in refuelList" :key="index"
|
|
@click="goDetails(item.store_key)">
|
|
<image mode="widthFix" :src="item.store_logo" class="recontleft flleft mart10 border-r"
|
|
style="max-height: 80px;">
|
|
</image>
|
|
<view class="recontright">
|
|
<view class="text1 width100 font15 fontwig6 paddtop10">{{item.store_name}}</view>
|
|
<view class="width100 mart10 height22">
|
|
<view class="width70 flleft text1 font13 fcor999">
|
|
{{item.address}}
|
|
</view>
|
|
<view class="width30 flright font13 fcor666 fotct">
|
|
<image mode="widthFix" src="../../../static/img/dh.png" style="width: 10px;"></image>1.9km
|
|
</view>
|
|
</view>
|
|
<view class="font14 width100 fcoreb5 mart5 height22">
|
|
<text class="font18 fontwig6">{{item.price_vip}}</text>起<text
|
|
class="fcor999 margle">油站价¥{{item.price_gun}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<wybPopup ref="popup" type="top" height="600" width="500" radius="6" :showCloseIcon="true">
|
|
<view class="fotct font18 fontwig6 fcor333 mart10 height30">选择油枪</view>
|
|
<view class="font15 fcor666 width90 mart10 height22">汽油油枪</view>
|
|
<view v-if="typeId == 2">
|
|
<view :class="item.gunNo == gunNo?'activeRefuel':'refuel'" v-for="(item,index) in gunnumber"
|
|
:key="index" @click="changeValue2(item)">
|
|
{{item.gunNo}}
|
|
</view>
|
|
</view>
|
|
</wybPopup>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getGasStoreList
|
|
} from '../../../Utils/Api.js';
|
|
import slFilter from '@/components/sl-filter/sl-filter.vue';
|
|
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
|
|
import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';
|
|
let app = getApp();
|
|
export default {
|
|
components: {
|
|
slFilter,
|
|
uSearchBar,
|
|
wybPopup
|
|
},
|
|
data() {
|
|
return {
|
|
themeColor: '#089bf5',
|
|
titleColor: '#666666',
|
|
filterResult: '',
|
|
menuList: [
|
|
// {
|
|
// 'title': '品牌',
|
|
// 'key': 'single',
|
|
// 'isMutiple': false,
|
|
// 'detailTitle': '请选择(单选)',
|
|
// 'reflexTitle': true,
|
|
// 'defaultSelectedIndex': 0,
|
|
// 'detailList': [{
|
|
// 'title': '全部品牌',
|
|
// 'value': ''
|
|
// }, {
|
|
// 'title': '中石化',
|
|
// 'value': '中石化'
|
|
// }, {
|
|
// 'title': '中石油',
|
|
// 'value': '中石油'
|
|
// }, {
|
|
// 'title': '亮牌',
|
|
// 'value': '亮牌'
|
|
// }, {
|
|
// 'title': '其他',
|
|
// 'value': '其他'
|
|
// },
|
|
|
|
// ]
|
|
|
|
// },
|
|
|
|
{
|
|
'title': '油号',
|
|
'key': 'single2',
|
|
'isMutiple': false,
|
|
'detailTitle': '',
|
|
'reflexTitle': true,
|
|
'defaultSelectedIndex': 0,
|
|
'detailList': [{
|
|
'title': '90#',
|
|
'value': ''
|
|
}, {
|
|
'title': '92#',
|
|
'value': '92#'
|
|
}, {
|
|
'title': '95#',
|
|
'value': '95#'
|
|
}, {
|
|
'title': '98#',
|
|
'value': '98#'
|
|
}, {
|
|
'title': '101#',
|
|
'value': '101#'
|
|
}, ]
|
|
},
|
|
{
|
|
'title': '距离',
|
|
'key': 'single3',
|
|
'isMutiple': false,
|
|
'detailTitle': '',
|
|
'reflexTitle': true,
|
|
'defaultSelectedIndex': 0,
|
|
'detailList': [{
|
|
'title': '6km内',
|
|
'value': ''
|
|
},
|
|
{
|
|
'title': '10km内',
|
|
'value': '10km内'
|
|
},
|
|
{
|
|
'title': '15km内',
|
|
'value': '15km内'
|
|
},
|
|
{
|
|
'title': '20km内',
|
|
'value': '20km内'
|
|
},
|
|
{
|
|
'title': '50km内',
|
|
'value': '50km内'
|
|
}
|
|
]
|
|
}, {
|
|
'title': '距离',
|
|
'key': 'single1',
|
|
'isMutiple': false,
|
|
'detailTitle': '',
|
|
'reflexTitle': true,
|
|
'defaultSelectedIndex': 0,
|
|
'detailList': [{
|
|
'title': '距离最近',
|
|
'value': ''
|
|
}]
|
|
|
|
}
|
|
],
|
|
refuelList: [],
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
isNoMoreData: false,
|
|
searname: ''
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getGasStoreList();
|
|
},
|
|
onReachBottom() {
|
|
this.getGasStoreList();
|
|
},
|
|
methods: {
|
|
//显示弹出
|
|
showPopup(item) {
|
|
this.$refs.popup.show();
|
|
this.typeId = item;
|
|
},
|
|
search(res) {
|
|
uni.showToast({
|
|
title: '搜索:' + res.value,
|
|
icon: 'none'
|
|
})
|
|
},
|
|
input(res) {
|
|
this.searname = res;
|
|
this.pageNum = 1;
|
|
this.isNoMoreData = false;
|
|
this.refuelList = [];
|
|
this.getGasStoreList();
|
|
},
|
|
//查询列表
|
|
getGasStoreList() {
|
|
uni.showLoading({
|
|
title: '加载中...'
|
|
})
|
|
if (this.isNoMoreData) {
|
|
uni.hideLoading()
|
|
return false;
|
|
}
|
|
let pagenum = this.pageNum;
|
|
let params = {
|
|
storeName: this.searname,
|
|
distance: '999',
|
|
regionId: '110000',
|
|
oilNoName: '92#',
|
|
latitude: app.globalData.latitude,
|
|
longitude: app.globalData.longitude,
|
|
pageNum: pagenum,
|
|
pageSize: this.pageSize
|
|
}
|
|
getGasStoreList(params).then(res => {
|
|
if (res.return_code == '000000') {
|
|
uni.hideLoading();
|
|
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
|
|
if (res.return_data.total == (this.pageNum * this.pageSize)) {
|
|
this.isNoMoreData = true;
|
|
}
|
|
this.refuelList = this.refuelList.concat(res.return_data.list);
|
|
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
|
|
} else {
|
|
this.refuelList = [];
|
|
uni.hideLoading()
|
|
}
|
|
})
|
|
},
|
|
//跳转详情
|
|
goDetails(items) {
|
|
uni.navigateTo({
|
|
url: '../refuel-details/refuel-details?id=' + items
|
|
})
|
|
},
|
|
result(val) {
|
|
console.log('filter_result:' + JSON.stringify(val));
|
|
this.filterResult = JSON.stringify(val, null, 2)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
page {
|
|
background-color: #f6f6f6;
|
|
}
|
|
|
|
.stuMenu {
|
|
width: 33.3%;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
font-size: 14px;
|
|
color: #333333;
|
|
|
|
.stuimg {
|
|
width: 10px;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
.sear {
|
|
margin-left: 10px;
|
|
width: 50px;
|
|
}
|
|
|
|
.searImg {
|
|
margin-left: 55px;
|
|
}
|
|
|
|
.recontleft {
|
|
width: 80px;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.recontright {
|
|
margin-left: 95px;
|
|
}
|
|
|
|
.text {
|
|
margin-top: 50px;
|
|
margin-left: 20px;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
|