CN109862076B - Service data interaction method, device and system - Google Patents
Service data interaction method, device and system Download PDFInfo
- Publication number
- CN109862076B CN109862076B CN201811645217.2A CN201811645217A CN109862076B CN 109862076 B CN109862076 B CN 109862076B CN 201811645217 A CN201811645217 A CN 201811645217A CN 109862076 B CN109862076 B CN 109862076B
- Authority
- CN
- China
- Prior art keywords
- configuration information
- request
- interface
- service
- page module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000003993 interaction Effects 0.000 title claims abstract description 80
- 238000000034 method Methods 0.000 title claims abstract description 52
- 230000004044 response Effects 0.000 claims abstract description 76
- 238000004891 communication Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 5
- 230000006870 function Effects 0.000 claims description 5
- 230000000977 initiatory effect Effects 0.000 claims description 4
- 238000011161 development Methods 0.000 abstract description 9
- 238000012423 maintenance Methods 0.000 abstract description 8
- 230000008569 process Effects 0.000 abstract description 8
- 230000008878 coupling Effects 0.000 abstract description 5
- 238000010168 coupling process Methods 0.000 abstract description 5
- 238000005859 coupling reaction Methods 0.000 abstract description 5
- 238000004806 packaging method and process Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 9
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a service data interaction method, a device and a system, wherein the method comprises the following steps: receiving interface configuration information sent by any service page module; configuring an HTTP request based on the interface configuration information, and sending the HTTP request to the server so that the server can return response data based on the HTTP request; and receiving response data and sending the response data to the service page module. According to the method, the device and the system provided by the embodiment of the invention, aiming at data interaction between a single service and a server, the code sharing of HTTP request configuration is realized aiming at interface configuration information under different services by packaging the interface configuration information and configuring the HTTP request based on the interface configuration information, so that redundant codes are reduced, the development efficiency is improved, the later maintenance cost is reduced, the coupling between different service page modules in the data interaction process is reduced, and the maintainability of a project is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a service data interaction method, a service data interaction device and a service data interaction system.
Background
The house property transaction system relates to a series of links such as network signing, surface signing, loan approving, tax payment, house passing and the like, the system flow is very complex, the pages of different business modules are numerous, and various backend data interfaces are relied on.
Therefore, the front-end development needs to consider various factors when performing data interaction, such as whether the request information of the interface is correct, whether the parameter type is standard or not, whether the request mode is correct, whether the data information of the returned data is correct, and the processing mode of data errors.
In a complex transaction system, the limiting factors of the above aspects cause that a great deal of time and energy are required to be invested in data interaction of different business module pages in front-end development, and problems of interface error reporting, difficulty in positioning and the like can be caused by slight carelessness. Complicated data interaction requires a large amount of codes, and the later maintenance cost is greatly increased.
Disclosure of Invention
The embodiment of the invention provides a business data interaction method, a business data interaction device and a business data interaction system, which are used for solving the problems that a large number of codes are required to be invested in complex data interaction, and the later maintenance cost is greatly increased.
In a first aspect, an embodiment of the present invention provides a service data interaction method, including:
a receiving step: receiving interface configuration information sent by any service page module;
a request step: configuring an HTTP request based on the interface configuration information, and sending the HTTP request to a server so that the server can return response data based on the HTTP request;
and returning to the step: and receiving the response data and sending the response data to any business page module.
In a second aspect, an embodiment of the present invention provides a service data interaction apparatus, including:
the receiving unit is used for receiving interface configuration information sent by any service page module;
the request unit is used for configuring an HTTP request based on the interface configuration information and sending the HTTP request to a server so that the server can return response data based on the HTTP request;
and the return unit is used for receiving the response data and sending the response data to any service page module.
In a third aspect, an embodiment of the present invention provides a service data interaction system, which includes a plurality of service page modules and a service data interaction apparatus as provided in the second aspect.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a bus, where the processor and the communication interface, the memory complete communication with each other through the bus, and the processor may call logic instructions in the memory to perform the steps of the method as provided in the first aspect.
In a fifth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method as provided in the first aspect.
According to the business data interaction method, device and system provided by the embodiment of the invention, aiming at data interaction between a single business and a server, the code sharing of HTTP request configuration is realized aiming at interface configuration information under different businesses by packaging the interface configuration information and configuring HTTP requests based on the interface configuration information, so that the redundant codes are reduced, the development efficiency is improved, the later maintenance cost is reduced, the coupling between different business page modules in the data interaction process is reduced, and the maintainability of a project is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a service data interaction method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a service data interaction apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a service data interaction system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a service data interaction system according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a business data interaction method, aiming at the problem that in a complex real estate transaction system, a large amount of codes are required to be invested in data interaction of different business module pages in front-end development, and the later maintenance cost is greatly increased. Fig. 1 is a schematic flow diagram of a service data interaction method provided in an embodiment of the present invention, and as shown in fig. 1, an execution subject of the method is a service data interaction device, and the method includes:
Specifically, in the house property transaction system, different service page modules are set based on different house property transaction services, and any service page module is used to implement the house property transaction service corresponding to the service page module, for example, the service page module may be a web sign service page module, a surface sign service page module, a credit approval service page module, a tax payment service page module, or a house passing service page module, and the embodiment of the present invention is not particularly limited to this.
When any real estate transaction service is executed, data interaction occurs between a service page module corresponding to the real estate transaction service and the server. And when the data needs to be acquired through the server, the service page module sends the interface configuration information to the service data interaction device. Here, the interface configuration information is configuration information preset based on data that needs to be interacted with by the service page module, the interface configuration information is used to configure an HTTP (Hyper Text Transfer Protocol) request sent to the server, and the interface configuration information may include a target address of the service page module for requesting to read data, and may also include a data format that the service page module requires to return, and the like.
Specifically, after receiving interface configuration information sent by any service page module, the service data interaction device generates and configures an HTTP request based on the interface configuration information. After the generation and configuration of the HTTP are completed, the service data interaction device sends the HTTP request to the server. And after receiving the HTTP request, the server generates response data based on the HTTP request and returns the response data to the service data interaction device.
Specifically, after receiving response data returned by the server, the service data interaction device sends the response data to the corresponding service page module, so that the service page module performs service logic processing based on the response data after receiving the response data.
According to the method provided by the embodiment of the invention, aiming at data interaction between a single service and a server, the code sharing of HTTP request configuration is realized aiming at interface configuration information under different services by packaging the interface configuration information and configuring the HTTP request based on the interface configuration information, so that redundant codes are reduced, the development efficiency is improved, the later maintenance cost is reduced, the coupling between different service page modules in the data interaction process is reduced, and the maintainability of the project is improved.
Based on the above embodiment, the interface configuration information includes at least one of a page request address, a request type, a request mode, a current page interface parameter, loading frame information, error configuration information, and a callback function.
The page request address refers to a server target address of a business page module for requesting to read and/or store data. The request type refers to the format of the response data returned by the business page module. The request mode is GET or POST, wherein GET refers to data request from the specified resource, and POST refers to data to be processed submitted to the specified resource. The current page interface parameter is a service parameter for the house property transaction service corresponding to the service page module. The loading frame information is used for configuring information such as format and content of the loading frame. The error configuration information is used for configuring information such as format and content of an error box when an error occurs.
Based on any of the above embodiments, the HTTP request is a Fetch request; correspondingly, step 120 specifically includes: step 121, calling a Fetch interface; and step 122, initiating a Fetch request based on the Fetch interface and the interface configuration information, and sending the Fetch request to the server so that the server can return response data based on the Fetch request.
Specifically, Fetch is an API (Application Programming Interface) that processes data in a program manner. After receiving interface configuration information sent by any service page module, the service data interaction device immediately calls a Fetch interface, and the Fetch interface provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses. The Fetch interface also provides a global Fetch () method that provides a simple, reasonable way to asynchronously get resources across a network.
For example, the service data interaction device initiates a fetch request by calling the http $ http () method. The relevant configuration is first made based on the interface configuration information when the $ http method is executed. Aiming at the request mode in the interface configuration information:
if the request mode is GET, adding the following instructions:
method:GET,header.Accept:“application/json”,header.x-Requested-with:“XMLHttpRequest”,credentials:“include”。
if the request type is POST, adding the following instructions:
Method:POST,header.Accept:application/json,header.Content-type:application/json,credentials:same-origin,mode:cors。
the method provided by the embodiment of the invention realizes the transmission of the HTTP request based on the Fetch interface, reduces the code investment of data interaction between the service data interaction device and the server, and improves the development efficiency.
Based on any of the above embodiments, step 130 specifically includes: receiving response data; and if the response data has errors, sending error configuration information in the interface configuration information to the service page module so that the service page module can configure and display the error information based on the error configuration information.
Specifically, after receiving response data returned by the server, the service data interaction device determines whether the response data has an error. And if no error exists in the response data, returning the response data to the service page module. And if the response data has errors, returning error configuration information in the interface configuration information sent by the service page module to the service page module.
After receiving the error configuration information, the service page module configures and displays the error information based on the error configuration information, so that a user operating the service page module can know that an error occurs in a current service page. Here, the error information is used to represent that an error occurs in the current service page, and the error information may also be used to represent information such as a type of the current error, and there are various display manners of the error information, and the specific content of the error information may be configured through the error configuration information, and the display manner of the error information may also be configured, for example, the error information is displayed in a pop-up frame form or directly displayed on the page, which is not specifically limited in this embodiment of the present invention.
According to the method provided by the embodiment of the invention, the error information is displayed in time based on the error configuration information in the interface configuration information, so that a user can obtain the current state in real time, the blind waiting time of the user is shortened, and the user experience is optimized.
Based on any of the above embodiments, step 120 further includes: if the response data is not received within the first preset time, sending loading frame information in the interface configuration information to the service page module so that the service page module can configure and display the loading frame based on the loading frame information; and if the response data is not received within the second preset time, sending error configuration information in the interface configuration information to the service page module, so that the service page module can configure and display the error information based on the error configuration information.
Specifically, after the service data interaction device sends the HTTP request to the server, the service data interaction device waits for the server to return response data based on the HTTP request. In the waiting process, if the service data interaction device does not receive response data returned by the server after the first preset time after the HTTP request is sent, the loading frame information in the interface configuration information sent by the service page module is returned to the service page module, and the service page module is indicated to configure and display the loading frame based on the loading frame information, so that a user who is operating the service page module can know that the current service page is loaded.
Similarly, in the waiting process, if the service data interaction device does not receive response data returned by the server after the second preset time after the HTTP request is sent, the error configuration information in the interface configuration information sent by the service page module is returned to the service page module, and the service page module is instructed to configure and display the error information based on the error configuration information, so that a user who is operating the service page module can know that an error occurs in the current service page. Here, the error information is used to represent that an error occurs in the current service page, and the error information may also be used to represent information such as a type of the current error, and there are various display manners of the error information, and the specific content of the error information may be configured through the error configuration information, and the display manner of the error information may also be configured, for example, the error information is displayed in a pop-up frame form or directly displayed on the page, which is not specifically limited in this embodiment of the present invention.
Here, the first preset time and the second preset time are both preset times, and the first preset time is smaller than the second preset time. For example, the first preset time is 1 second, the second preset time is 5 seconds, if the response information is not received within 1 second after the HTTP request is sent, the service data interaction device returns the loading frame information to the service page module, and the service page module displays the loading frame based on the loading frame information. And if the response information is not received within 5 seconds after the HTTP request is sent, the service data interaction device transmits the error configuration information back to the service page module, and the service page module configures the error information based on the error configuration information and displays the error information to replace the loading frame.
According to the method provided by the embodiment of the invention, the loading frame and the error information are displayed in time based on the loading frame information and the error configuration information in the interface configuration information, so that a user can obtain the current state in real time, the blind waiting time of the user is shortened, and the user experience is optimized.
Based on any of the above embodiments, fig. 2 is a schematic structural diagram of a service data interaction apparatus provided in an embodiment of the present invention, as shown in fig. 2, the apparatus includes a receiving unit 210, a requesting unit 220, and a returning unit 230;
the receiving unit 210 is configured to receive interface configuration information sent by any service page module;
the request unit 220 is configured to configure an HTTP request based on the interface configuration information, and send the HTTP request to a server, so that the server can return response data based on the HTTP request;
the returning unit 230 is configured to receive the response data and send the response data to any service page module.
The device provided by the embodiment of the invention realizes code sharing of HTTP request configuration aiming at interface configuration information under different services by packaging the interface configuration information and configuring the HTTP request based on the interface configuration information aiming at data interaction between a single service and a server, reduces redundant codes, improves development efficiency, reduces later maintenance cost, reduces coupling between different service page modules in the data interaction process, and improves maintainability of a project.
Based on any of the above embodiments, in the apparatus, the interface configuration information includes at least one of a page request address, a request type, a request mode, a current page interface parameter, loading frame information, error configuration information, and a callback function.
According to any of the above embodiments, in the apparatus, the HTTP request is a Fetch request;
correspondingly, the request unit 220 is specifically configured to: calling a Fetch interface; initiating a Fetch request based on the Fetch interface and the interface configuration information, and sending the Fetch request to a server so that the server can return response data based on the Fetch request.
Based on any of the above embodiments, the returning unit 230 is specifically configured to: receiving the response data; and if the response data has errors, sending the error configuration information in the interface configuration information to any service page module so that any service page module can configure and display error information based on the error configuration information.
According to any of the above embodiments, the apparatus further comprises a timing unit; the timing unit is used for:
if the response data is not received within a first preset time, sending the loading frame information in the interface configuration information to any service page module so that any service page module can configure and display a loading frame based on the loading frame information;
and if the response data is not received within second preset time, sending the error configuration information in the interface configuration information to any service page module, so that any service page module can configure and display error information based on the error configuration information.
Based on any of the above embodiments, fig. 3 is a schematic structural diagram of a service data interaction system according to an embodiment of the present invention, as shown in fig. 3, the service data interaction system includes a plurality of service page modules 310 and a service data interaction device 320 according to any of the above embodiments.
Specifically, in the house property transaction system, different business page modules 310 are set based on different house property transaction businesses, each business page module 310 is used for implementing a corresponding house property transaction business, for example, the business page module 310 may be a web sign business page module, a surface sign business page module, a credit approval business page module, a tax payment business page module, or a house passing business page module.
When the real estate transaction service is executed, each service page module 310 can generate data interaction with the server through the service data interaction device 320. Further, each service page module 310 may send the interface configuration information to the service data interaction device 320, and receive response data returned by the server based on the HTTP request transmitted by the service data interaction device 320, where the HTTP request is configured by the service data interaction device 320 based on the interface configuration information.
The system provided by the embodiment of the invention realizes code sharing of HTTP request configuration aiming at interface configuration information under different services by packaging the interface configuration information and configuring the HTTP request based on the interface configuration information aiming at data interaction between a single service and a server, reduces redundant codes, improves development efficiency, reduces later maintenance cost, reduces coupling between different service page modules 310 in the data interaction process, and improves maintainability of projects.
Based on any of the above embodiments, fig. 4 is a schematic structural diagram of a service data interaction system according to another embodiment of the present invention, and as shown in fig. 4, Element-Ul and whatwg-fetch are pre-installed in the service data interaction system. Element-Ul is a desktop UI framework based on vue.js 2.0, and is used for providing basic component support for the service page module 310, such as an input search box, a datePicker date box component, a Form component, a Radio box component, and the like. The whatwg-fetch is used to provide browser version compatible support for the fetch interface when compiling a page.
The service data interaction system comprises a plurality of service page modules 310, wherein each page module is preset with corresponding interface configuration information, and the interface configuration information comprises a page request address, a request type, a request mode, current page interface parameters, loading frame information, error configuration information and a callback function.
When any property transaction service is executed, the service page module 310 corresponding to the property transaction service sends the interface configuration information to the service data interaction device 320. After receiving the interface configuration information sent by any service page module 310, the service data interaction device 320 invokes the Fetch interface. The service data interaction device 320 initiates an HTTP request by calling the HTTP $ HTTP () method, where the HTTP request is a fetch request, and performs related configuration based on the interface configuration information when executing the $ HTTP method. Subsequently, the HTTP request is sent to the server 410. The server 410, after receiving the HTTP request, generates response data based on the HTTP request, and returns the response data to the service data interaction device 320.
After the service data interaction device 320 sends the HTTP request to the server 410, the service data interaction device 320 waits for the server 410 to return response data based on the HTTP request. If the service data interaction device 320 does not receive response data returned by the server 410 after the HTTP request is sent for the first preset time, returning loading frame information in the interface configuration information sent by the service page module 310 to the service page module 310, and instructing the service page module 310 to configure and display a loading frame based on the loading frame information, so that a user operating the service page module 310 can know that a current service page is being loaded. If the service data interaction device 320 does not receive response data returned by the server 410 after the second preset time after the HTTP request is sent, the error configuration information in the interface configuration information sent by the service page module 310 is returned to the service page module 310, and the service page module 310 is instructed to configure and display an error reporting box based on the error configuration information, so that a user operating the service page module 310 can know that an error occurs in the current service page.
After receiving the response data returned by the server 410, the service data interaction device 320 determines whether the response data has an error. If there is no error in the response data, the response data is returned to the service page module 310. And if the response data has errors, returning error configuration information in the interface configuration information sent by the service page module 310 to the service page module 310. After receiving the error configuration information, the service page module 310 configures and displays the error-reporting bullet box based on the error configuration information, so that a user operating the service page module 310 can know that an error occurs in the current service page.
Finally, after receiving the response data, the business page module 310 may also perform page rendering based on rendering data information in the response data.
Fig. 5 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device may include: a processor (processor)501, a communication Interface (Communications Interface)502, a memory (memory)503, and a communication bus 504, wherein the processor 501, the communication Interface 502, and the memory 503 are configured to communicate with each other via the communication bus 504. The processor 501 may call a computer program stored on the memory 503 and executable on the processor 501 to execute the service data interaction method provided by the above embodiments, for example, including: receiving interface configuration information sent by any service page module; configuring an HTTP request based on the interface configuration information, and sending the HTTP request to a server so that the server can return response data based on the HTTP request; and receiving the response data and sending the response data to any business page module.
In addition, the logic instructions in the memory 503 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to execute the service data interaction method provided in the foregoing embodiments, for example, the method includes: receiving interface configuration information sent by any service page module; configuring an HTTP request based on the interface configuration information, and sending the HTTP request to a server so that the server can return response data based on the HTTP request; and receiving the response data and sending the response data to any business page module.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (8)
1. A service data interaction method is characterized by comprising the following steps:
a receiving step: receiving interface configuration information sent by any service page module; the interface configuration information comprises loading frame information and error configuration information;
a request step: configuring an HTTP request based on the interface configuration information, and sending the HTTP request to a server so that the server can return response data based on the HTTP request;
the HTTP request is a Fetch request;
correspondingly, the requesting step specifically includes:
calling a Fetch interface;
initiating a Fetch request based on the Fetch interface and the interface configuration information, and sending the Fetch request to a server so that the server can return response data based on the Fetch request; the method comprises the steps that a fetch request is initiated by calling an http $ http () method, configuration is firstly carried out based on interface configuration information when the $ http method is executed, and the configuration based on the interface configuration information comprises adding an instruction;
and returning to the step: receiving the response data and sending the response data to any business page module,
after the requesting step, the method further comprises:
if the response data is not received within a first preset time, sending the loading frame information in the interface configuration information to any service page module so that any service page module can configure and display a loading frame based on the loading frame information; and if the response data is not received within second preset time, sending the error configuration information in the interface configuration information to any service page module so that any service page module can configure and display error information based on the error configuration information, wherein the first preset time is less than the second preset time.
2. The method of claim 1, wherein the interface configuration information further comprises at least one of a page request address, a request type, current page interface parameters, and a callback function.
3. The method according to claim 2, wherein the returning step specifically comprises:
receiving the response data;
and if the response data has errors, sending the error configuration information in the interface configuration information to any service page module so that any service page module can configure and display error information based on the error configuration information.
4. A service data interaction device, comprising:
the receiving unit is used for receiving interface configuration information sent by any service page module; the interface configuration information comprises loading frame information and error configuration information;
the request unit is used for configuring an HTTP request based on the interface configuration information and sending the HTTP request to a server so that the server can return response data based on the HTTP request; the HTTP request is a Fetch request; correspondingly, the request unit is specifically configured to: calling a Fetch interface; initiating a Fetch request based on the Fetch interface and the interface configuration information, and sending the Fetch request to a server so that the server can return response data based on the Fetch request; the method comprises the steps that a fetch request is initiated by calling an http $ http () method, configuration is firstly carried out based on interface configuration information when the $ http method is executed, and the configuration based on the interface configuration information comprises adding an instruction;
the return unit is used for receiving the response data and sending the response data to any service page module;
a timing unit, configured to send the loading frame information in the interface configuration information to any service page module if the response data is not received within a first preset time, so that the any service page module can configure and display a loading frame based on the loading frame information; and if the response data is not received within second preset time, sending the error configuration information in the interface configuration information to any service page module so that any service page module can configure and display error information based on the error configuration information, wherein the first preset time is less than the second preset time.
5. The apparatus of claim 4, wherein the interface configuration information further comprises at least one of a page request address, a request type, current page interface parameters, and a callback function.
6. Service data interaction system, characterized in that it comprises several service page modules, and a service data interaction device according to claim 4 or 5.
7. An electronic device, comprising a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory communicate with each other via the bus, and the processor can call logic instructions in the memory to execute the method according to any one of claims 1 to 3.
8. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811645217.2A CN109862076B (en) | 2018-12-30 | 2018-12-30 | Service data interaction method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811645217.2A CN109862076B (en) | 2018-12-30 | 2018-12-30 | Service data interaction method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109862076A CN109862076A (en) | 2019-06-07 |
CN109862076B true CN109862076B (en) | 2022-05-03 |
Family
ID=66893424
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811645217.2A Active CN109862076B (en) | 2018-12-30 | 2018-12-30 | Service data interaction method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109862076B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112667948B (en) * | 2020-12-30 | 2023-02-07 | 杭州天阙科技有限公司 | Data Communication Method and System Based on Fetch |
CN115562552A (en) * | 2021-06-30 | 2023-01-03 | 青岛海尔科技有限公司 | Page loading animation display method and device, storage medium and electronic equipment |
CN115052039A (en) * | 2022-05-19 | 2022-09-13 | 优刻得科技股份有限公司 | Interface information processing method, system, electronic device and medium |
CN116132221B (en) * | 2023-04-04 | 2023-08-25 | 鹏城实验室 | Virtual-real interconnection method, device, equipment and storage medium of network target range platform |
CN116700940B (en) * | 2023-08-08 | 2023-10-03 | 成都数智创新精益科技有限公司 | Request handling method, system and device based on encapsulation class and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368980A (en) * | 2012-03-26 | 2013-10-23 | 深圳市财付通科技有限公司 | Method and device for JSONP data request |
CN103678343A (en) * | 2012-09-07 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for prompting webpage loading progress |
CN108334322A (en) * | 2017-12-30 | 2018-07-27 | 方正璞华软件(武汉)股份有限公司 | A kind of data request method and system of MVC frames |
CN108667617A (en) * | 2018-05-04 | 2018-10-16 | 深圳市沃特沃德股份有限公司 | App interface anti-replay methods and server |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150172066A1 (en) * | 2013-12-13 | 2015-06-18 | Qualcomm Incorporated | Practical implementation aspects of unicast fetch for http streaming over embms |
CN104166569B (en) * | 2014-08-15 | 2017-09-22 | 北京彩云动力教育科技有限公司 | A kind of method and system of front end page loading |
US9811420B2 (en) * | 2015-03-27 | 2017-11-07 | Intel Corporation | Extracting selective information from on-die dynamic random access memory (DRAM) error correction code (ECC) |
US10582001B2 (en) * | 2015-08-11 | 2020-03-03 | Oracle International Corporation | Asynchronous pre-caching of synchronously loaded resources |
CN107426233A (en) * | 2017-08-08 | 2017-12-01 | 深圳先进技术研究院 | Data communication system, method, Web server and monitoring system based on B/S frameworks |
-
2018
- 2018-12-30 CN CN201811645217.2A patent/CN109862076B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368980A (en) * | 2012-03-26 | 2013-10-23 | 深圳市财付通科技有限公司 | Method and device for JSONP data request |
CN103678343A (en) * | 2012-09-07 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for prompting webpage loading progress |
CN108334322A (en) * | 2017-12-30 | 2018-07-27 | 方正璞华软件(武汉)股份有限公司 | A kind of data request method and system of MVC frames |
CN108667617A (en) * | 2018-05-04 | 2018-10-16 | 深圳市沃特沃德股份有限公司 | App interface anti-replay methods and server |
Also Published As
Publication number | Publication date |
---|---|
CN109862076A (en) | 2019-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109862076B (en) | Service data interaction method, device and system | |
Yadav et al. | LARAVEL: a PHP framework for e-commerce website | |
CN108346028B (en) | Business approval processing method, device and system | |
CN113344523B (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
US9201767B1 (en) | System and method for implementing a testing framework | |
CN105872083A (en) | Method and system supporting server access by different types of clients as well as server | |
JP7280388B2 (en) | Apparatus and method, equipment and medium for implementing a customized artificial intelligence production line | |
CN110704200A (en) | Methods and devices for converting invocation interfaces | |
US20120331110A1 (en) | Methods for implementing web services and devices thereof | |
CN113448578A (en) | Page data processing method, processing system, electronic device and readable storage medium | |
CN113495498A (en) | Simulation method, simulator, device, and medium for hardware device | |
CN115175183B (en) | 5G message-based authentication method and authentication device | |
WO2022237826A1 (en) | User interface testing method and system, cluster, medium, and program product | |
CN112036853A (en) | A payment method, payment method configuration method, device and equipment | |
CN111190750A (en) | Data processing method and system | |
US11934806B2 (en) | Development system and method | |
CN111865726B (en) | Service message testing method, device, computer system and storage medium | |
CN112732547B (en) | Service testing method and device, storage medium and electronic equipment | |
CN113590243A (en) | Energy enterprise project creation method and device, computer equipment and medium | |
US10936378B1 (en) | System and method for automating integration process building between multiple applications using integration assistance robots | |
CN116561013B (en) | Test methods, devices, electronic equipment and media based on the target service framework | |
CN116414387A (en) | Lightweight e-commerce mall architecture, installation method, device, equipment and medium | |
CN111415245B (en) | Account opening method and device | |
CN114817073A (en) | Automated testing methods, apparatus, equipment, media and program products | |
CN116185806A (en) | A testing method and device for a digital currency system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |