07 HTTP API(Discarded)
General
This documents introduces WECON V-BOX HTTP API. And this document also shows some examples. All example is tested from postman application.
Transport protocol: HTTP protocol
Server address:
China:
Asean:
Europe:

For ASEAN server V-BOX, now can use http, the server address is api.asean.v-box.net.
The common KEY is:
comid=128
comkey=7e421dd30a394d74b7b9c079e67e272c
screctkey=f1cd9351930d4e589922edbcf3b09a7c
For EU server V-BOX, now can use http, the server address is api.eu.v-box.net.
The common KEY is:
comid=128
comkey=7e421dd30a394d74b7b9c079e67e272c
screctkey=f1cd9351930d4e589922edbcf3b09a7c
Interface Parameter Description
Global parameters
The following acturls need to have global parameters (The global parameter client is put into the JSON format and placed in the common parameters of the Headers)

The returned result represented by Json and case sensitive:
1).Abnormal
{"code" : 403, "msg" : "SessionID (user session ID) invalid", "reqId": "1502074141465"}
2).Normal
{"code" : 200 , "result": {}, "msg" : "ok", "reqId":"1502074141465"}
Status Code

Example key and value
1).comid=2
2).comkey=589625dce895454dbff9782c299db156
3).screctkey=f1cd9351930d4e589922edbcf3b09a7c
4).ts=1573897380
Basic API
Login operation
2.1.1 Parameters
| Acturl | we-data/login | |
| Function | Login with username, email, phone number | |
| Parameters | Items | Description |
| alias | Must be username, registered email will fail to login | |
| password | 32bit password (MD5 encryption) | |
| domain(Optional) | 3rd party interface domain(Only available for Virtual Deployment) | |
| Return value | Items | Description |
| utype | User Type: 1-Manage Account, 2-Viewer Account | |
| sid | User session ID (Only available for 12 hours) | |
Operating procedures
Setp1: Set http: http://api.v-box.net/box-data/api/we-data/login

Setp2: Set parameters on Params
alias: weconuser
password: 599a3c736c04e196c58a29f43778f7ea(The md5 encryption result of Wecon159)

Step3: Get sign
alias=weconuser&comid=2&compvtkey=589625dce895454dbff9782c299db156&password=599a3c736c04e196c58a29f43778f7ea&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c
Put the whole string above encrypted by MD5, so will get the value of "sign"
"sign":"997513ff1320862f0cbb9ce19d0bd253"
Step4: Set common of header
{"comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"997513ff1320862f0cbb9ce19d0bd253"}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1573899119000",
"result": {
"utype": 1,
"ztRole": 1,
"sid": "2d7bfd344aa64d8ebc9beea0e4dad8ad"
}
}

Service data APIs
V-Box list
Parameters

Operating procedures
Step1: Set http: http://api.v-box.net/box-data/api/we-data/boxs
![]()
Step2: Set parameters on Params
No parameters for this acturl, so no need to set.
Step3: Get sign
comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 value: 8fb4fbf99fcc1331c3274e708a403034
Step4: Set common of header
{"sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"8fb4fbf99fcc1331c3274e708a403034"}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1573900361203",
"result": {
"list": [
{
"groupName": "",
"boxList": [
{
"machineCode": "V01001171116005027a279eb001",
"devModel": "V-BOX S-00",
"isAlarm": 0,
"boxName": "Treatment Systems",
"remark": "",
"state": "1",
"map": "78.178613,9.177124",
"boxId": "913"
},
…………
{
"machineCode": "Vir001171116005027a27201908",
"devModel": "V-BOX S-00",
"isAlarm": 0,
"boxName": "(Smart farm)",
"remark": "",
"state": "1",
"map": "88.637476,50.415074",
"boxId": "973"
}
]
},
……………………
{
"groupName": "(Manufacturing)",
"boxList": [
{
"machineCode": "Vir001171116005027a27201904",
"devModel": "V-BOX S-00",
"isAlarm": 0,
"boxName": "(Adjustment)",
"remark": "",
"state": "1",
"map": "109.316038,33.749868",
"boxId": "957"
},
………………
{
"machineCode": "Vir001171116005027a27201915",
"devModel": "V-BOX S-00",
"isAlarm": 0,
"boxName": "",
"remark": "",
"state": "1",
"map": "121.357068,24.312132",
"boxId": "975"
}
]
}
]
}
}

