Description

  • Description of the page widget

Interface version

Version number Writer Date Description
1.0 Qin Zhitian June 29, 2021 initial release

IP address

http://192.168.1.1/wapi

API list

Name Description
set set attributes
get get attributes

1. set

Description of request parameters

Parameter Name Type Description
attr string attribute
attr.action string action: q1-‘scroll mode’;
attr.scroll string scroll mode: ver-‘vertical direction’;hor-‘horizontal direction’;
attr.scrolling int parameter: scrolling distance range,-10 — 100

Call example

{
    "wid": "s1",
    "cmd" : "set",
    "attr": {
        "action": "q1",
        "scroll": "ver",
        "scrolling": -10
    }
}
Note: set page to scroll down in the vertical direction 10*vertical distance on the screen
{
    "wid": "s1",
    "cmd" : "set",
    "attr": {
        "action": "q1",
        "scroll": "hor",
        "scrolling": -10
    }
}
Note: set page to scroll left in horizontal direction 10*horizontal distance on the screen

Return example

{
    "code": 0
}

Description of return parameters

Parameter Name Type Description
result string result information
result.code int error code

Error code

Error Code Description

2. get

Description of request parameters

Parameter Name Type Description

Call example

{
    "wid": "s1",
    "cmd" : "get"
}

Return example

{
    "state": true,
    "code": 0
}

Description of return parameters

Parameter Name Type Description
result string result information
result.code int error code
result.state bool true/false,judge whether the page has scrolled up to the top

Error code

Error Code Description
文档更新时间: 2021-08-19 15:14   作者:plj