Commit 0cc9bf89 authored by 潘永坪's avatar 潘永坪

订单显示修改

parent 152a5b2e
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<view class="merchant-name"> <view class="merchant-name">
{{currentMerchant.name}} {{currentMerchant.name}}
</view> </view>
<view class="merchant-info-bottom"> <view class="merchant-info-bottom" :style="xxx">
<view class="merchant-bottom-left"> <view class="merchant-bottom-left">
<view> <view>
<text v-if="showBusiness" style="color: #00B42B;">营业中</text> <text v-if="showBusiness" style="color: #00B42B;">营业中</text>
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
infoHeight:0,//middle-info盒子高度 infoHeight:0,//middle-info盒子高度
scrlllHeight:0,//中间盒子滚动时的高度 scrlllHeight:0,//中间盒子滚动时的高度
originHeight:0,//中间盒子原本高度 originHeight:0,//中间盒子原本高度
xxx:''
} }
}, },
watch: { watch: {
...@@ -548,13 +548,15 @@ export default { ...@@ -548,13 +548,15 @@ export default {
if(e.detail.scrollTop>height){ if(e.detail.scrollTop>height){
//商家信息固定,中间可滚动,全屏不滚动 //商家信息固定,中间可滚动,全屏不滚动
this.middleInfoStyle='top:0;position:fixed;' this.middleInfoStyle='top:0;position:fixed;'
this.middleBottomStyle=`margin-top:${this.infoHeight}px` this.middleBottomStyle='margin-top:40px'
this.middleHeight=this.scrlllHeight this.middleHeight=this.scrlllHeight
this.xxx='display:none'
}else{ }else{
//商家不固定,中间不可滚动,全屏滚动 //商家不固定,中间不可滚动,全屏滚动
this.middleInfoStyle='position:relative;' this.middleInfoStyle='position:relative;'
this.middleBottomStyle='margin-top:0' this.middleBottomStyle='margin-top:0'
this.middleHeight=this.originHeight this.middleHeight=this.originHeight
this.xxx='display:flex;'
} }
} }
}).exec() }).exec()
...@@ -565,21 +567,28 @@ export default { ...@@ -565,21 +567,28 @@ export default {
scrollRight(e) { scrollRight(e) {
setTimeout(()=>{ setTimeout(()=>{
let scrollTop=e.detail.scrollTop let scrollTop=e.detail.scrollTop
// if(scrollTop==0){
// //当滑到顶部时,上面固定元素还原
// this.middleInfoStyle='position:relative;'
// this.middleBottomStyle='margin-top:0'
// this.middleHeight=3000
// }
//通过滚动值获取下标 //通过滚动值获取下标
this.heightArr.forEach((item,i)=>{ this.heightArr.forEach((item,i)=>{
if(i==0){ if(i==0){
if(0<=scrollTop&&scrollTop<item){ if(0<=scrollTop&&scrollTop<item){
this.merchantIndex=i this.merchantIndex=i
this.toViewLeft='merchant-tab'+i this.toViewLeft='merchant-tab'+i
} }
}else{ }else{
if(this.heightArr[i-1]<=scrollTop&&scrollTop<item){ if(this.heightArr[i-1]<=scrollTop&&scrollTop<item){
this.merchantIndex=i this.merchantIndex=i
this.toViewLeft='merchant-tab'+i this.toViewLeft='merchant-tab'+i
} }
} }
}) })
},5) },5)
}, },
//---导航 //---导航
navigation(merchant){ navigation(merchant){
...@@ -769,9 +778,12 @@ export default { ...@@ -769,9 +778,12 @@ export default {
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
padding: 12rpx 20rpx 20rpx 20rpx; padding: 6px 10rpx 10px 10px;
z-index: 1; z-index: 1;
transition: 0.6s; transition-property: all;
transition-duration: 1s;
transition-timing-function: ease;
transition-delay: 0s;
} }
.merchant-name{ .merchant-name{
font-size: 36rpx; font-size: 36rpx;
...@@ -842,6 +854,7 @@ export default { ...@@ -842,6 +854,7 @@ export default {
background: #ffffff; background: #ffffff;
border-radius: 0 20rpx 20rpx 0; border-radius: 0 20rpx 20rpx 0;
text-align: center; text-align: center;
min-height: 100%;
} }
.merchant-tab{ .merchant-tab{
padding: 32rpx 16rpx; padding: 32rpx 16rpx;
......
...@@ -188,7 +188,8 @@ export default { ...@@ -188,7 +188,8 @@ export default {
this.errorMessage1 = res.data.errorMessage this.errorMessage1 = res.data.errorMessage
this.totalMoney = res.data.totalMoney this.totalMoney = res.data.totalMoney
this.orderList = res.data.orderList||[] this.orderList = res.data.orderList||[]
if (this.orderList.length==0) { if (this.orderList.length==0||res.data.orderPageShowFlag==0) {
this.orderList=[]
this.orderList.push({ this.orderList.push({
merchantName:res.data.merchantName, merchantName:res.data.merchantName,
productName:res.data.productName, productName:res.data.productName,
......
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