Commit 0933305d authored by 潘永坪's avatar 潘永坪

出租车页面bug修复

parent ac1ba620
<template>
<!-- 客服 -->
<u-popup v-model="showPop" mode="bottom" border-radius="14" closeable height="85%">
<u-popup v-model="showPop" mode="bottom" border-radius="14" closeable height="75%">
<view class="son-wrap">
<view class="title">
客服电话
......
This diff is collapsed.
......@@ -210,7 +210,7 @@ export default {
//---跳转产品页面
goProduct(merchantId){
uni.navigateTo({
url:'/pages/scenic/scenicChooseProduct/scenicChooseProduct?merchantId='+merchantId
url:'/pages/scenic/combinationProduct/combinationProduct?merchantId='+merchantId
})
},
//---加载数据
......@@ -226,7 +226,11 @@ export default {
//如果是点击进行搜索
data.search=this.searchData
}
uni.showLoading({
title: '加载中'
})
this.$request('scenic/user/merchant/findMerchantList', data).then(res => {
uni.hideLoading()
if (res.code == '00') {
this.scenicList=res.data.list||[]
this.scenicList.forEach((item, index) => {
......@@ -238,6 +242,8 @@ export default {
icon: 'none'
})
}
}).catch(err=>{
uni.hideLoading()
})
},
//---送券
......
<template>
<view class="wrap">
<scroll-view @scroll="scroll" style="height: 100%;" scroll-y>
<view class="banner">
<u-swiper :list="imgList" name="url" mode="number" height="360" indicator-pos="topRight"></u-swiper>
<u-swiper :list="imgList" name="url" mode="number" height="400" indicator-pos="topRight"></u-swiper>
</view>
<view class="middle">
<view class="tabbar">
<view class="tabbar" :style="tabbarObj">
<text v-for="(item, index) in tabbar" :key="index" @click="tabbarChange(index)" :class="{ on: active == index }">
{{ item }}
</text>
</view>
<swiper :current="active" @animationfinish="animationfinish" class="swiper-box">
<swiper :current="active" @animationfinish="animationfinish" class="swiper-box" :style="{ height: swiperHeight + 'px' }">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%; width: 100%">
<checkbox-group @change="checkboxChange">
<checkbox-group @change="checkboxChange" class="checkbox-box">
<view class="merchant" v-for="(item, index) in scenicList" :key="index">
<view class="merchant-title">
<view class="title-left">
......@@ -79,7 +79,6 @@
</view>
</checkbox-group>
<u-empty text="空空如也..." mode="list" v-if="scenicList.length == 0"></u-empty>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
......@@ -126,6 +125,7 @@
<!-- 模态框 -->
<u-modal v-model="showModal" @confirm="chooseConfirm" @cancel="chooseCancel" title="提示" content="该产品不支持多选" show-cancel-button="true">
</u-modal>
</scroll-view>
</view>
</template>
......@@ -154,7 +154,9 @@ export default {
chooseMerchantProduct: '', //不支持多产品购买时,选中的景区产品
groupId: '', //组合Id
groupChannelId: '', //组合渠道Id
channelType: 0 //渠道类型
channelType: 0, //渠道类型
swiperHeight: 0 ,//swiper高度
tabbarObj:''
}
},
watch: {
......@@ -237,6 +239,15 @@ export default {
}
},
methods: {
//---页面滚动事件
scroll(e) {
if(e.detail.scrollTop>200){
//固定导航栏
this.tabbarObj='top:0;position:fixed;border-radius:0'
}else{
this.tabbarObj='top:-40rpx;position:relative;border-radius:16rpx;'
}
},
//---导航栏切换
tabbarChange(index) {
this.active = index
......@@ -259,15 +270,29 @@ export default {
showDetail() {
this.$refs.detail.showPop = true
},
//计算第一个swiper高度
countSwiper1(){
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this)
query
.select('.checkbox-box')
.boundingClientRect(data => {
this.swiperHeight = data.height
})
.exec()
})
},
//---展示更多产品
showMoreProduct(item) {
item.productListCopy = item.productList
this.$forceUpdate()
this.countSwiper1()
},
//---收起产品
retractProduct(item) {
item.productListCopy = item.productList.slice(0, 2)
this.$forceUpdate()
this.countSwiper1()
},
//---多选框变化
checkboxChange(e) {
......@@ -337,11 +362,16 @@ export default {
let data = {
merchantId: this.merchantId, //商户id
openid: uni.getStorageSync('openid') || '',
channelType:this.channelType,//渠道类型
channelType: this.channelType, //渠道类型
latitude,
longitude
}
this.$request('/scenic/groupGood/getGroupProducts', data).then(res => {
uni.showLoading({
title: '加载中'
})
this.$request('/scenic/groupGood/getGroupProducts', data)
.then(res => {
uni.hideLoading()
if (res.code == '00') {
this.scenicList = res.data.merchantList || []
this.groupId = res.data.groupId || ''
......@@ -378,6 +408,9 @@ export default {
}
})
})
this.$nextTick(() => {
this.countSwiper1()
})
} else {
uni.showToast({
title: res.message,
......@@ -385,6 +418,9 @@ export default {
})
}
})
.catch(err => {
uni.hideLoading()
})
},
//---跳转填写订单页面
goFillorder() {
......@@ -421,7 +457,8 @@ export default {
let productIdList = this.chooseProduct.map(item => {
return item.id
})
let query ='?productIdList=' + JSON.stringify(productIdList) + '&groupId=' + this.groupId + '&groupChannelId=' + this.groupChannelId + '&orderSource=3'
let query =
'?productIdList=' + JSON.stringify(productIdList) + '&groupId=' + this.groupId + '&groupChannelId=' + this.groupChannelId + '&orderSource=3'
uni.navigateTo({
url: '/pages/combination/combiOrder/combiOrder' + query
})
......@@ -439,18 +476,27 @@ export default {
background: #fff;
}
.middle {
position: relative;
top: -40rpx;
padding: 0 24rpx 60rpx 24rpx;
padding: 0 24rpx 100rpx 24rpx;
display: flex;
flex-direction: column;
flex: 1;
// flex: 1;
background: #f7f7f7;
}
.swiper-box {
flex: 1;
// flex: 1;
position: relative;
top: -40rpx;
}
.tabbar {
transition:1s;
width: 100%;
left: 0;
z-index: 1;
position: relative;
top: -40rpx;
background: #fff;
box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.08);
border-radius: 16rpx;
display: flex;
justify-content: space-between;
......@@ -458,6 +504,8 @@ export default {
text {
padding: 24rpx 32rpx 24rpx 20rpx;
border-radius: 16rpx;
width: 33.3%;
text-align: center;
}
}
.tabbar .on {
......@@ -470,12 +518,18 @@ export default {
.merchant {
border-radius: 16rpx;
background: #ffffff;
box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.08);
margin-top: 24rpx;
padding: 24rpx;
}
.merchant label.off .product {
background: #f3f3f3;
color: #999999;
}
.merchant label.off .product-name {
color: #999999;
}
.merchant label.off .product-rule {
color: #999999;
}
.merchant-title {
display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment