Commit e1c26990c04b9785068648ae4e2676714120c414

Authored by vking
1 parent 0b7dcf6c

downapp tips

@@ -12,8 +12,21 @@ Component({ @@ -12,8 +12,21 @@ Component({
12 */ 12 */
13 data: { 13 data: {
14 hasDisplay:false, 14 hasDisplay:false,
  15 + hasShowTip:false,
  16 + },
  17 + attached: function() {
  18 + // 在组件实例进入页面节点树时执行
  19 + wx.getSystemInfo({
  20 + success:res=>{
  21 + console.log('wx.getSystemInfo',res)
  22 + if(res.platform=='ios' || "devtools"==res.platform){
  23 + this.setData({
  24 + hasShowTip:true,
  25 + })
  26 + }
  27 + }
  28 + })
15 }, 29 },
16 -  
17 /** 30 /**
18 * 组件的方法列表 31 * 组件的方法列表
19 */ 32 */
1 <!--components/reserve/app/down.wxml--> 1 <!--components/reserve/app/down.wxml-->
2 -<view bindtap="open"> 2 +<view bindtap="open" wx:if="{{hasShowTip}}">
3 <slot></slot> 3 <slot></slot>
4 </view> 4 </view>
5 <view class="mask flex-vc" wx:if="{{hasDisplay}}" > 5 <view class="mask flex-vc" wx:if="{{hasDisplay}}" >