Real-time group list
Parameters
| acturl | we-data/realgroups | ||
| Functions | Get V-BOX’s tags group list | ||
| Parameters | Parameter | Description | |
| boxId | VBoxID ("None" means custom grouping) | ||
| Return value | Field name | Description | |
| list | Group list | ||
| groupId | Group ID | ||
| groupName | Group name | ||
Operating procedures
Step1: Set http: http://api.v-box.net/box-data/api/we-data/realgroups
![]()
Step2: Set parameters on Params
"boxId": "973"

Step3: Get sign
boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 value: 9b267b7549083167954b7ede30916ff5
Step4: Set common of header
{"boxId":"973","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"9b267b7549083167954b7ede30916ff5"}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1573901906667",
"result": {
"list": [
{
"groupName": "Temperature",
"groupId": 7325
},
{
"groupName": "Humidity",
"groupId": 7326
},
{
"groupName": "Button switch",
"groupId": 7327
}
]
}
}

Real-time tags configuration list
Parameters
| acturl | we-data/realcfgs | ||
| Functions | Get the tags configuration information in the specified group in V-BOX. | ||
| Parameters | Parameter | Description | |
| boxId | VBoxID(“None” means custom tags grouping) | ||
| groupId | Group ID (Required) | ||
| pageSize | Number of each page, 10 by default | ||
| pageIndex | Number of current page, start from 1 | ||
| devType | Device type (0:Box, 1:HMI) | ||
| Return value | Field name | Description | |
| cfgList | monitorId | Tags ID | |
| monitorName | Tags name | ||
| updTime | Last update time | ||
| dataId | type of data 100: 16-bit binary 101: 16-digit octal Refer to Appendix 1 | ||
| addr | Address | ||
| addrType | 0: bit address 1: byte address 2: word address 3: double word | ||
| digitCount | Integer digits, decimal places | ||
| digitBinary | Data type and integer digits, decimal places | ||
| dataLimit | Data range | ||
| rid | Address | ||
| roleType | Permission: 1-read only, 2-write only, 3-read-write | ||
| totalPage | Total pages | ||
| totalRecord | Total record number | ||
| currentPage | Current page number | ||
Operating procedures
Step1: Set http: http://api.v-box.net/box-data/api/we-data/realcfgs
![]()
Step2: Set parameters on Params
"boxId":"973"
"groupId":"7325"
"devType":"0"
"pageSize":"5"
"pageIndex":"2"

Step3: Get sign
boxId=763&comid=128&compvtkey=7e421dd30a394d74b7b9c079e67e272c&devType=0&groupId=211608&pageIndex=1&pageSize=5&sid=0e583b1f48cf467bbf738365b3da1a26&ts=1751263335125&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 sign: 27a89c93a4990d0497a8bd47dea4aed3
Step4: Set common of header
{"compvtkey":"7e421dd30a394d74b7b9c079e67e272c","sign":"27a89c93a4990d0497a8bd47dea4aed3","comid":"128","sid":"0e583b1f48cf467bbf738365b3da1a26","ts":1751263335125}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1751263500705",
"result": {
"cfgList": [
{
"monitorId": 2276374,
"monitorName": "x0",
"digitBinary": "",
"float_point": -1,
"rid": "X",
"roleType": 1,
"string_point": -1,
"dataId": 105,
"addr_stat_no": -1,
"updTime": 1745481123000,
"dataLimit": "0 1",
"addr": "0",
"digitCount": "",
"boxId": 763,
"addrType": 0
},
{
"monitorId": 2276373,
"monitorName": "y0",
"digitBinary": "",
"float_point": -1,
"rid": "Y",
"roleType": 3,
"string_point": -1,
"dataId": 105,
"addr_stat_no": -1,
"updTime": 1745480354000,
"dataLimit": "0 1",
"addr": "0",
"digitCount": "",
"boxId": 763,
"addrType": 0
},
{
"monitorId": 2276367,
"monitorName": "okg",
"digitBinary": "",
"float_point": 1,
"rid": "HDW",
"roleType": 3,
"string_point": -1,
"dataId": 105,
"addr_stat_no": -1,
"updTime": 1745475213000,
"dataLimit": "0 299999",
"addr": "10",
"digitCount": "5,0",
"boxId": 763,
"addrType": 2
},
{
"monitorId": 2276366,
"monitorName": "hjdfh",
"digitBinary": "",
"float_point": -1,
"rid": "HDX",
"roleType": 3,
"string_point": -1,
"dataId": 105,
"addr_stat_no": -1,
"updTime": 1745475139000,
"dataLimit": "0 299999,0 15",
"addr": "0,0",
"digitCount": "",
"boxId": 763,
"addrType": 0
}
],
"totalPage": 1,
"totalRecord": 4,
"currentPage": 1
}
}

