中秋更新
This commit is contained in:
@@ -65,8 +65,8 @@
|
||||
Object.keys(this.selePrice).forEach((item,index)=>{
|
||||
if(this.selePrice[item]!==null){
|
||||
this.filterData.push({
|
||||
lable:item=='middlePrice'?'低于' + Number( this.selePrice.middlePrice).toFixed(2) :'最低价格',
|
||||
value:item=='middlePrice'? Number(this.selePrice.middlePrice).toFixed(2) : Number(this.selePrice.minPrice).toFixed(2)
|
||||
lable:item=='middlePrice'?'低于' + this.moneyIntercept(this.selePrice.middlePrice) :'最低价格',
|
||||
value:item=='middlePrice'? this.moneyIntercept(this.selePrice.middlePrice) : this.moneyIntercept(this.selePrice.minPrice)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
<template>
|
||||
<view @touchend='touchend' @touchmove='touchmove' @touchstart='onChange' style="display: flex;flex-direction: column;flex-wrap: wrap;z-index: 9999999999999999999999999 !important;" :style="{height:isShow.switchBar?`calc(${styles.height}rpx + ${styles.move}rpx )`: ` calc( ${styles.move}rpx + 150rpx)` }" :class="styles.open? 'serviceStation_body' :'seleServiceStation_body' ">
|
||||
<view @click="switchBar" class="switchBar"></view>
|
||||
<view @touchend='touchend' @touchmove='touchmove' @touchstart='onChange'
|
||||
style="display: flex;flex-direction: column;flex-wrap: wrap;z-index: 9999999999999999999999999 !important;"
|
||||
:style="{height:isShow.switchBar?`calc(${styles.height}rpx + ${styles.move}rpx )`: ` calc( ${styles.move}rpx + 150rpx)` }"
|
||||
:class="styles.open? 'serviceStation_body' :'seleServiceStation_body' ">
|
||||
<view @click="switchBar" class="switchBar"></view>
|
||||
<view style="flex: 1; overflow: hidden; width: 100%; ">
|
||||
<view style="" class="information">
|
||||
<view class="information_left">
|
||||
<image class="ser_img" :src="details.siteImages" mode="widthFix" ></image>
|
||||
<view style="width: calc(100% - 80rpx);display: flex; flex-direction: column;justify-content: space-between;" class="serviceStation_text black_color">
|
||||
<image class="ser_img" :src="details.siteImages" mode="widthFix"></image>
|
||||
<view
|
||||
style="width: calc(100% - 80rpx);display: flex; flex-direction: column;justify-content: space-between;"
|
||||
class="serviceStation_text black_color">
|
||||
<view class="ovf">{{details.siteName}}</view>
|
||||
<view style=" " class="ovf samall_text hui_color">{{details.address}}</view>
|
||||
</view>
|
||||
@@ -17,26 +22,34 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="oli_swiper">
|
||||
|
||||
<view class="oli_swiper">
|
||||
<view class="oli_swiper_title">
|
||||
<view :style="{borderBottom: seleIndex==index? '#FF6700 solid 3px':''}" @click="seletitle(index)" v-for="(item,index) in details.oilSiteChannelDetailsVos" class="oli_swiper_title_item">{{item.channelCode|channelCode}}</view>
|
||||
<view :style="{borderBottom: seleIndex==index? '#FF6700 solid 3px':''}" @click="seletitle(index)"
|
||||
v-for="(item,index) in details.oilSiteChannelDetailsVos" class="oli_swiper_title_item">
|
||||
{{item.channelCode|channelCode}}</view>
|
||||
<!-- <view :style="{transform:`translateX( calc(${seleIndex} * 100%) )`,width:`calc(100% / ${details.oilSiteChannelDetailsVos.length})`}" class="tiao"></view> -->
|
||||
</view>
|
||||
<swiper class="swiper" next-margin='480rpx' :duration="500">
|
||||
<swiper-item v-for="(item,index) in (details.oilSiteChannelDetailsVos[seleIndex].oilSitePriceDetailsVos==null?[]:details.oilSiteChannelDetailsVos[seleIndex].oilSitePriceDetailsVos)" :key='index'>
|
||||
<swiper-item
|
||||
v-for="(item,index) in (details.oilSiteChannelDetailsVos[seleIndex].oilSitePriceDetailsVos==null?[]:details.oilSiteChannelDetailsVos[seleIndex].oilSitePriceDetailsVos)"
|
||||
:key='index'>
|
||||
<view class="swiper-item">
|
||||
<view class="swiper-item_oliType bag_text black_color">{{item.oilProductCode}}</view>
|
||||
<view class="bag_text hu_color " style="text-align: start;">{{Number(item.sitePrice).toFixed(2)}}/L</view>
|
||||
<view class="bag_text hu_color " style="text-align: start;">
|
||||
{{moneyIntercept(item.sitePrice)}}/L
|
||||
</view>
|
||||
<view class="samall_text hui_color" style="text-align: end;text-decoration: line-through;">
|
||||
{{ Number(item.oilSitePrice).toFixed(2) }}/L</view>
|
||||
{{ moneyIntercept(item.oilSitePrice) }}/L
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="serviceStation_footer">
|
||||
<view @click="Navigation" style="background-color: #8B583E;" class="serviceStation_footer_butten">导航</view>
|
||||
<view @click="Navigation" style="background-color: #8B583E;" class="serviceStation_footer_butten">导航
|
||||
</view>
|
||||
<view @click="jump" style="background-color: #FF6700;" class="serviceStation_footer_butten">详情</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -47,15 +60,15 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
touchData:null,
|
||||
styles:{
|
||||
height:700,
|
||||
moveY:0,
|
||||
Y:0,
|
||||
move:0,
|
||||
open:false
|
||||
touchData: null,
|
||||
styles: {
|
||||
height: 700,
|
||||
moveY: 0,
|
||||
Y: 0,
|
||||
move: 0,
|
||||
open: false
|
||||
},
|
||||
seleIndex:0,
|
||||
seleIndex: 0,
|
||||
isShow: {
|
||||
switchBar: true
|
||||
}
|
||||
@@ -63,7 +76,7 @@
|
||||
},
|
||||
created() {
|
||||
console.log(this.details, '***');
|
||||
this.$emit('dragMap',this.details,false)
|
||||
this.$emit('dragMap', this.details, false)
|
||||
},
|
||||
mounted() {},
|
||||
props: {
|
||||
@@ -74,15 +87,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
filters:{
|
||||
channelCode(e){
|
||||
filters: {
|
||||
channelCode(e) {
|
||||
switch (e) {
|
||||
case 'XOIL':
|
||||
return '星油'
|
||||
case 'WJY':
|
||||
return '万金油'
|
||||
case 'LV':
|
||||
return '其他'
|
||||
return '其他'
|
||||
case 'TY':
|
||||
return '团油'
|
||||
case 'YDJY':
|
||||
@@ -90,20 +103,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
// 'isShow.switchBar':{
|
||||
// handler:function(n){
|
||||
// console.log(n,'***')
|
||||
// if(!n){
|
||||
// this.$emit('dragMap',this.details,false)
|
||||
// }else{
|
||||
// this.$emit('dragMap',this.details,true)
|
||||
// } ;
|
||||
// }
|
||||
// }
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
jump(){
|
||||
jump() {
|
||||
let obj = {
|
||||
siteId: this.details.id,
|
||||
// siteCode: this.details.siteCode,
|
||||
@@ -112,59 +114,59 @@
|
||||
latitude: this.details.latitude,
|
||||
}
|
||||
let itemS = JSON.stringify(obj)
|
||||
console.log(itemS,this.details,'************');
|
||||
console.log(itemS, this.details, '************');
|
||||
// return
|
||||
uni.navigateTo({
|
||||
url: `../stationDetail/stationDetail?item=${itemS}&&types=map`
|
||||
})
|
||||
},
|
||||
Navigation(){
|
||||
Navigation() {
|
||||
console.log('组件导航')
|
||||
this.$emit('openMapApp')
|
||||
},
|
||||
touchcancel(e){
|
||||
console.log(this.styles.yd,'touchcancel滑动距离')
|
||||
console.log(e,'touchcancel')
|
||||
touchcancel(e) {
|
||||
console.log(this.styles.yd, 'touchcancel滑动距离')
|
||||
console.log(e, 'touchcancel')
|
||||
},
|
||||
//监听鼠标滑动
|
||||
touchmove(e){
|
||||
if(this.isShow.switchBar&&this.styles.Y-e.changedTouches[0].clientY>0) return
|
||||
touchmove(e) {
|
||||
if (this.isShow.switchBar && this.styles.Y - e.changedTouches[0].clientY > 0) return
|
||||
this.styles.moveY = e.changedTouches[0].clientY;
|
||||
this.styles.move = this.styles.Y - this.styles.moveY;
|
||||
console.log(this.styles.moveY)
|
||||
},
|
||||
//开始滑动
|
||||
onChange(e){
|
||||
this.$emit('dragMap',this.details,false)
|
||||
onChange(e) {
|
||||
this.$emit('dragMap', this.details, false)
|
||||
// 这一行为记录滑动位置代码 this.styles.Y = e.changedTouches[0].clientY + this.styles.move;
|
||||
console.log('禁用');
|
||||
this.styles.open = true;
|
||||
this.styles.Y = e.changedTouches[0].clientY;
|
||||
console.log('onChange')
|
||||
console.log('禁用');
|
||||
this.styles.open = true;
|
||||
this.styles.Y = e.changedTouches[0].clientY;
|
||||
console.log('onChange')
|
||||
},
|
||||
// 滑动完成
|
||||
touchend(e){
|
||||
touchend(e) {
|
||||
this.styles.open = false;
|
||||
if(this.styles.move > 0){
|
||||
this.isShow.switchBar =true
|
||||
}else if(this.styles.move < 0) {
|
||||
if (this.styles.move > 0) {
|
||||
this.isShow.switchBar = true
|
||||
} else if (this.styles.move < 0) {
|
||||
this.isShow.switchBar = false
|
||||
}
|
||||
this.styles.move = 0;
|
||||
console.log('touchend')
|
||||
setTimeout(()=>{
|
||||
this.$emit('dragMap',this.details,true)
|
||||
},500)
|
||||
setTimeout(() => {
|
||||
this.$emit('dragMap', this.details, true)
|
||||
}, 500)
|
||||
},
|
||||
vtouchmove(e){
|
||||
this.styles.height -= 3 ;
|
||||
console.log(e,this.styles.height,'vtouchmove')
|
||||
vtouchmove(e) {
|
||||
this.styles.height -= 3;
|
||||
console.log(e, this.styles.height, 'vtouchmove')
|
||||
},
|
||||
seletitle(e){
|
||||
seletitle(e) {
|
||||
this.seleIndex = e
|
||||
},
|
||||
switchBar() {
|
||||
this.isShow.switchBar = ! this.isShow.switchBar
|
||||
this.isShow.switchBar = !this.isShow.switchBar
|
||||
console.log(this.isShow.switchBar)
|
||||
}
|
||||
}
|
||||
@@ -172,15 +174,18 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.an{
|
||||
.an {
|
||||
align-items: flex-end;
|
||||
}
|
||||
.flex{
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.ac{
|
||||
|
||||
.ac {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ser_img {
|
||||
width: 80rpx;
|
||||
/* height: 80rpx; */
|
||||
@@ -244,34 +249,37 @@
|
||||
.oli_swiper {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.oli_swiper_title_item{
|
||||
/* flex: 1; */
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
/* width: min-intrinsic; */
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.tiao{
|
||||
background-color: #FF6700;
|
||||
border-radius: 10px;
|
||||
height: 5rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transition: all .3s;
|
||||
transform: scaleX(100%);
|
||||
}
|
||||
|
||||
.oli_swiper_title_item {
|
||||
/* flex: 1; */
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
/* width: min-intrinsic; */
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.tiao {
|
||||
background-color: #FF6700;
|
||||
border-radius: 10px;
|
||||
height: 5rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transition: all .3s;
|
||||
transform: scaleX(100%);
|
||||
}
|
||||
|
||||
.oli_swiper_title {
|
||||
/*
|
||||
border-bottom: #FF6700 solid;
|
||||
width: max-content;
|
||||
margin: 0 auto;
|
||||
*/
|
||||
padding-bottom: 10rpx;
|
||||
margin-bottom: 40rpx;
|
||||
padding-bottom: 10rpx;
|
||||
margin-bottom: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap:20rpx;
|
||||
gap: 20rpx;
|
||||
flex-wrap: nowrap;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
@@ -333,7 +341,8 @@
|
||||
border-radius: 10px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.seleServiceStation_body{
|
||||
|
||||
.seleServiceStation_body {
|
||||
height: 700rpx;
|
||||
width: 750rpx;
|
||||
background: #FFFFFF;
|
||||
@@ -341,6 +350,7 @@
|
||||
padding: 16rpx;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.serviceStation_body {
|
||||
height: 700rpx;
|
||||
width: 750rpx;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<cover-image style="width: 150rpx;height: 78rpx;position: absolute;"
|
||||
:src="item.imgCustomCallout">
|
||||
</cover-image>
|
||||
<cover-view class="customCallout_text">{{Number(item.enterprisePrice).toFixed(2)}}</cover-view>
|
||||
<cover-view class="customCallout_text">{{moneyIntercept(item.enterprisePrice) }}</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</map>
|
||||
|
||||
Reference in New Issue
Block a user