canIUse,急
发布于 6 年前 作者 jing13 10931 次浏览 来自 问答
  • index.js

canIUse: wx.canIUse(‘button.open-type.getUserInfo’),

- index.wxml

<button wx:if="{{canIUse}}" open-type=“getUserInfo” bindgetuserinfo=“userInfoHandler”>

</button>

<view wx:else>请升级微信版本</view>

一般手机都是进if为真的情况,,而iphone6s 部分手机  进入  wx:else 分支,,有可能是什么问题

2 回复

getUserInfo是1.3.0开始支持,请确认手机版本是否正确

多个VIEW 试下

回到顶部