更新时间:2023-07-13 07:14:41下载pdf
通用配网业务包提供配网列表数据获取能力,提供获取数据列表自定义展示的方法。您可以结合涂鸦 IoT 开发平台支持的配网列表页数据,来配置列表页。
您需要通过 ThingSmartActivatorService
提供的对应方法,获取对应的数据类目信息。
在工程的 Podfile
文件中添加技能快绑业务包组件,并执行 pod update
命令:
source 'https://github.com/tuya/tuya-private-specs.git'
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
target 'your_target_name' do
pod 'ThingSmartActivatorExtraBizBundle'
end
无。
参数
- (void)requestLevelOneListWithSuccess:(void(^)(ThingSmartACategoryModel * _Nullable model))success
failure:(void(^)(NSError *error))failure;
参数
无
Objective-C 示例
#import <ThingSmartActivatorRequest/ThingSmartActivatorRequest.h>
self.service = [ThingSmartActivatorService new];
[self.service requestLevelOneListWithSuccess:^(ThingSmartACategoryModel * _Nullable model) {
} failure:^(NSError * _Nonnull error) {
}];
Swift 示例
service = ThingSmartActivatorService()
service.requestLevelOneList(withSuccess: { (result) in
}, failure: { (error) in
})
参数
- (void)requestLevelSecondListWithLevelOneCode:(NSString *)levelOneCode
type:(NSString *)type
success:(void(^)(NSArray<ThingSmartACategoryLevel2Model *> * _Nullable modelList))success
failure:(void(^)(NSError *error))failure;
参数
名称 | 参数类型 | 说明 |
---|---|---|
levelOneCode | NSString | 一级类目的 levelOneCode |
type | NSString | 一级类目的 type |
Objective-C 示例
#import <ThingSmartActivatorRequest/ThingSmartActivatorRequest.h>
self.service = [ThingSmartActivatorService new];
[self.service requestLevelSecondListWithLevelOneCode:levelOneCode type:type success:^(NSArray<ThingSmartACategoryLevel2Model *> * _Nullable modelList) {
} failure:^(NSError * _Nonnull error) {
}];
Swift 示例
service = ThingSmartActivatorService()
service.requestLevelSecondList(withLevelOneCode: levelOneCode, type: type, success: { (result) in
}, failure: { (error) in
})
参数
- (void)requestCategoryDetailWithPID:(NSString * _Nullable)PID
category:(NSString * _Nullable)category
success:(void(^)(ThingSmartDeviceCategoryModel * _Nullable model))success
failure:(void(^)(NSError *error))failure;
参数
名称 | 参数类型 | 说明 |
---|---|---|
PID | NSString | 产品 ID |
category | NSString | 品类 |
Objective-C 示例
self.service = [ThingSmartActivatorService new];
[service requestCategoryDetailWithPID:pid category:category success:^(ThingSmartDeviceCategoryModel * _Nullable model) {
} failure:^(NSError * _Nonnull error) {
}];
Swift 示例
#import <ThingSmartActivatorRequest/ThingSmartActivatorRequest.h>
service = ThingSmartActivatorService()
service.requestCategoryDetail(withPID: pid, category: category, success: { (result) in
}, failure: { (error) in
})
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