思路:wxml定义模态框,为其添加wx:if="{ {showmodal }}"。js根据条件改变wx:if="{ {showmodal }}"中的值进行显示控制 效果图: .wxml: .wxss:(根据个人需求可进调整)