Deeplink

定义规范

标题对应Controller 或者Activity

描述信息请写清楚这个模块的功能

最后附上开始支持的版本以及link样式

具体列子请看第一个deeplink

提交改动时请assign给 @gsun @zzhu

主页

主页

xhsdiscover://home

主页 -> 关注 Tab version: 5.8

xhsdiscover://home/follow

主页 -> 发现 Tab version: 5.8

xhsdiscover://home/explore

主页 -> 购买 Tab version: 5.8

xhsdiscover://home/store

笔记

图文笔记 version: 3.2

xhsdiscover://item/<note_id>
xhsdiscover://item/discovery.<note_id>
paramstypedefaultrequireddescplatform
withoutAnimationboolfalsefalse跳转时是否需要动画效果iOS
typestringnormalfalse笔记类型 enum: normal -> 图文笔记 vedio -> 视频笔记 multi -> 长笔记
commentboolfalsefalse是否需要自动定位到笔记评论iOS
targetint0false1:打开笔详时自动定位到笔记评论;2:定位到评论,并弹出键盘
(3个版本后移除,使用comment参数替代)
Android
sourcestringnullfalse来源信息打点用
pic_indexint0false指定显示第几张图片
namestringnullfalse指定导航栏的标题iOS
sourceIDstringnullfalse指定跳转的来源iOS
singleboolfalsefalse指定是否展示相关笔记iOS
firstExpandedboolfalsefalse指定首篇笔记是否默认展开正文iOS

视频笔记 version: 5.0

xhsdiscover://video_feed/<note_id>
xhsdiscover://video_feed/discovery.<note_id>
paramstypedefaultrequireddescplatform
sourceIDstringnullfalse来源信息打点用,目前新视频 Feed 页只支持 explorenearbysearchiOS

Guang视频笔记

xhsdiscover://guang/<note_id>
xhsdiscover://guang/discovery.<note_id>
paramstypedefaultrequireddescplatform
sourceIDstringnullfalse来源信息打点用,目前新视频 Feed 页只支持 explorenearbysearchiOS

长笔记 version: 5.5

xhsdiscover://multi_note/<note_id>
xhsdiscover://multi_note/discovery.<note_id>
paramstypedefaultrequireddesc
sourcestringnullfalse来源信息打点用

笔记评论页

xhsdiscover://comments/<note_id>
paramstypedefaultrequireddesc
target_comment_idstringnullfalse目标评论,如果设置 跳转时会定位到对应的评论
uidstringnulltrue发布笔记人的用户ID,如果不传则无法标识作者

用户

用户主页 version: 5.35

xhsdiscover://user/<user_id>
xhsdiscover://user/user.<user_id>
paramstypedefaultrequireddesc
tabstringnotefalse默认选中笔记Tab,enum:
  • note => 笔记
  • board => 专辑/收藏
  • atMe => @我
  • goods => 商品
  • board.note => 收藏下的笔记
  • board.board => 收藏下的专辑
  • board.tag => 收藏的标签

用户绑定页

用户绑定信息页 version: 5.0
xhsdiscover://account/bind
用户绑定手机页 version: 5.0
xhsdiscover://account/bind/phone
paramstypedefaultrequireddesc
bind_phonestringnullfalse已经绑定的手机号

用户推荐好友页

用户推荐好友页 — 推荐好友 version: 4.5
xhsdiscover://recommend/user    
用户推荐好友页 — 通讯录好友 version: 4.5

xhsdiscover://recommend/contacts

用户推荐好友页 — 微博好友 version: 4.5
xhsdiscover://recommend/weibo  

用户资料页

用户修改个人资料页 version: 4.5
xhsdiscover://me/profile

用户消息页

消息中心页 version: 5.0
xhsdiscover://message/center
赞和收藏页 version: 5.0
xhsdiscover://message/collections
关注消息页 version: 5.0
xhsdiscover://message/followers
评论和@消息页 version: 5.0
xhsdiscover://message/comments
系统通知消息页 version: 5.0
xhsdiscover://message/notifications 

用户收藏页 version: 5.8

xhsdiscover://user/<user_id>/collects
xhsdiscover://user/user.<user_id>/collects
xhsdiscover://user/me/collects
paramstypedefaultrequireddesc
tabstringnullfalseVersion 5.27 默认选中Tab enum: all -> 所有收藏, boards -> 我的专辑

用户粉丝页 version: 5.9

xhsdiscover://user/<user_id>/followers
xhsdiscover://user/user.<user_id>/followers
xhsdiscover://user/me/followers

发现用户页 version: 5.34

xhsdiscover://user_explore

搜索

搜索输入页 version: 4.14

xhsdiscover://search/recommend
paramstypedefaultrequireddesc
placeholderstringnullfalse输入框 placeholder
modestringnullfalse目标搜索 enum: notes -> 笔记(默认) goods -> 商品 users -> 用户
sourcestringnullfalse搜索来源,打点用

