推流直播带货功能接入文档

 

时序图

 

接入方式

本地集成

新增依赖库(动态库)接入方式签名选择
HDSLivePushStoreModule.framework下载zip包中 SDK文件夹下 HDSLivePushStoreModule 文件夹下,将framework拖入项目中Embed & Sign

 

cocoapods 集成

新增依赖库(动态库)接入方式是否必须
HDSLivePushStoreModule.framework在Podfile文件中添加: pod 'HDSLivePushStoreModule'

 

新增 API

---------------- 前置条件 ----------------

 

房间互动功能配置信息(代理方法)

方法注释所在类文件
(void)onInteractionConfigure:互动功能配置HDLiveKit/CCPushUtil.h

示例代码

HDSInteractionConfigureModel
参数类型注释所在类文件
isLiveStoreSwitchBOOL直播带货开关 0:关闭 1:开启HDLiveKit/PushParameters.h

 

获取互动组件Token(主动方法)

方法注释所在类文件
(void)getInteractionToken: token:获取互动组件 tokenHDLiveKit/CCPushUtil.h

示例代码

 

 

---------------- 初始化直播带货组件 ----------------

 

初始化直播带货组件SDK(主动方法)

方法注释所在类文件
(instancetype)initLivePushStoreFuncWithConfig: closure:初始化直播带货功能HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

HDSLiveStoreFuncConfig
参数类型注释所在类文件
tokenStringtokenHDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h

 

---------------- 获取商品列表 ----------------

 

获取商品列表(主动方法)

方法注释所在类文件
(void)getItemList: pageSize: closure: itemsModel:获取商品列表HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

HDSItemListModel
参数类型注释所在类文件
recordsHDSSingleItemModel(Array)商品列表HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
paginationHDSItemPageInformationModel(Model)分页信息HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
HDSSingleItemModel
参数类型注释所在类文件
idString商品idHDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
titleString商品名称HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
coverString商品图片HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
descString商品描述HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
tagsArray商品标签HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
originPriceDouble商品原价(单位:分)HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
currentPriceDouble商品现价(单位:分)HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
buttonTitleString按钮文案HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
topBool是否置顶HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
pushBool是否推送HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
scoreInteger商品序号HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
HDSItemPageInformationModel
参数类型注释所在类文件
pageNoInteger当前页HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
pageSizeInteger每页显示的数据条数HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
totalCountInteger商品总数HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
pageCountInteger总页码HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h

 

 

---------------- 获取导入商品列表 ----------------

 

获取导入商品列表 (主动方法)

方法注释所在类文件
(void)getImportItemList: pageSize: closure: importItemsModel:获取导入商品列表HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

HDSImportItemListModel
参数类型注释所在类文件
recordsHDSImportSingleItemModel(Array)商品列表HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
paginationHDSItemPageInformationModel(Model)分页信息HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
HDSImportSingleItemModel
参数类型注释所在类文件
idString商品idHDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
titleString商品名称HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
coverString商品图片HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
originPriceDouble商品原价(单位:分)HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
currentPriceDouble商品现价(单位:分)HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
gmtCreateInteger添加时间 (ms)HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
bindInteger导入标记:0-未导入;1-已导入HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
HDSItemPageInformationModel
参数类型注释所在类文件
pageNoInteger当前页HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
pageSizeInteger每页显示的数据条数HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
totalCountInteger商品总数HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h
pageCountInteger总页码HDSLivePushStoreModule/HDSLivePushStoreFuncConfig.h

 

---------------- 导入商品 ----------------

 

导入商品(主动方法)

方法注释所在类文件
(void)importItem: closure:导入商品HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

 

---------------- 删除商品 ----------------

 

删除商品(主动方法)

方法注释所在类文件
(void)removeItem: closure:删除商品HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

 

---------------- 推送商品 ----------------

 

推送商品(主动方法)

方法注释所在类文件
(void)pushItem: closure:推送商品HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

 

---------------- 取消推送 ----------------

 

取消推送(主动方法)

方法注释所在类文件
(void)cancelPushItem: closure:取消推送HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

 

---------------- 置顶商品 ----------------

 

置顶商品(主动方法)

方法注释所在类文件
(void)toTopItem: closure:置顶商品HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码

 

---------------- 取消置顶 ----------------

 

取消置顶(主动方法)

方法注释所在类文件
(void)cancelToTopItem: closure:取消置顶HDSLivePushStoreModule/HDSLivePushStoreFunc.h

示例代码