Tags data list
Parameters
| acturl | we-data/realdata | ||
| Functions | Get the tags data in the specified group in V-BOX. | ||
| Parameters | Parameter | Description | |
| boxId | VBoxID(“None” means custom tag grouping) | ||
| groupId | Group ID (Required) | ||
| pageSize | Number of each page, 10 by default | ||
| pageIndex | Number of current page, start from 1 | ||
| devType | Device type (0:Box, 1:HMI) | ||
| Return value | Field name | Description | |
| List | Real-time data list | ||
| com | Communication port ID | ||
| monitorId | Tag ID | ||
| monitorName | Tag name | ||
| state | status | ||
| value | Value | ||
| groupId | Group ID | ||
| totalPage | Total pages | ||
| totalRecord | Total record | ||
| currentPage | current page | ||
Operating procedures
Step1: Set http: http://api.v-box.net/box-data/api/we-data/realdata
![]()
Step2: Set parameters on Params
"boxId":"973"
"devType":"0"
"groupId":"7325"
"pageSize":"5"
"pageIndex":"2"

Step3: Get sign
boxId=763&comid=128&compvtkey=7e421dd30a394d74b7b9c079e67e272c&devType=0&groupId=211608&pageIndex=1&pageSize=5&sid=0e583b1f48cf467bbf738365b3da1a26&ts=1751263921050&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 sign: 19191b155e92f800f4db086bf06f8367
{"compvtkey":"7e421dd30a394d74b7b9c079e67e272c","sign":"19191b155e92f800f4db086bf06f8367","comid":"128","sid":"0e583b1f48cf467bbf738365b3da1a26","ts":1751263921050}
Result
{
"code": 200,
"msg": "ok",
"reqId": "1751264055206",
"result": {
"totalPage": 1,
"list": [
{
"com": 0,
"string_point": -1,
"monitorId": 2276374,
"addr_stat_no": -1,
"actAuth": 1,
"monitorName": "x0",
"groupId": 211608,
"state": 0,
"float_point": -1,
"templateId": 0,
"value": "0",
"boxId": 763
},
{
"com": 0,
"string_point": -1,
"monitorId": 2276373,
"addr_stat_no": -1,
"actAuth": 3,
"monitorName": "y0",
"groupId": 211608,
"state": 0,
"float_point": -1,
"templateId": 0,
"value": "0",
"boxId": 763
},
{
"com": 0,
"string_point": -1,
"monitorId": 2276367,
"addr_stat_no": -1,
"actAuth": 3,
"monitorName": "okg",
"groupId": 211608,
"state": 0,
"float_point": 1,
"templateId": 0,
"value": "0",
"boxId": 763
},
{
"com": 0,
"string_point": -1,
"monitorId": 2276366,
"addr_stat_no": -1,
"actAuth": 3,
"monitorName": "hjdfh",
"groupId": 211608,
"state": 0,
"float_point": -1,
"templateId": 0,
"value": "0",
"boxId": 763
}
],
"totalRecord": 4,
"currentPage": 1
}
}

Modify tag data
Parameters
| acturl | we-data/updrealdata | |
| Functions | Modify tag data | |
| Parameters | Parameter | Description |
| boxId | Box ID | |
| monitorId | Tag ID | |
| value | value | |
| devType | Device type (0:Box, 1:HMI) | |
| Return value | None | |
Operating procedures
Step1: Set http: http://api.v-box.net/box-data/api/we-data/updrealdata
![]()
Step2: Set parameters on Params
boxId:6397578
monitorId:1001
value:66
devType:1

Step3: Get sign
boxId=6397578&comid=128&compvtkey=7e421dd30a394d74b7b9c079e67e272c&devType=1&monitorId=1001&sid=d8c98edd64da40289fef565c94924fe5&ts=171746501715435&value=66&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 sign: 4802a362fde2ca5053ad79fe4d272200
Step4: Set common of header
{"compvtkey":"7e421dd30a394d74b7b9c079e67e272c","sign":"4802a362fde2ca5053ad79fe4d272200","comid":"128","sid":"d8c98edd64da40289fef565c94924fe5","ts":171746501715435}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1573907138803",
"result": {}
}

