想做一个表白的小程序,但时间有限,所以想到了内嵌网页的方式,根据自己左思右想之后决定去百度找找办法 最后经过自己大脑360度高速急转弯之后,将网页内嵌了进去

代码


<block wx:if="{{canIUseOpenData}}">
  <view class="userinfo-avatar" bindtap="bindViewTap">
    <open-data type="userAvatarUrl"></open-data>
  </view>
  <open-data type="userNickName"></open-data>
</block>
<block wx:elif="{{!hasUserInfo}}">
  <button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
  <button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
  <view wx:else> 请使用1.4.4及以上版本基础库 </view>
</block>
<block wx:else>
  <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
  <text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>


<text class="user-motto">{{motto}}</text>


然后去后台添加业务域名,但是我个人注册的小程序找不到业务域名入口,最后去官网找了一下view内嵌网页的文档发现,我是傻逼,个人小程序不支持内嵌网页,但是我记得之前自己就有搞过呀,真的很奇怪,不过由于最近忙支教的事情,就没过多研究了,人都搞麻