|
- //
- // ZhiyingCommNativeResult.h
- // hairuyi_flutter_comm
- //
- // Created by Weller on 2020/5/16.
- //
-
- #import <Foundation/Foundation.h>
-
- NS_ASSUME_NONNULL_BEGIN
-
- #define NativeCommandSuccess(msg) [[ZhiyingCommNativeResult alloc] initWithMsg:msg success:YES]
- #define NativeCommandFailed(msg) [[ZhiyingCommNativeResult alloc] initWithMsg: msg success: NO]
- #define NativeCommandNotImp [[ZhiyingCommNativeResult alloc] initWithMsg: @"native调用失败" success: NO]
-
- @interface ZhiyingCommNativeResult : NSObject
-
- // 状态
- @property (nonatomic, assign) BOOL success;
- // 消息
- @property (nonatomic, copy) NSString *msg;
- @property (nonatomic, strong) NSDictionary* data;
-
- - (instancetype)initWithMsg: (NSString*)msg success: (BOOL) success;
-
- - (NSDictionary*)toDict;
-
- @end
-
- NS_ASSUME_NONNULL_END
|