A page component calling method, device and equipment and storage medium
By creating call methods and public functions for page components in the main repository, the problem of third-party developers being unable to directly call components is solved, enabling low-cost and efficient collaborative development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2026-03-20
AI Technical Summary
In computer application development, third-party developers cannot directly call page components in the main repository, which increases operation, maintenance and communication costs and is not conducive to collaborative development and integration of applications.
A calling method is pre-created for each page component in the main repository. The calling parameters are encapsulated through a public function to respond to requests from third-party sub-repositories, directly calling the target page component and loading the component in the third-party development terminal, thus avoiding synchronous updates to the sub-repository.
It reduces operation, maintenance, and communication costs, improves the efficiency of collaborative application development, and reduces the need for multi-party collaborative communication due to component updates.
Smart Images

Figure CN115543482B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to computer application technology, in particular to a page component calling method and device, equipment and storage medium. BACKGROUND
[0002] In the process of computer application development, a component warehouse is usually set up to store page components required in the process of application development. When developing page business, page components can be directly called from the component warehouse.
[0003] In order to enrich the functions of the application, many third-party service access software are usually provided. However, the third-party developers cannot directly call the page components in the component warehouse when developing page business. The current solution is to set up a sub-warehouse for each third party, and the same page components as those in the component warehouse (also referred to as the main warehouse) are put into the sub-warehouse, or the logic code for calling the page components is written in each sub-warehouse. When the component warehouse updates the page component content, each sub-warehouse also needs to be updated synchronously, and multiple parties need to communicate with each other. The corresponding sub-warehouse developers need to manually update the page components or the logic code in the sub-warehouse to keep consistent with the page components in the component warehouse, which increases the operation and maintenance and communication costs and is not conducive to the collaborative development of the application. SUMMARY
[0004] The present application provides a page component calling method, device, equipment and storage medium to reduce the operation and maintenance and communication costs and improve the collaborative development efficiency of the application.
[0005] In a first aspect, the present application provides a page component calling method, comprising:
[0006] For each page component in the main warehouse of the application to be developed, a calling method of the page component is created;
[0007] In response to a calling request of a sub-warehouse of a third party, a target page component to be called is called according to the calling method;
[0008] The target page component is loaded on the development page of the third-party development terminal.
[0009] Optionally, for each page component in the main warehouse of the application to be developed, the calling method of the page component comprises:
[0010] The calling parameters required for calling the page component are encapsulated into a public function that can be called by the sub-warehouse of the third party, and the calling parameters include a type parameter of the page component, a calling channel parameter of the page component and a business parameter of the page component.
[0011] Optionally, the public function is a JS-SDK function.
[0012] Optionally, the calling request includes a calling parameter of a page component to be called, and the target page component to be called is called according to the calling method in response to the calling request of the third-party sub-repository, and the method comprises the following steps of:
[0013] The calling parameter of the page component to be called is parsed from the calling request of the third-party sub-repository;
[0014] The public function of the page component to be called is triggered based on the calling parameter;
[0015] The public function is opened to call the target page component to be called.
[0016] Optionally, the target page component to be called is called according to the calling method, and the method further comprises the following steps of:
[0017] The target business corresponding to the target page component is determined based on the business parameter in the calling parameter;
[0018] It is judged whether the target business is valid;
[0019] If the target business is valid, the target page component to be called is called according to the calling method;
[0020] If the target business is invalid, the calling is stopped.
[0021] Optionally, the target page component is loaded in the development page of the third-party development terminal, and the method comprises the following steps of:
[0022] The window.open is called to create a target page parallel to the current development page in the third-party development terminal;
[0023] The target page component is loaded in the target page.
[0024] Optionally, after the target page component is loaded in the target page, the method further comprises the following steps of:
[0025] In response to a business operation of the third-party developer on the target page component, a business process is performed, and a business state is updated;
[0026] A cross-window communication method is called to synchronize the business state to the sub-repository, and the target page is closed.
[0027] In a second aspect, the application further provides a page component calling device, which comprises:
[0028] The calling method creation module is configured to create a calling method of each page component in the main warehouse of the application to be developed.
[0029] The component calling module is configured to call a target page component to be called according to the calling method in response to a calling request of the sub-warehouse of the third party.
[0030] The component loading module is configured to load the target page component on a development page of the third-party development terminal.
[0031] In a third aspect, the present application further provides an electronic device, comprising:
[0032] One or more processors;
[0033] A memory configured to store one or more programs;
[0034] When the one or more programs are executed by the one or more processors, the one or more processors implement the page component calling method provided in the first aspect of the present application.
[0035] In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the page component calling method provided in the first aspect of the present application.
[0036] The page component calling method provided by the present application creates a calling method of each page component in the main warehouse of the application to be developed in advance, and calls a target page component to be called according to the calling method in response to a calling request of the sub-warehouse of the third party when the third party needs to call the page component in the main warehouse. The target page component is loaded on a development page of the third-party development terminal, without the need to put the page component in the main warehouse into the sub-warehouse, and without the need to update the sub-warehouse synchronously when the page component in the main warehouse is updated, but only to update the calling method, thereby reducing the operation and maintenance and communication costs and improving the collaborative development efficiency of the application.
[0037] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0039] Figure 1 A main interaction schematic diagram in an application development process;
[0040] Figure 2 A flow chart of a page component calling method provided by an embodiment of the present application;
[0041] Figure 3 A page component calling logic diagram;
[0042] Figure 4 A page component calling logic diagram provided by an embodiment of the present application;
[0043] Figure 5 A structural schematic diagram of a page component calling device provided by an embodiment of the present application;
[0044] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the personnel in the art without creative labor should belong to the protection scope of the present application.
[0046] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0047] Page component: an independent, business-level unit constituting a page, and a complete page can be split into multiple page components.
[0048] JS-SDK: Java Script Software Development Kit, is the application service platform provided to the third party developer development kit, for the developer to quickly call the ability of the service platform open to the outside, including unified encapsulation maintenance gateway, business general interface method, etc., to solve the complexity of each business call.
[0049] Event Center: global message center, can communicate across windows.
[0050] window.open: used to open a new page or find a named page.
[0051] Figure 1 For a kind of main interaction schematic diagram in application development process, as shown in Figure 1 In the application development process, three subjects are involved, which are main development terminal for main program developer, service platform of application and third party development terminal for third party developer. The "third party" in the embodiment of the application is relative to main development terminal and service platform. The main warehouse and multiple sub-warehouses are provided on the service platform, and each third party is provided with a warehouse. The main warehouse stores the page components required for developing core business, and each sub-warehouse stores the page components required for developing additional business of the third party. The main development terminal can directly call the page components in the main warehouse, and the third party development terminal can directly call the page components in the sub-warehouse, but the third party development terminal cannot directly call the page components in the main warehouse.
[0052] The third party often needs to use the page components in the main warehouse in the development process, and since the third party cannot directly call, the same page components as in the main warehouse are usually put into the sub-warehouse to indirectly realize the call. As described above, in order to keep the page components in the sub-warehouse and the main warehouse consistent, the page components in the sub-warehouse need to be manually updated frequently, which increases the operation and maintenance and communication costs, and is not conducive to the collaborative development of the application.
[0053] In view of the above problems, the page component calling method provided by the embodiment of the application creates a page component calling method for each page component in the main warehouse in advance, and when the third party needs to call the page component in the main warehouse, the page component in the main warehouse can be called according to the calling method. Figure 2 The flowchart of the page component calling method provided by the embodiment of the application can be applied to the case that the third party calls the page component in the main warehouse in the application development process, and the method can be executed by the page component calling device provided by the embodiment of the application. The device can be realized by software and / or hardware, and is usually configured in an electronic device, such asFigure 2 As shown, the page component calling method specifically includes the following steps:
[0054] S101, for each page component in the main warehouse of the to-be-developed application, a calling method of the page component is created.
[0055] In the embodiment of the application, for each page component in the main warehouse of the to-be-developed application, a calling method of the page component is created in advance. The calling method refers to a method for calling the page component by a third party. When the third party needs to call the page component in the main warehouse, the calling method can be executed to realize the calling of the page component.
[0056] In some embodiments of the application, the calling parameters required for calling the page component are encapsulated into a public function that can be called by the sub-warehouse of the third party, for the third party to call. The calling parameters include a type parameter of the page component, a calling channel parameter of the page component and a business parameter of the page component. For example, in some embodiments of the application, the public function can be a JS-SDK function.
[0057] In some embodiments of the application, the type parameter in the calling parameter represents the type of the page component, including a navigation class (a component for navigation information), an input class (a component used when a user inputs information), and an information class (a component for delivering information to a user). The calling channel parameter in the calling parameter represents what channel the page component can be called by, for example, an application or a micro application (also known as a light application or a small program). The business parameter in the calling parameter represents the content that needs to be involved when processing the page business, for example, for a multi-person file signing component, the business parameter can include: how many people need to sign the file, the file ID to be signed, etc. In this way, when the multi-person file signing component is called, the corresponding to-be-signed file can be found according to the file ID to be signed, and the to-be-signed file is opened and displayed for the signer to sign. It should be noted that the embodiment of the application describes the business parameter of the multi-person file signing component, and in other embodiments of the application, it can also be other business components, for example, a face recognition authentication component, a map component, etc. Correspondingly, the business parameter is the content related to the business, which will not be described herein.
[0058] S102, in response to the calling request of the sub-warehouse of the third party, calling the target page component to be called according to the calling method.
[0059] In the embodiment of the application, when the third-party developer wants to call the page component in the main warehouse, the third-party sub-warehouse sends a calling request to the service platform, and the service platform calls the target page component to be called according to the calling method in response to the calling request of the third-party sub-warehouse.
[0060] Figure 3A page component calling logic diagram is provided for an embodiment of the present application, Figure 4 A page component calling logic diagram is provided for an embodiment of the present application, as shown in Figure 3 The conventional solution is to write logic code for calling a page component in each sub-warehouse. When a sub-warehouse needs to call a page component in the main warehouse, the corresponding logic code needs to be called to realize the calling of the page component. When the main warehouse updates the content of the page component, each sub-warehouse also needs to be updated synchronously, and multiple parties need to communicate. The developers of the corresponding sub-warehouse need to manually update the logic code of the sub-warehouse, increasing the operation and maintenance and communication costs, and being not conducive to the collaborative development of the application. As shown in Figure 4 The embodiment of the present application precreates a calling method (for example, a public JS-SDK function) of the page component in the main warehouse for third-party calling. When the third party needs to call the page component in the main warehouse, the calling method can be executed to realize the calling of the page component. The page component in the main warehouse does not need to be placed in the sub-warehouse, and when the page component in the main warehouse is updated, the logic code of all sub-warehouses does not need to be updated synchronously. Only the public calling method needs to be updated uniformly, reducing the operation and maintenance and communication costs and improving the collaborative development efficiency of the application.
[0061] For example, in the embodiment of the present application, the calling request includes the calling parameters of the page component to be called, and step S102 includes the following sub-steps in response to the calling request of the third-party sub-warehouse:
[0062] 1. The calling parameters of the page component to be called are parsed from the calling request of the third-party sub-warehouse.
[0063] After receiving the calling request of the third-party sub-warehouse, the calling request is parsed to parse the calling parameters of the page component to be called from the calling request. As described above, the calling parameters can include the type parameters of the page component, the calling channel parameters of the page component, and the business parameters of the page component, and the calling parameters can be used to determine the page component to be called.
[0064] 2. The public function of the page component to be called is invoked based on the calling parameters.
[0065] For example, the public function with the same calling parameters is found from all public functions according to the received calling parameters, and the public function is invoked.
[0066] 3. The public function is opened to call the target page component to be called.
[0067] For example, the public function is opened, and the method of the public function is executed to call the target page component to be called.
[0068] In some embodiments of the present application, before calling the target page component, it can also be judged whether the target business corresponding to the target page component is valid. If it is valid, the target page component is continued to be called. If it is invalid, the calling is stopped to avoid invalid calling and improve the calling efficiency and save the computing resource overhead.
[0069] For example, in the embodiments of the present application, the target business corresponding to the target page component can be determined based on the business parameter in the calling parameter. For example, if the business parameter includes a to-be-signed file ID, the target business is a file signing business. After the target business is determined, it is judged whether the target business is valid according to the state of the target business. For example, if the target business is in execution, has been referenced, or has expired, it is determined that the target business is invalid. If the target business is valid, the target page component to be called is called according to the calling method. The specific calling process has been described in detail in the foregoing embodiments, and will not be described here again. If the target business is invalid, the calling is stopped.
[0070] S103, loading the target page component on the development page of the third-party development terminal.
[0071] In the embodiments of the present application, after the target page component is called, the target page component is loaded on the development page of the third-party development terminal, so that the third-party developer can operate the target page component on the third-party development terminal to complete the page business development. In the embodiments of the present application, one calling request can call one or more target page components, and multiple target page components can be loaded on the development page of the third-party development terminal at the same time, which is not limited in the present application.
[0072] In some embodiments of the present application, the application to be developed is a single-page application, which is an application program with only one Web page. The single-page application loads a single HTML page and dynamically updates the page when the user interacts with the application program. The single-page application program responds to the calling request from the application program, calls the page component, and refreshes the current page to load the called page component on the current page. For the calling request from the third party, the called page component cannot be loaded on the current page, so a new page needs to be opened and the called page component needs to be loaded into the new page. In the embodiments of the present application, a new target page parallel to the current development page can be opened, and the target page component can be loaded in the blank target page. For example, in the embodiments of the present application, the window.open method can be called to open a new page as the target page.
[0073] In some embodiments of the present application, after the target page component is loaded in the target page, the method further includes:
[0074] 1. In response to a business operation of the third-party developer to the target page component, performing business processing and updating the business state.
[0075] After the target page component is loaded in the target page, the third-party developer can operate the target page component. The service platform performs business processing and updates the business state in response to the business operation. Exemplarily, the business operation and the business processing are different according to different businesses, and the embodiments of the present application are not limited thereto, for example, for a file signing business, the business operation can be signing, and the business processing can be verifying the signature, for a face recognition business, the business operation can be calling the camera to collect the face image, and the business processing can be verifying the face image.
[0076] 2. Calling a cross-window communication method to synchronize the business state to the sub-repository and closing the target page.
[0077] As described above, in the embodiments of the present application, a new target page parallel to the current development page is opened, and the target page component is loaded in the blank target page. Since the operation completed in the target page causes the business state to be unable to be synchronized to the business in the sub-repository, the embodiments of the present application call the cross-window communication method to synchronize the business state to the sub-repository and close the target page. Exemplarily, the embodiments of the present application call the Event Center to perform cross-window data communication, synchronize the business state after the operation in the target page is completed to the business in the sub-repository in time, complete the closed-loop operation of the page component calling, so that the third-party developer can continue to perform subsequent business operations based on the updated business state.
[0078] The page component calling method provided by the embodiments of the present application pre-creates a calling method of the page component for each page component in the main repository of the application to be developed, and in response to the calling request of the sub-repository of the third party when the third party needs to call the page component in the main repository, the calling method is called to call the target page component to be called, and the target page component is loaded in the development page of the third-party development terminal, without the need to put the page component in the main repository into the sub-repository, and when the page component in the main repository is updated, there is no need to update the sub-repository in synchronization, only the calling method needs to be updated, thereby reducing the operation and maintenance and communication costs and improving the collaborative development efficiency of the application.
[0079] The embodiments of the present application also provide a page component calling device, Figure 5 A structural schematic diagram of the page component calling device provided by the embodiments of the present application is shown in Figure 5 As shown in the figure, the page component calling device comprises:
[0080] The calling method creating module 201 is configured to create a calling method for each page component in the main warehouse of the application to be developed.
[0081] The component calling module 202 is configured to call a target page component to be called according to the calling method in response to a calling request of a sub-warehouse of a third party.
[0082] The component loading module 203 is configured to load the target page component on a development page of the development terminal of the third party.
[0083] In some embodiments of the present application, the calling method creating module 201 comprises:
[0084] The public function encapsulating sub-module is configured to encapsulate calling parameters required for calling the page component into a public function that can be called by the sub-warehouse of the third party, wherein the calling parameters comprise a type parameter of the page component, a calling channel parameter of the page component and a business parameter of the page component.
[0085] In some embodiments of the present application, the public function is a JS-SDK function.
[0086] In some embodiments of the present application, the component calling module 202 comprises:
[0087] The calling parameter analyzing sub-module is configured to analyze calling parameters of a page component to be called from a calling request of a sub-warehouse of a third party.
[0088] The function invoking sub-module is configured to invoke a public function of a page component to be called based on the calling parameters.
[0089] The function opening sub-module is configured to open the public function to call a target page component to be called.
[0090] In some embodiments of the present application, the component calling module 202 further comprises:
[0091] The target business determining sub-module is configured to determine a target business corresponding to the target page component based on a business parameter in the calling parameters.
[0092] The judging sub-module is configured to judge whether the target business is valid.
[0093] The calling sub-module is configured to call a target page component to be called according to the calling method if the target business is valid.
[0094] The stopping calling sub-module is configured to stop calling if the target business is invalid.
[0095] In some embodiments of the present application, the component loading module 203 comprises:
[0096] a page creation submodule configured to call window.open to create a target page in parallel with a current development page in the third-party development terminal;
[0097] a component loading submodule configured to load the target page component in the target page.
[0098] In some embodiments of the present application, the page component calling apparatus further comprises:
[0099] a state updating module configured to, after loading the target page component in the target page, perform business processing and update a business state in response to a business operation of the third-party developer on the target page component;
[0100] a state synchronization module configured to call a cross-window communication method to synchronize the business state to the sub-repository and close the target page.
[0101] The page component calling apparatus described above can execute the page component calling method provided in the embodiments of the present application, and has the corresponding functional modules and beneficial effects of the page component calling method.
[0102] The embodiments of the present application also provide an electronic device, which is equipped with the service platform described in the foregoing embodiments, Figure 6 A structural schematic diagram of an electronic device provided in the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0103] As Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected to the at least one processor 11 in communication. The memory stores a computer program executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0104] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0105] The processor 11 can be various general and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the page component invocation method.
[0106] In some embodiments, the page component invocation method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the page component invocation method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the page component invocation method by any other appropriate means, such as by means of firmware.
[0107] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0108] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program
[0109] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0110] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0111] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.
[0112] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0113] The embodiments of the present application further provide a computer program product, comprising a computer program which, when executed by a processor, implements the page component calling method provided by any of the embodiments of the present application.
[0114] The computer program code can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce the computer implemented process such that the
[0115] It should be understood that the various forms of flow shown in the figures are illustrative examples of implementing the steps of the application. Several of the steps have been expanded to show the various constituent database, application, and process steps used to implement the examples. Other steps have been simplified to more clearly and concisely illustrate main points. The ordering of steps is not essential. For example, some steps can be performed in an order different from that shown or can be performed concurrently. Further, in some instances, less than all the benefits of a particular step can be achieved and still be within the scope and spirit of the application. One of ordinary skill in the art will appreciate the various functions performed by the various units and elements of the figures and the executive, database, and communication steps in the claims as being equivalent to corresponding functions in other blocks and steps. For the sake of brevity and clarity, only the most significant, novel, and non- obvious aspects of the application are described.
[0116] The detailed description contained herein does not limit the scope of the application. One skilled in the art will recognize that the application can be practiced with modification and alteration, and that the application should be limited only by the scope of the appended claims. Furthermore, the disclosure is to be construed as illustrative only and is for the purpose of teaching those skilled in the art the best practices of the application. The disclosure is not intended to be exhaustive or to show all possible forms of the application. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can be practiced with the application as disclosed herein.
Claims
1. A method for invoking page components, characterized in that, include: For each page component in the main repository of the application to be developed, create a calling method for that page component; wherein, the calling method refers to a method by which a third party calls the page component; In response to a call request from a third-party sub-repository, the target page component to be called is invoked according to the invocation method. The target page component is loaded on the development page of the third-party development terminal; Specifically, creating a calling method for each page component in the main repository of the application to be developed includes: The calling parameters required to invoke the page component are encapsulated into a public function that can be invoked by a third-party sub-repository. The calling parameters include the type parameter of the page component, the calling channel parameter of the page component, and the business parameter of the page component. The invocation request includes invocation parameters of the page component to be invoked. In response to an invocation request from a third-party sub-repository, the target page component to be invoked is invoked according to the invocation method, including: Parse the call parameters of the page component to be called from the call request of the third-party sub-repository; The public function of the page component to be invoked is called based on the aforementioned call parameters; Open the public function to invoke the target page component to be invoked.
2. The page component invocation method according to claim 1, characterized in that, The public functions are JS-SDK functions.
3. The page component invocation method according to claim 1, characterized in that, The method for invoking the target page component to be invoked also includes: The target business corresponding to the target page component is determined based on the business parameters in the call parameters; Determine whether the target service is valid; If the target business is valid, then the target page component to be invoked is invoked according to the invocation method; If the target service fails, the call will be stopped.
4. The page component invocation method according to any one of claims 1-3, characterized in that, Loading the target page component on the development page of the third-party development terminal includes: Call window.open to create a new target page in the third-party development terminal that runs parallel to the current development page; Load the target page component in the target page.
5. The page component invocation method according to claim 4, characterized in that, After loading the target page component into the target page, the method further includes: In response to business operations performed by third-party developers on the target page components, perform business processing and update the business status; Invoke the cross-window communication method to synchronize the business status to the sub-repository, and close the target page.
6. A page component invocation device, characterized in that, include: The method invocation creation module is used to create an invocation method for each page component in the main repository of the application to be developed; wherein, the invocation method refers to a method by which a third party invokes the page component; The component invocation module is used to respond to invocation requests from third-party sub-repositories and invoke the target page component to be invoked according to the invocation method. A component loading module is used to load the target page component on the development page of the third-party development terminal; The method creation module includes: The public function encapsulation submodule is used to encapsulate the calling parameters required to call the page component into a public function that can be called by a third-party sub-repository. The calling parameters include the type parameter of the page component, the calling channel parameter of the page component, and the business parameter of the page component. The component invocation module includes: The parameter parsing submodule is used to parse the call parameters of the page component to be called from the call request of the third-party sub-repository; The function invocation submodule is used to invoke the public function of the page component to be invoked based on the invocation parameters; The function opens a submodule, which is used to open the public function to call the target page component to be called.
7. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the page component invocation method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the page component invocation method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method and device for multiplexing components among multiple applications
CN113760264A