搜索结果页 version: 4.14

xhsdiscover://search/result
paramstypedefaultrequireddesc
keywordstringnulltrue搜索词
target_searchstringnullfalse目标搜索 enum: notes -> 笔记(默认) goods -> 商品 users -> 用户
sourcestringnullfalse搜索来源,打点用 对应打点信息的 refer_page, enum: deeplink -> 默认来源 explore -> 发现 follow -> 关注 nearby -> 附近 store -> 商城 goods_detail -> 商详 classification -> 场次 search_result_notes -> 笔记结果 search_result_goods -> 商品结果 search_result_users -> 用户结果 image_tag -> 笔详树枝标签 leaderboard -> 排行榜 splash -> 开屏 Tips: 为了保证来源清晰,需要依赖发版,默认来源为 deeplink,如果需要新增,提前联系 gsun@xiaohongshu.com
modestringnullfalse搜索方式, 打点用 对应打点信息的 word_from, enum: normal -> 默认方式 history -> 历史词 trending -> 推荐词 confirm -> 确认按钮 recommend_query -> 推荐搜索词 auto_complete -> auto_complete词 image_tag -> 笔详树枝标签 classification -> 场次 spotlight -> spotlight词 brand_queries -> 品牌词下的补全词模块 category_queries -> 品类词下的补全词模块 brand@category_queries -> 品牌+品类词下的补全词模块 brand_goods -> 品牌词下的商品模块 category_goods -> 品类词下的商品模块 brand@category_goods -> 品牌+品类词下的商品模块 category_groups -> 品类词下的话题聚合模块 graphic_trending_global -> 基于全局的推荐卡片 graphic_trending_local -> 基于本地的推荐卡片 city_queries -> 城市补全词模块 country_queries -> 国家补全词模块 city_groups -> 城市聚合模块 country_groups -> 国家聚合模块 hot_list -> 排行榜热搜词模块 splash_ads -> 开屏广告 Tips: 如果需要新增,联系 gsun@xiaohongshu.com
ads_bistringnullfalse商品搜索结果场次点击打点信息,打点用
goods_bistringnullfalse商品搜索结果商品点击打点信息,打点用
filterstringnullfalse结果页笔记筛选项,value为json字符串,例如[{“type”:“filter_hot”,“tags”:[“秋冬”]},{“type”:“filter_note_type”,“tags”:[“视频笔记”]}]

特定条件下的商品搜索(Exp:店铺内搜索) Version: 5.19

搜索输入页
xhsdiscover://goods_search/recommend
paramstypedefaultrequireddesc
placeholderstringnullfalse输入框 placeholder
sourcestringnullfalse搜索来源,打点用
filterstringnulltrue搜索条件,例:xhsdiscover://goods_search/recommend?filter=%7B%22type%22:%22seller%22,%22tags%22:%5B%2257c555b78340c36ad3875529%22%5D%7D
搜索结果页
xhsdiscover://goods_search/result
paramstypedefaultrequireddesc
keywordstringnullfalse搜索词
sourcestringnullfalse搜索来源,打点用
filterstringnulltrue搜索条件,例:xhsdiscover://goods_search/recommend?filter=%7B%22type%22:%22seller%22,%22tags%22:%5B%2257c555b78340c36ad3875529%22%5D%7D

pages

话题 page

xhsdiscover://page/topics/<topic_id>

商品 page

xhsdiscover://page/goods/<goods_id>

新话题页 笔详跳转

xhsdiscover://topic/<topic_id>

标签

标签页 version: 4.8

xhsdiscover://list/<tag_id>
paramstypedefaultrequireddesc
segmentstringnullfalse默认选中 Tab enum: note -> 笔记 goods -> 商品 brand -> 品牌 area -> 地区 poi -> 地点
filterstringnullfalse默认选中 Filter
modestringexplorefalse标识数据来源,打点用

专辑

专辑页 version: 3.2

xhsdiscover://board/<board_id>   
xhsdiscover://board/board.<board_id>
paramstypedefaultrequireddesc
namestring专辑false专辑页标题

H5

从App外部打开网页 version: 3.2

xhsdiscover://webview/www.xiaohongshu.com   
如果打开xiaohongshu.com以外的网站,会弹出提示框,打开小红书以外网站,有泄漏信息危险,是否确认打开?

示例:
xhsdiscover://webview/pages.xiaohongshu.com/activity/idol_trainee***
xhsdiscover://webview?link=http://pages.xiaohongshu.com/activity/idol_trainee***
xhsdiscover://webview/pages.xiaohongshu.com/event/page/sale/***?xhsshare=WeixinSession&appuid=***&apptime=1516606059&from=singlemessage
https://pages.xiaohongshu.com/activity/idol_trainee***           
paramstypedefaultrequireddesc
namestringnullfalseweb页标题
referrerstringnullfalseweb页 referrer 信息
withoutNaviboolfalsefalse是否隐藏导航栏
disableDragBackboolfalsefalse是否支持手势退出 web
disableBackForwardNavigationGesturesboolfalsefalse是否支持手势返回
enableObserveKeyboardChangeboolfalsefalse是否需要监听键盘事件

打开外部网页 version: 5.39

(iOS 会使用SFSafariViewController来打开)
xhsdiscover://extweb?link=https://www.xiaohongshu.com

虚拟 link

poi 页 version: 4.14

xhsdiscover://poi/<poi_id>
解析 POI, 参见 /api/sns/v1/link/search

商品 spl 页 version: 4.16

xhsdiscover://spl/<spl_id>   

商品 spv 页 version: 4.16

xhsdiscover://spv/<spv_id>    
xhsdiscover://spv_draft/<spv_id>
xhsdiscover://spv_skeleton/<spv_id>

笔记详情树枝商品标签

xhsdiscover://spv/<spv_id>/image_tag

笔记详情正文商品HashTag

xhsdiscover://spv/<spv_id>/hash_tag
paramstypedefaultrequireddesc
sourcestringnullfalse页面来源,数据采集用

Capa

发布 version: 5.22

xhsdiscover://post
paramstypedefaultrequireddesc
ignore_draftboolfalsefalse是否需要忽略本地草稿
hash_tagsjsonnullfalse带标签信息的发布,例如从标签页进入发布笔记,其中share_order是晒单信息,没有可以不用. example : hash_tags=[{"id": "52d0deb1b4c4d655316b7d21","link":"xhsdiscover://list/brand.52d0deb1b4c4d655316b7d21", "name": "迪奥", "type": "brand","share_order": {"order_id": "abc","item_id": "123","seller_id": "1123" }}]
sourcejsonnullfalseversion 5.15 渠道名称和id(渠道名称需要和后台报备):"type": {pages,order,activity,home,personal} //pages是标签 order是晒单 activity是活动页面 home是首页入口 personal是个人页面"ids": {} //pages传page id 、 order传商品 id、activity传活动id、 剩余没有id留空就行,多个id通过‘,’相连"extraInfo":{} //这是一个map,多余的额外信息,比如订单还需要传订单id放入这个字段, examplesource={"type":"order","ids":"123456,334334,654321","extraInfo":{"orderID":"1111111"}}
note_idstringnullfalse根据笔记id,编辑对应笔记发布.ps:现在受订单品牌合作实验"iOS_capa_order_brand"控制,只可以编辑带订单的笔记,全量后可编辑任何笔记

草稿箱

xhsdiscover://notes_draft_box   

系统设置

系统设置页 version: 5.8

xhsdiscover://system_settings

poi 信息报错页

xhsdiscover://pois/report/<poi_id>

举报页

xhsdiscover://report
paramstypedefaultrequireddesc
typestringnullfalse目标举报 enum: note -> 笔记 board -> 专辑 user -> 用户 comment -> 评论 message -> 私信
contentstringnullfalse举报目标的内容(目前仅target_type=message时需要,表示私信内容)
sourcestringnullfalse举报来源(目前仅target_type=user时需要) enum: profile -> 个人页举报 message -> 私信页举报

HEY

xhsdiscover://hey/<hey_id>   
paramstypedefaultrequireddesc
fromstringfollowfeedtrue来源地址(followfeed,user,message)
heylistarrary外部heylist

HEY 发布

xhsdiscover://hey_post
paramstypedefaultrequireddesc
sourcestringtrue来源地址(followfeed,user,message)
subtypeint-1false来源地址(-1 不想打卡; 3 学习; 1 健身; 2000 心情; 2 减肥; 4 早餐; 7 自拍; 6 败家)

HEY 打卡目标

xhsdiscover://hey_goal
paramstypedefaultrequireddesc
orderint0false目标周数
clockin_countint0false目标每周次数
subtypeint-1true来源地址(-1 不想打卡; 3 学习; 1 健身; 2000 心情; 2 减肥; 4 早餐; 7 自拍; 6 败家)

商品加车半屏页

xhsdiscover://goods_layer
paramstypedefaultrequireddesc
goodsIdstringnulltrue商品id
contractIdstringnulltrue合约id
liveRoomIdstringnullfalse直播间id(iOS端将直播间id直接拼接到contractId中;android端必传)

直播拉流页

xhsdiscover://live_audience
paramstypedefaultrequireddesc
room_idstringnulltrue直播房间号(必须)
sourcestringnulltrue直播入口来源(必须)
flvUrlstringnullfalse直播拉流地址(用于预加载,非必须)
host_avatarstringnullfalse主播头像地址(用于展示占位图,非必须)

deprecated

rewrite