Historical tags name list
Parameters
| acturl | we-data/monitors | ||
| Functions | Get a list of historical tags | ||
| Parameters | Parameter | Description | |
| boxId | Box ID (Not required) | ||
| devType | Device type (0:Box, 1:HMI) | ||
| Return value | Field name | Description | |
| list | Tag list | ||
| monitorId | tag ID | ||
| monitorName | tag name | ||
Operating procedures
Step1: Set http: http://api.v-box.net/box-data/api/we-data/monitors
![]()
Step2: Set parameters on Params
"boxId":"973"

Step3: Get sign
boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 sign: 9b267b7549083167954b7ede30916ff5
Step4: Set common of header
{"boxId":"973","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"9b267b7549083167954b7ede30916ff5"}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1573907813693",
"result": {
"list": [
{
"monitorId": 91576,
"monitorName": "Hum",
"groupId": 7328
},
{
"monitorId": 91577,
"monitorName": "Temp",
"groupId": 7328
}
]
}
}

Historical tag data list
Parameters
| acturl | we-data/historydata | ||
| Functions | Get historical data | ||
| Parameters | Parameter | Description | |
| monitorId | tag ID, (Required) | ||
| monitorBeginTime | Monitoring start time, (Not required) | ||
| monitorEndTime | Monitoring end time, (Not required) | ||
| pageSize | Number of each page, 10 by default | ||
| pageIndex | Number of current page, start from 1 | ||
| Return value | Field name | Description | |
| list | Historical data list | ||
| monitorName | tag name | ||
| monitorTime | Monitoring time | ||
| value | Value | ||
| totalPage | Total pages | ||
| totalRecord | Total records | ||
| currentPage | Current page | ||
Operating procedures
Step: Set http: http://api.v-box.net/box-data/api/we-data/historydata
![]()
Step2: Set parameters on Params
"monitorId": 91577
"monitorBeginTime":"2019-11-16 10:45:44.000"
"monitorEndTime":"2019-11-16 20:45:44.000"
"pageSize":"10"
"pageIndex":"2"

Step3: Get sign
comid=2&compvtkey=589625dce895454dbff9782c299db156&monitorBeginTime=2019-11-16 10:45:44.000&monitorEndTime=2019-11-16 20:45:44.000&monitorId=91577&pageIndex=2&pageSize=10&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 sign: feeae8ddb4014951cfc2c02de4744bc4
Step4: Set common of header
{"monitorId":"91577","monitorBeginTime":"2019-11-16 10:45:44.000","monitorEndTime":"2019-11-16 20:45:44.000","pageSize":"10","pageIndex":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"feeae8ddb4014951cfc2c02de4744bc4"}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1573909705772",
"result": {
"totalPage": 12,
"list": [
{
"monitorTime": 1573905337000,
"groupName": "His",
"monitorTime_show": "2019-11-16 19:55:37.000",
"monitorName": "Temp",
"groupId": 7328,
"value": "914"
},
……………
{
"monitorTime": 1573902637000,
"groupName": "His",
"monitorTime_show": "2019-11-16 19:10:37.000",
"monitorName": "Temp",
"groupId": 7328,
"value": "422"
}
],
"totalRecord": 120,
"currentPage": 2
}
}

Alarm tags data list
Parameters
| acturl | we-data/alarmdata | ||
| Function | Get alarm data | ||
| Parameters | Parameter | Description | |
| boxId | VBoxID, (Required) | ||
| monitorBeginTime | Monitoring start time, (Not required) | ||
| monitorEndTime | Monitoring end time, (Not required) | ||
| pageSize | Number of each page, 10 by default | ||
| pageIndex | Number of current page, start from 1 | ||
| state | Status 1-unconfirmed, 2-confirm | ||
| alarmType | Alarm events: 1-trigger alarm, 0-disarm (Not necessary) | ||
| alarmLevel | Alarm level: 1 general alarm, 2 serious alarm, 3 particularly serious alarm (Not necessary) | ||
| devType | Device type (0:Box, 1:HMI) | ||
| Return value | Field name | Description | |
| List | Alarm data list | ||
| monitorId | tag ID | ||
| monitorName | tag name | ||
| state | status | ||
| value | Value | ||
| monitorTime | Monitoring time | ||
| alarmType | Alarm event | ||
| alarmLevel | Alarm level | ||
| totalPage | Total pages | ||
| totalRecord | Total records | ||
| currentPage | Current page | ||
Operating procedures
Step1: Set http: http://api.v-box.net/box-data/api/we-data/alarmdata
![]()
Step2: Set parameters on Params
"monitorId":"91931"
"monitorBeginTime":"2019-11-16 20:30:44.000"
"monitorEndTime":"2019-11-16 21:30:44.000"
"pageSize":"10"
"pageIndex":"1"
"state":"2"

