lixuan #2

Merged
lixuan merged 3 commits from lixuan into master 2 years ago
  1. 7
      api/oil-site.js
  2. 7
      components/Empty.vue
  3. 37
      components/site-item/site-item.vue
  4. 191
      components/sl-filter/filter-view.vue
  5. 5
      components/sl-filter/sl-filter.vue
  6. 38
      pages/index/startPage/startPage.vue
  7. 4
      pages/tabbar/home/home.vue
  8. 228
      pages/tabbar/station/stationList.vue

@ -31,6 +31,13 @@ export default {
data: data data: data
}) })
}, },
getSiteLists(data) {
return request({
url: `/${service_name}/${group_name}/findBCSiteInfoByPage`,
method: 'post',
data: data
})
},
getSiteDetails(data) { getSiteDetails(data) {
return request({ return request({
url: `/${service_name}/${group_name}/getSiteDetails`, url: `/${service_name}/${group_name}/getSiteDetails`,

@ -4,7 +4,7 @@
<div class="img" :class="marginTopExtra?'margin-extra':''"> <div class="img" :class="marginTopExtra?'margin-extra':''">
<image :src="baseUrl+'empty.png'" mode="widthFix"></image> <image :src="baseUrl+'empty.png'" mode="widthFix"></image>
</div> </div>
<p>这里没有相关记录哦~</p> <p :style="{padding: contentTitle?'0 50px':''}">{{contentTitle?contentTitle:'这里没有相关记录哦~'}}</p>
</div> </div>
</template> </template>
<script> <script>
@ -14,11 +14,16 @@
marginTopExtra:{ marginTopExtra:{
type:Boolean, type:Boolean,
default: true default: true
},
contentTitle:{
type:String,
default:''
} }
}, },
data() { data() {
return { return {
baseUrl: this.global.imgURL baseUrl: this.global.imgURL
} }
} }

@ -1,5 +1,5 @@
<template> <template>
<view class="cu-item cur padding no-mr-border site-item"> <view class="cu-item cur padding no-mr-border site-item" :style="{height:siteItem.oilProductCodeAndPrices.length>3?'220rpx !important':listHeight?listHeight + 'rpx !important':''}">
<view class="cu-avatar radius lg " <view class="cu-avatar radius lg "
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'"> :style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
</view> </view>
@ -18,18 +18,26 @@
{{siteItem.address}} {{siteItem.address}}
</view> </view>
</view> </view>
<view class="text-gray flex"> <view class="text-gray flex" style="width: calc(100% + 30%);display: flex;flex-wrap: wrap;">
<view v-if="listHeight" class="youpin" style="" v-for="(item,index) in siteItem.oilProductCodeAndPrices">
<view class="text-bold yellow-oil text-xl padding-right-xs"> <view class="text-bold yellow-oil text-xl padding-right-xs">
{{item.oilProductCode}}
</view>
<view class="oil-main-color text-xl text-bold padding-right-xs" style="padding-right: 0;">
{{item.personalPrice|moneyFormat}}
</view>
</view>
<view v-if="!listHeight" class="text-bold yellow-oil text-xl padding-right-xs">
{{siteItem.oilProductCode}} {{siteItem.oilProductCode}}
</view> </view>
<view class="oil-main-color text-xl text-bold padding-right-xs"> <view v-if="!listHeight" class="oil-main-color text-xl text-bold padding-right-xs">
{{siteItem.sitePrice|moneyFormat}} {{siteItem.sitePrice|moneyFormat}}
</view> </view>
<view class=""> <view v-if="!listHeight" class="">
<text class="cu-tag oil-tag radius text-xs" <text class="cu-tag oil-tag radius text-xs"
v-if="siteItem.oilSitePrice - siteItem.sitePrice>0">{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}</text> v-if="siteItem.oilSitePrice - siteItem.sitePrice>0">{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}</text>
</view> </view>
<view class="text-cut padding-left-sm text-lg"> <view v-if="!listHeight" class="text-cut padding-left-sm text-lg">
<text class="text-delete color-333 text-sm padding-right-xs"> <text class="text-delete color-333 text-sm padding-right-xs">
{{siteItem.oilSitePrice|moneyFormat}}/L {{siteItem.oilSitePrice|moneyFormat}}/L
</text> </text>
@ -61,6 +69,10 @@
first: { first: {
type: Boolean, type: Boolean,
default: false default: false
},
listHeight:{
type:Number,
default:0
} }
}, },
data() { data() {
@ -76,7 +88,7 @@
filters: { filters: {
channelCodeFamt(value) { channelCodeFamt(value) {
console.log(value) console.log(value)
if (value == null) { if (!value) {
return '未知' return '未知'
// ( XOIL WJY LV TY YDJY) // ( XOIL WJY LV TY YDJY)
// switch (value) { // switch (value) {
@ -115,7 +127,7 @@
.site-item { .site-item {
margin-bottom: 1.8rem; margin-bottom: 1.8rem;
align-items: flex-start !important; align-items: flex-start !important;
height: 147rpx!important; height: 150rpx!important;
} }
.yellow-oil{ .yellow-oil{
@ -124,4 +136,15 @@
.cu-avatar{ .cu-avatar{
background-color: transparent !important; background-color: transparent !important;
} }
.youpin{
border: 1px solid #e4e4e4;
display: flex;
border-radius: 5px;
padding: 0 5px;
margin-right: 5px;
margin-bottom: 5px;
}
.text-xl{
font-size: 30rpx;
}
</style> </style>

@ -17,15 +17,49 @@
</view> </view>
<view class="filter-content-detail"> <view class="filter-content-detail">
<text v-for="(detailItem,idx) in selectDetailList" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}" <text v-for="(detailItem,idx) in selectDetailList" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap="itemTap(idx,selectDetailList,item.isMutiple,item.key)"> @tap="itemTap(idx,selectDetailList,item.isMutiple,item.key,detailItem,index)">
{{detailItem.title}} {{detailItem.title}}
</text> </text>
</view> </view>
<!-- <view class="" v-if="index==1" v-for="(detailItem,idx) in selectDetailList" :key="idx">
<view class="filter-content-title">
<text>{{detailItem}}</text>
</view>
<view class="filter-content-detail">
<text v-for="(itemss,idxx) in selectDetailList[detailItem]" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap="itemTap(idx,selectDetailList,item.isMutiple,item.key,detailItem)">
{{itemss.title}}
</text>
</view>
</view> -->
<view class="filter-content-detail" v-show="pickerShow">
<!-- 省市区选择 -->
<view class="region-box" v-if="index==0">
<picker-view disabled :value="region" @change="bindChange" ref="showHide">
<picker-view-column>
<view class="center" v-for="(item, index) in areaCodeList" :key="index">
{{ item.areaName }}
</view>
</picker-view-column>
<picker-view-column>
<view class="center" v-for="(item, index) in areaCodeList[areaIndex[0]].childList" :key="index">
{{ item.areaName }}
</view>
</picker-view-column>
<!-- <picker-view-column v-if="areaCodeList[areaIndex[0]]">
<view class="center"
v-for="(item, index) in areaCodeList[areaIndex[0]].childList[areaIndex[1]].childList" :key="index">
{{ item.areaName }}
</view>
</picker-view-column> -->
</picker-view>
</view>
</view>
<view class="filter-content-footer"> <view class="filter-content-footer">
<view class="filter-content-footer-item" style="color: #777777; background-color: #FFFFFF;" @tap="resetClick(selectDetailList,item.key)"> <view class="filter-content-footer-item" style="color: #777777; background-color: #FFFFFF;" @tap="resetClick(selectDetailList,item.key,index)">
<text>重置</text> <text>重置</text>
</view> </view>
<view class="filter-content-footer-item" :style="{'color': '#FFFFFF', 'background-color': themeColor}" @tap="sureClick"> <view class="filter-content-footer-item" :style="{'color': '#FFFFFF', 'background-color': themeColor}" @tap="sureClick(selectDetailList,item.key,index)">
<text>确定</text> <text>确定</text>
</view> </view>
</view> </view>
@ -40,11 +74,21 @@
export default { export default {
data() { data() {
return { return {
region:[],
selectArr: [], selectArr: [],
result: {}, result: {},
pickerShow:false,
menuIndex: 0, menuIndex: 0,
areaIndex:[0, 0],
paixu:1,
provinceCode:'',
oilCode:'',
showHide:true,
cityCode:'',
areaCode:'',
selectDetailList: [], selectDetailList: [],
independenceObj: {}, independenceObj: {},
areaCodeList:[],
selectedKey: '', selectedKey: '',
cacheSelectedObj: {}, cacheSelectedObj: {},
defaultSelectedTitleObj: {} defaultSelectedTitleObj: {}
@ -57,6 +101,12 @@
return '#D1372C' return '#D1372C'
} }
}, },
areaCodeList1: {
type: Array,
default () {
return []
}
},
menuList: { menuList: {
type: Array, type: Array,
default () { default () {
@ -68,6 +118,17 @@
default: false default: false
} }
}, },
created() {
setTimeout(()=>{
if(this.areaCodeList1.length == 0){
this.areaCodeList = uni.getStorageSync('areaCodeList')
}else{
this.areaCodeList = this.areaCodeList1
}
this.areaCodeList.unshift({areaName:'全部'})
},1000)
console.log('%c 子组件参数↓','font-size:30px;color:red')
},
computed: { computed: {
selectedTitleObj() { selectedTitleObj() {
let obj = {} let obj = {}
@ -91,6 +152,37 @@
} }
}, },
methods: { methods: {
//
bindChange(e,ccc) {
//
const val = e.detail.value
this.areaIndex = val
this.region = val
if(this.areaIndex[0] !== val[0]) {
// 0
this.areaIndex = [val[0], 0, 0]
} else if(this.areaIndex[1] !== val[1]) {
this.areaIndex[1] = val[1]
//
this.areaIndex = [val[0], val[1], 0]
} else {
this.areaIndex = e.detail.value;
}
if(!ccc){
// push
if(this.areaCodeList[val[0]].childList[0]&&this.areaCodeList[val[0]].childList[0].areaName != '全部'){
this.areaCodeList[val[0]].childList.unshift({areaName:'全部'})
}
this.provinceCode = this.areaCodeList[this.areaIndex[0]].id
this.cityCode = this.areaCodeList[this.areaIndex[0]].childList[this.areaIndex[1]].id
}
// if(this.areaCodeList[val[0]].childList[val[1]].childList[0].areaName != ''){
// this.areaCodeList[val[0]].childList[val[1]].childList.unshift({areaName:''})
// }
// this.areaCode = this.areaCodeList[this.areaIndex[0]].childList[this.areaIndex[1]].childList[this.areaIndex[2]].id
this.$emit('changeArea',e)
},
getSelectedObj() { getSelectedObj() {
let obj = {} let obj = {}
for (let i = 0; i < this.menuList.length; i++) { for (let i = 0; i < this.menuList.length; i++) {
@ -264,7 +356,7 @@
this.independenceObj[this.selectedKey] = ''; this.independenceObj[this.selectedKey] = '';
} }
}, },
itemTap(index, list, isMutiple, key) { itemTap(index, list, isMutiple, key,detailItem,indexs) {
if (isMutiple == true) { if (isMutiple == true) {
list[index].isSelected = !list[index].isSelected; list[index].isSelected = !list[index].isSelected;
if (index == 0) { if (index == 0) {
@ -323,6 +415,27 @@
} }
} }
} }
if(indexs==0){
if(detailItem.value==10){
this.detailItems = ''
this.pickerShow = true
}else{
this.detailItems = detailItem.value*1000
this.provinceCode = ''
this.cityCode = ''
this.areaCode = ''
this.pickerShow = false
this.region = []
}
}else{
this.pickerShow = false
}
if(indexs==1){
this.oilCode = detailItem.value
}
if(indexs==2){
this.paixu = detailItem.value
}
} }
// #ifdef H5 // #ifdef H5
this.$forceUpdate(); this.$forceUpdate();
@ -371,22 +484,84 @@
} }
this.$emit("confirm", obj); this.$emit("confirm", obj);
}, },
sureClick() { sureClick(selectDetailList,item,index) {
if(index == 1&&!this.oilCode){
this.menuList[2].detailList[0].isSelected = true
this.menuList[2].detailList[1].isSelected = false
this.paixu = 1
this.selectedTitleObj['comprehensiveSort'] = '距离优先'
}
if(index == 2&&!this.oilCode&&this.paixu==2){
uni.showToast({
title: '请先选择油品再价格排序',
icon: 'none'
})
this.itemTap(0, selectDetailList, false, item,selectDetailList[1],index)
this.paixu = 1
return
}
if(this.areaIndex[0] == 0){
this.provinceCode = ''
this.cityCode = ''
this.areaCode = ''
}
if(this.areaIndex[1] == 0){
this.cityCode = ''
this.areaCode = ''
}
if(this.areaIndex[2] == 0){
this.areaCode = ''
}
let obj = { let obj = {
'result': this.result, 'result': this.result,
'titles': this.selectedTitleObj, 'titles': this.selectedTitleObj,
'isReset': false 'isReset': false
} }
obj.result.provinceCode = this.provinceCode
obj.result.cityCode = this.cityCode
obj.result.areaCode = this.areaCode
obj.result.distance = this.provinceCode?'':this.cityCode?'':this.areaCode?'':this.detailItems
obj.result.comprehensiveSort = this.paixu
this.$emit("confirm", obj); this.$emit("confirm", obj);
}, },
resetClick(list, key) { resetClick(list, key,index) {
this.resetSelected(list, key) this.resetSelected(list, key)
if(index == 1){
this.oilCode = ''
this.paixu = 1
}
if(index == 0){
this.provinceCode = ''
this.cityCode = ''
this.areaCode = ''
this.detailItems = ''
this.region = []
this.pickerShow = false
let aaa = {
detail:{
value:[0,0]
}
}
let ccc = 1
this.bindChange(aaa,ccc)
}
if(index == 2){
this.paixu = 1
}
} }
} }
} }
</script> </script>
<style> <style>
.region-box {
background-color: #FFFFFF;
}
.region-box .center {
display: flex;
justify-content: center;
align-items: center;
}
.filter-content { .filter-content {
background-color: #F6F7F8; background-color: #F6F7F8;
} }
@ -472,4 +647,8 @@
.filter-content-list-item-active:after { .filter-content-list-item-active:after {
content: '✓'; content: '✓';
} }
picker-view {
width: 100%;
height: 424upx;
}
</style> </style>

@ -226,6 +226,10 @@
} }
} }
} else { } else {
// if(this.titleList[this.selectedIndex].key.indexOf('oilProductCode') !=-1 && this.titleList[this.selectedIndex].title.indexOf('') != -1){
// this.titleList[this.selectedIndex+1].title = ''
// console.log(this.titleList[this.selectedIndex].key,this.titleList[this.selectedIndex].title,'spppppppppppp')
// }
for (let key in titlesObj) { for (let key in titlesObj) {
if (!Array.isArray(titlesObj[key])) { if (!Array.isArray(titlesObj[key])) {
this.tempTitleObj[key] = titlesObj[key]; this.tempTitleObj[key] = titlesObj[key];
@ -240,7 +244,6 @@
} }
} }
} }
this.$refs.popupRef.close() this.$refs.popupRef.close()
if (obj.isReset) { if (obj.isReset) {

@ -59,6 +59,19 @@
this.getFilterData() this.getFilterData()
} }
} }
// 广
let interstitialAd = null
// onLoad广
if (wx.createInterstitialAd) {
interstitialAd = wx.createInterstitialAd({
adUnitId: 'adunit-a7faf57adeed211f'
})
}
interstitialAd.onLoad((err) => {
console.log('onLoad event emit', err)
})
interstitialAd.onError((err) => {
setTimeout(() => { setTimeout(() => {
if (key == '在线') { if (key == '在线') {
uni.switchTab({ uni.switchTab({
@ -74,6 +87,31 @@
}) })
} }
}, 2000) }, 2000)
console.log('onError event emit', err)
})
// 广
if (interstitialAd) {
interstitialAd.show().catch((err) => {
console.error(err)
})
}
interstitialAd.onClose(res => {
setTimeout(() => {
if (key == '在线') {
uni.switchTab({
url: '/pages/tabbar/home/home',
fail: (err) => {
console.log(err)
}
// url:'/BagStation/orderDetail/orderDetail'
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, 2000)
})
}, },
onReady(option) { onReady(option) {
const updateManager = uni.getUpdateManager(); const updateManager = uni.getUpdateManager();

@ -137,6 +137,9 @@
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray"> <swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
<image :src="item.src" style="width: 100%;" mode="widthFix"></image> <image :src="item.src" style="width: 100%;" mode="widthFix"></image>
</swiper-item> </swiper-item>
<swiper-item>
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
</swiper-item>
</swiper> </swiper>
<!-- <image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image> --> <!-- <image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image> -->
</view> </view>
@ -310,6 +313,7 @@
onLoad() { onLoad() {
this.reverseGeocoder(this.location) this.reverseGeocoder(this.location)
this.refreshLocation() this.refreshLocation()
// if (!uni.getStorageSync('filterData')) { // if (!uni.getStorageSync('filterData')) {
// this.getFilterData() // this.getFilterData()
// } // }

@ -1,5 +1,5 @@
<template> <template>
<view class="my-bg"> <view class="my-bg" style="display: flex;flex-direction: column;height: 100vh;">
<cu-custom class="main-totextbar bg-main-oil" bgColor="bg-main-oil"> <cu-custom class="main-totextbar bg-main-oil" bgColor="bg-main-oil">
<block slot="content">附近油站</block> <block slot="content">附近油站</block>
</cu-custom> </cu-custom>
@ -17,7 +17,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="placeholder-hidden"> <!-- <view class="placeholder-hidden">
<view class="cu-bar search bg-white"> <view class="cu-bar search bg-white">
<view class="search-form round"> <view class="search-form round">
<text class="cuIcon-search"></text> <text class="cuIcon-search"></text>
@ -29,14 +29,15 @@
src="https://www.51xingka.net/LSMOIL/static/img/gas-station.png" mode=""></image> src="https://www.51xingka.net/LSMOIL/static/img/gas-station.png" mode=""></image>
</view> </view>
</view> </view>
</view> </view> -->
<!-- 筛选开始 --> <!-- 筛选开始 -->
<scroll-view class="screentop bg-white"> <scroll-view class="screentop bg-white" style="flex: 1;">
<view class=""> <view class="">
<sl-filter reflexTitle ref="slFilter" @result="filterRes" :menuList="menuList"></sl-filter> <sl-filter reflexTitle ref="slFilter" :productCodeList="productCodeList" :areaCodeList="areaCodeList" @result="filterRes" :menuList="menuList"></sl-filter>
<!-- <sl-filter reflexTitle ref="slFilter" @result="filterRes" :menuList="menuList"></sl-filter> -->
</view> </view>
<view class="bg-white min-height-50 padding-top" v-if="siteList.length>0"> <view class="bg-white min-height-50 padding-top" v-if="siteList.length>0">
<site-item v-for="(item,index) in siteList" :key="item.id" :site-item="item" :first="index==0" <site-item v-for="(item,index) in siteList" :key="item.id" :site-item="item" :first="index==0" :listHeight="listHeight"
class="cu-list menu-avatar cu-item" @tap="toDetail(item)"> class="cu-list menu-avatar cu-item" @tap="toDetail(item)">
</site-item> </site-item>
<view class="placeholder-hidden"> <view class="placeholder-hidden">
@ -45,7 +46,7 @@
</view> </view>
<view class="" v-else> <view class="" v-else>
<my-empty></my-empty> <my-empty :contentTitle="contentTitle"></my-empty>
</view> </view>
</scroll-view> </scroll-view>
@ -68,39 +69,166 @@
data() { data() {
return { return {
filterData: { filterData: {
oilProductCode: '0#' // oilProductCode: '0#'
}, },
contentTitle:'您当前位置附近没有油站,可以点击左上角-距离-选择其他省市进行查看。',
loadStatus: 'load', loadStatus: 'load',
listHeight:160,
areaCodeList:[],
siteName: '', siteName: '',
menuList: uni.getStorageSync('filterData') ? uni.getStorageSync('filterData') : [{ menuList:[
title: '渠道', {
title: '距离',
isMutiple: false, isMutiple: false,
key: 'channelCode', key: 'distance',
detailList: [{ detailList: [
{
title: "全部", title: "全部",
value: "" value: ''
}] },
{
title: "20Km",
value: 20
},
{
title: "30Km",
value: 30
},
{
title: "50Km",
value: 50
},
{
title: "省市",
value: 10
}
]
}, },
{ {
title: '0#轻柴油', title: '油',
key: 'oilProductCode', key: 'oilProductCode',
isMutiple: false, isMutiple: false,
detailList: [{ detailList: [{
title: "全部", title: "全部",
value: "" value: ""
},
{
title: "0#",
value: "0#"
},
{
title: "-10#",
value: "-10#"
},
{
title: "-20#",
value: "-20#"
},
{
title: "-35#",
value: "-35#"
},
{
title: "LNG",
value: "LNG"
}] }]
}, },
// {
// title: '',
// key: 'oilProductCode',
// isMutiple: false,
// detailList: {:[{
// title: "",
// value: ""
// }],
// :[{
// title: "0#",
// value: "0#"
// },
// {
// title: "-10#",
// value: "-10#"
// },
// {
// title: "-20#",
// value: "-20#"
// },
// {
// title: "-35#",
// value: "-35#"
// }],
// :[{
// title: "LNG",
// value: "LNG"
// }]}
// },
{ {
title: '品牌', title: '距离优先',
key: 'siteBrand',
isSort: true,
isMutiple: false, isMutiple: false,
key: 'comprehensiveSort',
detailList: [{ detailList: [{
title: "全部", title: "距离优先",
value: "" value: 1
}] },
{
title: "价格优先",
value: 2
} }
]
},
], ],
// menuList: uni.getStorageSync('filterData') ? uni.getStorageSync('filterData') : [
// {
// title: '',
// isMutiple: false,
// key: 'channelCode',
// detailList: [{
// title: "",
// value: ""
// }]
// },
// {
// title: '',
// isMutiple: false,
// key: 'distance',
// detailList: [{
// title: "",
// value: 20
// },
// {
// title: "20Km",
// value: 20
// },
// {
// title: "30Km",
// value: 30
// },
// {
// title: "50Km",
// value: 50
// }
// ]
// },
// {
// title: '0#',
// key: 'oilProductCode',
// isMutiple: false,
// detailList: [{
// title: "",
// value: ""
// }]
// },
// {
// title: '',
// key: 'siteBrand',
// isSort: true,
// isMutiple: false,
// detailList: [{
// title: "",
// value: ""
// }]
// }
// ],
siteList: [], siteList: [],
InputBottom: 0, InputBottom: 0,
show: false, show: false,
@ -155,7 +283,6 @@
methods: { methods: {
filterRes(val) { filterRes(val) {
this.filterData = val this.filterData = val
console.log(val)
this.currentPage = 1 this.currentPage = 1
this.siteList = [] this.siteList = []
this.getSiteList() this.getSiteList()
@ -163,24 +290,33 @@
getFilterData() { getFilterData() {
oilSiteApi.getCheckInfo().then(res => { oilSiteApi.getCheckInfo().then(res => {
if (res.code == 20000) { if (res.code == 20000) {
res.data.channelCodes.map(item => { uni.setStorageSync('productCodeList', res.data.productCodeList)
this.menuList[0].detailList.push({ uni.setStorageSync('areaCodeList', res.data.areaCodeList)
title: item.name, this.areaCodeList = uni.getStorageSync('areaCodeList')
value: item.id if(uni.getStorageSync('areaCodeList')){
}) this.areaCodeList = uni.getStorageSync('areaCodeList')
}) }else{
res.data.productCodes.map(item => { this.areaCodeList = res.data.areaCodeList
this.menuList[1].detailList.push({ }
title: item.name, // this.productCodeList = uni.getStorageSync('productCodeList')
value: item.id // res.data.channelCodes.map(item => {
}) // this.menuList[0].detailList.push({
}) // title: item.name,
res.data.siteBrands.map(item => { // value: item.id
this.menuList[2].detailList.push({ // })
title: item.name, // })
value: item.id // res.data.productCodes.map(item => {
}) // this.menuList[1].detailList.push({
}) // title: item.name,
// value: item.id
// })
// })
// res.data.siteBrands.map(item => {
// this.menuList[2].detailList.push({
// title: item.name,
// value: item.id
// })
// })
// // console.log(channelCodes, productCodes, siteBrands) // // console.log(channelCodes, productCodes, siteBrands)
// this.$refs.slFilter.resetMenuList(this.menuList) // this.$refs.slFilter.resetMenuList(this.menuList)
@ -215,7 +351,12 @@
channelCode: this.siteName ? '' : this.filterData channelCode: this.siteName ? '' : this.filterData
.channelCode, // // ( OIL WJY LV TY YDJY) .channelCode, // // ( OIL WJY LV TY YDJY)
oilProductCode: this.siteName ? '' : this.filterData oilProductCode: this.siteName ? '' : this.filterData
.oilProductCode // 备注:// 油号选择 ( 0# 92# 92#) .oilProductCode, // // ( 0# 92# 92#)
provinceCode:this.filterData.provinceCode,
cityCode:this.filterData.cityCode,
areaCode:this.filterData.areaCode,
distance:this.filterData.distance,
comprehensiveSort:this.filterData.comprehensiveSort?this.filterData.comprehensiveSort:1
} }
} }
@ -232,7 +373,7 @@
} }
}) })
} else { } else {
oilSiteApi.getSiteList(data1).then(res => { oilSiteApi.getSiteLists(data1).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.siteList = this.siteList.concat(res.data.list) this.siteList = this.siteList.concat(res.data.list)
if (res.data.list.length < 10) { // if (res.data.list.length < 10) { //
@ -326,12 +467,13 @@
.placeholder-hidden { .placeholder-hidden {
/* min-height: 95upx; */ /* min-height: 95upx; */
opacity: 0;
} }
.fixed-top-site { .fixed-top-site {
/* top: 120rpx; */ /* top: 120rpx; */
z-index: 4; z-index: 4;
position: fixed; /* position: fixed; */
width: 750upx; width: 750upx;
} }

Loading…
Cancel
Save