search

Home  >  Q&A  >  body text

javascript - H5 development app, using JS to call the background interface?

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中文网2808 days ago1023

reply all(5)I'll reply

  • 漂亮男人

    漂亮男人2017-06-05 11:12:31

    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

    reply
    0
  • 迷茫

    迷茫2017-06-05 11:12:31

    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.

    reply
    0
  • PHP中文网

    PHP中文网2017-06-05 11:12:31

    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.

    reply
    0
  • PHP中文网

    PHP中文网2017-06-05 11:12:31

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

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-06-05 11:12:31

    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.

    reply
    0
  • Cancelreply