开发者工具显示正常如图:
手机上按钮就不显示了:如图:
样式代码 wxml:
<view class="driver-btn" wx:if="{{userinfo.type==2}}">
<view class="trip-btn margin-right" wx:if='{{tripItem.driver_trips&&userinfo.openid==tripItem.driver_trips.openid}}' data-id='{{tripItem.id}}' data-index='{{index}}' data-status="0" catchtap="tapTrip" data-content="您确认拒绝接单吗?">拒绝接单</view>
<view class="trip-btn margin-right" catchtap="makePhoneCall" data-mobile="{{tripItem.user.actual_mobile}}">联系乘客</view>
<view class="trip-btn margin-right sure-btn" wx:if='{{tripItem.driver_trips&&userinfo.openid==tripItem.driver_trips.openid}}' data-id='{{tripItem.id}}' data-index='{{index}}' data-status="2" data-content="您确认接单?" catchtap="tapTrip">确认接单</view>
<view class="trip-btn margin-right sure-btn" wx:if='{{tripItem.status==2}}' data-id='{{tripItem.id}}' data-content="您确认已到达接客点?" data-status="5" data-openid="{{tripItem.meetopenid}}" catchtap="tapTrip">到达</view>
<view class="trip-btn margin-right sure-btn" wx:if='{{tripItem.status==5||tripItem.status==7}}' data-id='{{tripItem.id}}' data-content="您确认开始行程?" data-status="6" data-oldstatus='{{tripItem.status}}' data-openid="{{tripItem.meetopenid}}" catchtap="tapTrip">开始行程</view>
<view class="trip-btn margin-right sure-btn" wx:if='{{tripItem.status==6}}' data-id='{{tripItem.id}}' data-content="您确认暂停行程?" data-status="7" data-openid="{{tripItem.meetopenid}}" catchtap="tapTrip">暂停行程</view>
<view class="trip-btn margin-right sure-btn" wx:if='{{tripItem.status==6}}' data-id='{{tripItem.id}}' data-content="您确认结束该行程吗?" data-status="3" data-openid="{{tripItem.meetopenid}}" catchtap="tapTrip" data-url='/pages/endtrip/endtrip?tripid={{tripItem.id}}&isinput=true'>结束行程</view>
</view>
wxss:
.trip-btn{
display: flex;
align-items: center;
justify-content: center;
width:153rpx;
height:56rpx;
border:1px solid rgba(153,153,153,1);
border-radius:28rpx;
font-size:25rpx;
font-family:PingFang SC;
font-weight:500;
color:rgba(51,51,51,1);
}
.driver-btn{
width: 100%;
display: flex;
justify-content: flex-end;
padding-top:40rpx;
padding-bottom: 20rpx;
}
此代码于2021-6-15 号 出现问题
之前一直未出现该问题