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

订单显示修改

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