解决方案:
给底层页面动态添加 position:fixed;
代码:
wxml:
<!-- 底部界面层 -->
<view style="{{isShowConfirm?'position:fixed;':''}}">
</view>
<!-- 弹出的输入电话号码的遮罩层 解决button穿透问题 -->
<block wx:if="{{isShowConfirm}}">
<view class='toast-box'>
<view class='toastbg'></view>
<view class='showToast'>
<view class='toast-title'>
<text>输入手机号码</text>
</view>
<view class='toast-main'>
<view class='toast-input'>
<input type='number' placeholder='输入网点联系人手机号码' bindinput='setValue' data-name='stuEidtName'></input>
</view>
</view>
<view class='toast-button'>
<view class='button1'>
<button catchtap='cancelbtn'>取消</button>
</view>
<view class='button2'>
<button data-url="../allOrder/allOrder" catchtap='confirmAcceptancebtn'>确定</button>
</view>
</view>
</view>
</view>
</block>
js:
- Page({
- data: {
- isShowConfirm:false
- },
- showShowConfirm(e) {
- //显示遮罩
- this.setData({
- isShowConfirm: true
- })
- },
- hideShowConfirm(e) {
- //隐藏遮罩
- this.setData({
- isShowConfirm: false
- })
- }
- })