小程序-视频号显示

小程序-视频号显示

在小程序展示视频号的卡片,点击查看就会跳转到视频号:

      <view  bindtap="bindtapShipin">查看 </view>

 

  bindtapShipin: function (e) {wx.openChannelsUserProfile({finderUserName: 'sphMv2jXan3ymp1',})},

 

 

如果已经有公众号,则直接显示公众号的卡片

 <official-account></official-account> // 页面展示公众号
  bindtapGongzhonghao: function (e) {wx.navigateToMiniProgram({appId: '',path: 'pages/home/index',extraData: {foo: 'bar'},envVersion: 'release',success(res) {// debugger
      },fail(error) {// debugger
      }});},