BBASMPlugin+ContainerHandler.h
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//
// BBASMPlugin+ContainerHandler.h
// BBAMNP
//
// Created by baidu on 2019/3/12.
// Copyright © 2019 Baidu. All rights reserved.
//
#import "BBASMPlugin.h"
NS_ASSUME_NONNULL_BEGIN
@interface BBASMPlugin (ContainerHandler)
/**
* @brief insertContainer
*
* @param dispatcher
* {
* "slaveId":"8",
* "containerId": 10000,
* "position": {
* "left": 37.5,
* "top": 106,
* "width": 300,
* "height": 225
* },
* "scrollHeight": 829
* }
* callBack
* {
* "message": "ok",
* "status": "0",
* "data": {
* "isScrollViewFound": "1", //是否找到了scrollView标识
* "isRenderComplete" : "1", //是否绘制完成的标识
* "containerId": 10000
* }
* ********** description ************
* @name: container.insert
* @authority: swanAPI
* @path: /insertContainer
* @args: [{"name":"scrollHeight","value":"string"},{"name":"containerId","value":"string"},{"name":"slaveId","value":"string"},{"name":"position","value":"Object"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
*/
- (void)insertContainer:(BBASchemeDispatcher *)dispatcher;
/**
* @brief command
*
* @param dispatcher
* {
* "slaveId": "8",
* "containerId": 10000,
* "position": {
* "left": 0,
* "top": 0,
* "width": 667,
* "height": 375
* },
* "scrollHeight": 891,
* "checkInsideWebView": "1"
* }
*
* callBack
* {
* "message": "ok",
* "status": "0",
* "data": {
* "isScrollViewFound": "1", //是否找到了scrollView标识
* "isRenderComplete" : "1", //是否绘制完成的标识
* "containerId": 10000
* }
* }
* ********** description ************
* @name: container.update
* @authority: swanAPI
* @path: /updateContainer
* @args: [{"name":"scrollHeight","value":"string"},{"name":"containerId","value":"string"},{"name":"slaveId","value":"string"},{"name":"position","value":"Object"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
*/
- (void)updateContainer:(BBASchemeDispatcher *)dispatcher;
@end
NS_ASSUME_NONNULL_END