Step3: Get sign
comid=2&compvtkey=589625dce895454dbff9782c299db156&monitorBeginTime=2019-11-16 20:30:44.000&monitorEndTime=2019-11-16 21:30:44.000&monitorId=91931&pageIndex=1&pageSize=10&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&state=2&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c
MD5 sign: 4056006bbc71bd80a3c632987626e15b
Step4: Set common of header
{"monitorId":"91931","monitorBeginTime":"2019-11-16 20:30:44.000","monitorEndTime":"2019-11-16 21:30:44.000","pageSize":"10","pageIndex":"1","state":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"4056006bbc71bd80a3c632987626e15b"}

Result
{
"code": 200,
"msg": "ok",
"reqId": "1573911745258",
"result": {
"totalPage": 1,
"list": [
{
"monitorTime": 1573910934000,
"alarmType": 0,
"monitorId": 4437,
"monitorTime_show": "2019-11-16 21:28:54",
"monitorName": "Temperature alarm",
"alarmLevel": 2,
"state": 2,
"text": "The temperature is too high",
"value": "1",
"alarm_role": 0
},
…………
{
"monitorTime": 1573910855000,
"alarmType": 1,
"monitorId": 4437,
"monitorTime_show": "2019-11-16 21:27:35",
"monitorName": "Temperature alarm",
"alarmLevel": 2,
"state": 2,
"text": "The temperature is too high",
"value": "18",
"alarm_role": 0
}
],
"totalRecord": 6,
"currentPage": 1
}
}

