javascript - H5 development app, using JS to call the background interface?
PHP中文网
PHP中文网 2017-06-05 11:10:31
0
5
965

The company recently took on a project, which is to use H5 to develop an app to control hardware, such as refrigerators, water heaters and other equipment. I have never done this before. I would like to know what the interface written in the background looks like during development. , what needs to be done to call the background interface to achieve the purpose of controlling the device

The interface is generally Android

PHP中文网
PHP中文网

认证0级讲师

reply all(5)
漂亮男人

Just request data from the server through the network protocol, the same principle as the web page. The network protocol can be http, socket or mqtt

迷茫

I suggest you take a look at the interfaces of Alibaba Smart and JD Weilian. They now control hardware through mobile phones. The interface is very simple, just copy it and it will be fine.

Ty80

Interface communication is implemented through ajax. Normal operations are the same as web page operations. However, you should pay attention to whether there are cross-domain problems. Generally, they are the same. It's nothing more than transmitting data to and retrieving data from the background. Don't think about it too complicated.

洪涛

H5 supports websocketreal-time communication
backend interface using JSONformat data transmission

伊谢尔伦

Interface communication is implemented through ajax. Normal operations are the same as web page operations. However, you should pay attention to whether there are cross-domain problems. Generally, they are the same. It's nothing more than transmitting data to and retrieving data from the background. Don't think about it too complicated.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template