Share instances of scenarios where users run mini programs in mini programs

零下一度
Release: 2017-05-19 15:09:31
Original
2522 people have browsed it

Recently, the WeChat mini program team has been rolling out a series of new mini program functions and expanded the entrances to many mini programs, making the operation scenarios of mini programs more and more abundant. Therefore, different entry scenarios will inevitably bring different user needs. How can we optimize and enhance the experience of our mini program based on these different user scenarios?

Starting from the basic library API v1.1.0 of the mini program, Scene value This function was officially introduced. We can get the scene value in the App entry code of the mini program:

//在小程序的onLaunch和onShow方法参数中可获取场景值
App({
    onLaunch: function (options) {
        console.log("[onLaunch] 场景值:", options.scene)
    },
    onShow: function (options) {
        console.log("[onShow] 场景值:", options.scene)
    }
})
Copy after login

All scene values ​​currently supported are as follows:

1001    发现栏小程序主入口
1005    顶部搜索框的搜索结果页
1006    发现栏小程序主入口搜索框的搜索结果页
1007    单人聊天会话中的小程序消息卡片
1008    群聊会话中的小程序消息卡片
1011    扫描二维码
1012    长按图片识别二维码
1013    手机相册选取二维码
1014    小程序模版消息
1017    前往体验版的入口页
1019    微信钱包
1020    公众号 profile 页相关小程序列表
1022    聊天顶部置顶小程序入口
1023    安卓系统桌面图标
1024    小程序 profile 页
1025    扫描一维码
1028    我的卡包
1029    卡券详情页
1031    长按图片识别一维码
1032    手机相册选取一维码
1034    微信支付完成页
1035    公众号自定义菜单
1036    App 分享消息卡片
1042    添加好友搜索框的搜索结果页
1043    公众号模板消息
1044    群聊会话中的小程序消息卡片(带 shareTicket)
1047    扫描小程序码
1048    长按图片识别小程序码
1049    手机相册选取小程序码
Copy after login

For a simple example, if the scene value is 1001, then It means that the user runs your mini program directly from the mini program entrance on the "Discover" page at the bottom of WeChat:

Share instances of scenarios where users run mini programs in mini programs

Scenario 1001

For this scenario value data, I think it is very valuable information whether it is used to improve the targeted functions of the mini program or as a reference for precise market operations.

I hope this article will be helpful to everyone.

【Related recommendations】

1. Complete source code download of WeChat mini program

2. WeChat mini program game demo choose different colors Block

3. Chai Ge WeChat Mini Program App Store Source Code

The above is the detailed content of Share instances of scenarios where users run mini programs in mini programs. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template