Get device state
Parameters
| acturl | we-data/getDeviceState | ||
| Function | Get vbox state based on machine code | ||
| Parameters | Parameter | Description | |
| machineCode | machineCode(required) | ||
| Return value | Field name | Description | |
| state | vbox state: 1-online, 0-offline | ||
Send switch to device
3.10.1 Parameters
| acturl | we-data/sendSwitchToDevice | ||
| Function | Enable vbox reports real-time data, because now the vbox has added a real-time data switch function, only in the real-time data page vbox will report real-time data, otherwise it will not be reported. So if you need to keep to get real-time data, you need to call this interface first, and call it every 20 seconds, so that the vbox will continue to report real-time data. | ||
| Parameters | Parameter | Description | |
| boxId | boxId(required) | ||
| Return value | Field name | Description | |
Appendix
Data type
100: 16-bit binary
101: 16-bit octal
102: 16-bit hexadecimal
103: 16-bit BCD code
104: 16-bit signed decimal
105: 16-bit unsigned decimal
200: 32-bit binary
201: 32-bit octal
202: 32-bit hexadecimal
203: 32-bit BCD
204: 32-bit signed decimal
205: 32-bit unsigned decimal
206: 32-bit floating
400: 64-bit binary
401: 64-bit octal
402: 64-bit hexadecimal
403: 64-bit BCD
404: 64-bit signed decimal
405: 64-bit unsigned decimal
406: 64-bit floating
1000: string
Version: V1.1.0
Date: Nov 2019
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>维控慧网3.0(国外版)老用户服务查询</title>
<style>
*{margin:0;padding:0;box-sizing:border-box;font-family:"Microsoft YaHei",sans-serif}
body{background:#f4f6f8;padding:20px}
.box{max-width:750px;margin:0 auto;background:#fff;border-radius:12px;box-shadow:0 2px 12px rgba(0,0,0,0.08);padding:32px}
.title{text-align:center;margin-bottom:28px}
.title h1{font-size:22px;color:#222;margin-bottom:8px}
.title p{color:#666;font-size:14px}
.input-area{text-align:center;margin-bottom:30px}
.input-group{display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:12px}
#deviceNum{width:220px;padding:10px 14px;border:1px solid #ddd;border-radius:6px;font-size:15px;outline:none}
#deviceNum:focus{border-color:#409eff}
button{padding:10px 24px;background:#409eff;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:15px}
button:hover{background:#337ecc}
.tip{color:#999;font-size:12px}
.result{display:none;margin-top:24px;border-top:1px solid #eee;padding-top:24px}
.result-item{display:flex;padding:10px 0;border-bottom:1px solid #f0f0f0}
.label{width:180px;color:#333;font-weight:500}
.value{color:#222}
.highlight{color:#e63946;font-weight:bold}
.info-card{background:#f8f9fa;padding:16px 18px;border-radius:8px;margin-top:20px}
.info-card h3{font-size:15px;margin-bottom:10px;color:#333}
.info-card ul{padding-left:20px;font-size:14px;line-height:1.6;color:#555}
</style>
</head>
<body>
<div class="box">
<div class="title">
<h1>维控慧网3.0(国外版)老用户服务查询</h1>
<p>输入设备数量,查询等级、积分、年费抵扣信息</p>
</div>
<div class="input-area">
<div class="input-group">
<input type="number" id="deviceNum" placeholder="请输入当前设备数量" min="0" max="2000">
<button onclick="check()">立即查询</button>
</div>
<div class="tip">提示:子账号权益由主账号决定,仅支持主账号查询</div>
</div>
<div class="result" id="result">
<div class="result-item">
<div class="label">当前设备数量:</div>
<div class="value" id="d_num">-</div>
</div>
<div class="result-item">
<div class="label">匹配服务等级:</div>
<div class="value highlight" id="level">-</div>
</div>
<div class="result-item">
<div class="label">账号年费(美元):</div>
<div class="value" id="fee">-</div>
</div>
<div class="result-item">
<div class="label">注册赠送积分:</div>
<div class="value" id="p_register">-</div>
</div>
<div class="result-item">
<div class="label">设备赠送积分:</div>
<div class="value" id="p_device">-</div>
</div>
<div class="result-item">
<div class="label">升级赠送积分:</div>
<div class="value" id="p_upgrade">-</div>
</div>
<div class="result-item">
<div class="label">可获得总积分:</div>
<div class="value highlight" id="points">-</div>
</div>
<div class="result-item">
<div class="label">积分可抵扣金额:</div>
<div class="value" id="deduct">-</div>
</div>
<div class="result-item">
<div class="label">实际需支付年费:</div>
<div class="value highlight" id="pay">-</div>
</div>
</div>
<div class="info-card">
<h3>规则说明(老用户必读)</h3>
<ul>
<li>积分比例:100积分 = 1美元,不可变现、转赠</li>
<li>注册送1000积分,每台设备绑定送100积分</li>
<li>0台=基础版,110台=入门版,1150台=高级版,51300台=旗舰版,3012000台=企业版</li>
<li>老用户升级积分:入门→高级+3000,高级→旗舰+10000,旗舰→企业+50000,满足即累加</li>
<li>年费为账号每年固定费用,积分可直接抵扣年费</li>
<li>仅支持升级/续费,不支持降级;子账号无操作权限</li>
</ul>
</div>
</div>
<script>
等级配置(严格规则)
const levelRules = [
{ name: "基础版", min: 0, max: 0, price: 0 },
{ name: "入门版", min: 1, max: 10, price: 10 },
{ name: "高级版", min: 11, max: 50, price: 50 },
{ name: "旗舰版", min: 51, max: 300, price: 200 },
{ name: "企业版", min: 301, max: 2000, price: 1000 }
];
function check() {
let num = document.getElementById("deviceNum").value.trim();
num = parseInt(num);
if (isNaN(num) || num < 0 || num > 2000) {
alert("请输入 02000 之间的有效设备数量");
return;
}
匹配等级
let level = null;
for (let item of levelRules) {
if (num >= item.min && num <= item.max) {
level = item;
break;
}
}
======================
核心:老用户升级积分
======================
let upgradePoint = 0;
高级版及以上:+3000
if (num >= 11) upgradePoint += 3000;
旗舰版及以上:+10000
if (num >= 51) upgradePoint += 10000;
企业版及以上:+50000
if (num >= 301) upgradePoint += 50000;
积分计算
const registerPoint = 1000;
const devicePoint = num * 100;
const totalPoint = registerPoint + devicePoint + upgradePoint;
const deductMoney = totalPoint / 100;
const realPay = Math.max(level.price - deductMoney, 0);
渲染结果
document.getElementById("d_num").textContent = num + " 台";
document.getElementById("level").textContent = level.name;
document.getElementById("fee").textContent = level.price + " $";
document.getElementById("p_register").textContent = registerPoint + " 积分";
document.getElementById("p_device").textContent = devicePoint + " 积分";
document.getElementById("p_upgrade").textContent = upgradePoint + " 积分";
document.getElementById("points").textContent = totalPoint + " 积分";
document.getElementById("deduct").textContent = deductMoney.toFixed(2) + " $";
document.getElementById("pay").textContent = realPay.toFixed(2) + " $";
document.getElementById("result").style.display = "block";
}
</script>
</body>
</html>