2

扫码打开小程序关注公众号

 1 year ago
source link: https://www.daguanren.cc/post/scan_wxapp_wxaccount.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
10月04, 2018

扫码打开小程序关注公众号

9月20日,小程序新增公众号关注组件,用户线下扫码使用小程序时,可快捷关注公众号。

本文讲述如何配置“扫码打开小程序新增公众号关注组件”

1、首先在小程序后台打开公众号关注组件,选择需要配置的公众号,公众号和小程序必须为同一主体:

alt

2、在想要展示的小程序的页面代码中加入如下代码:

<official-account></official-account>
alt

3、通过以下特定场景进入小程序即可展示引导关注公众号的组件:

  • 当小程序从扫二维码场景(场景值1011)打开时
  • 当小程序从扫小程序码场景(场景值1047)打开时
  • 当小程序从聊天顶部场景(场景值1089)中的“最近使用”内打开时,若小程序之前未被销毁,则该组件保持上一次打开小程序时的状态
  • 当从其他小程序返回小程序(场景值1038)时,若小程序之前未被销毁,则该组件保持上一次打开小程序时的状态
alt
alt

本文链接:https://www.daguanren.cc/post/scan_wxapp_wxaccount.html

-- EOF --

作者 daguanren

发表于 2018-10-04 11:21:49

,添加在分类 技术分享

,并被添加「 公众号 小程序 小程序扫码 」标签

,最后修改于 2018-10-04 11:21:49

版权归本网站的作者所有,转载请注明出处,谢谢大家。 问题咨询和商务合作请发送邮件至[email protected]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK