Template processing method and device for single-page application, electronic equipment and storage medium
By building dynamic basic paths and business unit routing paths in a single page application and splicing them together to form a target project deployment path, the problem that the existing routing design does not conform to business logic is solved, and a more intuitive and maintainable routing structure and cross-conference resource sharing is achieved.
Patent Information
- Application Number
- CN202411564643.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-25
AI Technical Summary
The routing design of existing single-page applications has limitations when performing template processing, especially when reflecting the organizational structure and data model of the meeting, it does not conform to the business logic, resulting in the routing structure being unintuitive, difficult to maintain, and is not conducive to resource sharing across meetings.
By building the dynamic basic path and business unit routing path of the project deployment path and splicing them together, a target project deployment path for a single page application is formed. The dynamic basic path is located in front of the business unit routing path, and year and location are the primary routing parameters.
It realizes a more intuitive routing structure, conforms to business logic, reduces code redundancy, improves code maintainability, and supports cross-conference resource sharing and management.
Smart Images

Figure CN119520495A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer application technology, and in particular to a template processing method, device, electronic device and storage medium for single-page application. Background Art
[0002] In existing single-page application (SPA) development, the implementation based on the History routing mode usually defines multiple fixed routing paths. Each route corresponds to a specific template file, which is used to render the corresponding page content. However, when the entire application needs to be templated, the existing routing design method has some limitations.
[0003] Take the conference management system as an example. The company holds multiple conferences of the same brand at different locations every year. Each conference contains the same business unit, such as lecturers, topics or issues. The common practice in the industry is to add parameters such as year and location information after the original route. This method has the following problems: the business unit is given the highest priority for the route, while the year and location information are placed in a secondary position, which is inconsistent with the actual business logic; because in reality, the conferences held in each place every year are independent and isolated from each other, and usually correspond to a new meeting record in the database. The routing structure is not intuitive enough and it is difficult to reflect the hierarchical relationship and organizational structure of the conference. When new filtering dimensions need to be added, the routing becomes lengthy and difficult to maintain. Because each business unit is bound to a specific year and location, it is not conducive to resource sharing and management across conferences. These problems reduce the scalability and maintainability of the system, and are also not conducive to users' understanding and use of the system.
[0004] Therefore, how to manage routing is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The embodiments of the present invention provide a template processing method, device, electronic device and storage medium for a single-page application, so as to realize the use of year and location as primary routing parameters, better reflect the organizational structure and data model of the meeting, and be more in line with business logic; the routing structure of the project deployment path is clearer, code redundancy is reduced, and the maintainability of the code is improved.
[0006] In a first aspect, an embodiment of the present invention provides a template processing method for a single-page application, including:
[0007] Constructing a dynamic basic path of a project deployment path; wherein the dynamic basic path is a dynamic routing path;
[0008] Construct the business unit routing path of the project deployment path;
[0009] The dynamic basic path is concatenated with the business unit routing path to obtain the target project deployment path of the single-page application; wherein the dynamic basic path is located in front of the business unit routing path.
[0010] In a second aspect, an embodiment of the present invention further provides a template processing device for a single-page application, including:
[0011] A dynamic routing path construction module, used to construct a dynamic basic path of a project deployment path; wherein the dynamic basic path is a dynamic routing path;
[0012] Static routing path building module, used to build the business unit routing path of the project deployment path;
[0013] The routing path template module is used to splice the dynamic basic path with the business unit routing path to obtain the target project deployment path of the single-page application; wherein the dynamic basic path is located in front of the business unit routing path.
[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] A storage device for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the template processing method for the single-page application described in any embodiment of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the template processing method for a single-page application as described in any embodiment of the present invention.
[0019] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the template processing method for a single-page application as described in any embodiment of the present invention.
[0020] The embodiment of the present invention provides a template processing method, device, electronic device and storage medium for a single-page application, by constructing a dynamic basic path of a project deployment path; wherein the dynamic basic path is a dynamic routing path; constructing a business unit routing path of the project deployment path; splicing the dynamic basic path with the business unit routing path to obtain a target project deployment path of the single-page application. The technical solution of the embodiment of the present invention is adopted, and the year and location are used as the primary routing parameters, which better reflects the organizational structure and data model of the meeting and is more in line with the business logic; the routing structure of the project deployment path is clearer, code redundancy is reduced, and the maintainability of the code is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:
[0022] Figure 1 It is a flow chart of a template processing method for a single-page application provided in the first embodiment of the present invention;
[0023] Figure 2 is a flow chart of a template processing method for a single-page application provided in Embodiment 2 of the present invention;
[0024] Figure 3 It is a structural schematic diagram of a template processing device for a single-page application provided in Embodiment 3 of the present invention;
[0025] Figure 4 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0027] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0028] Among them, the acquisition, storage, use and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components or models may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0030] Embodiment 1
[0031] Figure 1 This is a flow chart of a template processing method for a single-page application provided in an embodiment of the present invention. This embodiment is applicable to the case where a routing path of a single-page application is templated. The method of this embodiment can be executed by a template processing device for a single-page application, and the device can be implemented in hardware and / or software. The device can be configured in a server for template processing of a single-page application. The method specifically includes the following steps:
[0032] S110. Build a dynamic basic path for the project deployment path.
[0033] The project deployment path may refer to the deployment path of the project or the root directory of the project. According to the project deployment path, resource files and configuration files in the project may be accessed and operations such as file upload may be processed.
[0034] The dynamic basic path may refer to a basic routing path that can be dynamically adjusted when constructing a project deployment path. It is a dynamic routing path, which can make a set of functions reused infinitely after being made dynamic; wherein, the dynamic keywords include but are not limited to year and location. For example, taking the conference management system as an example, to construct a dynamic basic path of the project deployment path of a lecturer meeting at time A and location B, the dynamic keywords are time A and location B; the dynamic basic path can be expressed as: / :year / :location / .
[0035] S120: Construct a business unit routing path for the project deployment path.
[0036] Among them, the business unit routing path may refer to the routing path constructed for the business unit of the project; the business unit routing path is a static routing path. Taking the conference management system as an example, the business units include but are not limited to topics, lecturers, and agendas. For example, the routing path of the lecturer business unit can be expressed as: / speaker / :id, the routing path of the topic business unit can be expressed as: / topic / :i, and the routing path of the agenda business unit can be expressed as: / lecture / :id. After constructing the static business unit routing path, the constructed business unit routing path can be directly used in subsequent use, realizing unlimited reuse with one-time setting.
[0037] S130: Concatenate the dynamic basic path and the business unit routing path to obtain the target project deployment path of the single-page application.
[0038] Among them, Single Page Application (SPA) is a modern web application architecture, which loads all functions and contents of the entire application into a single HTML page, and responds to user operations by dynamically updating the page content. In the embodiment of the present invention, operations are performed in the single page application to obtain the target project deployment path of a specific business unit; and the corresponding page content is rendered according to the target project deployment path.
[0039] The project deployment path is obtained by concatenating the dynamic basic path and the business unit routing path. According to the dynamic keywords and business units of the single-page application, the dynamic basic path and the business unit routing path are constructed, and then concatenated to obtain the target project deployment path of the single-page application. Among them, the dynamic basic path is located in front of the business unit routing path. For example, the target project deployment path of the lecturer page can be expressed as: / :year / :location / speaker / :id, the target project deployment path of the special topic page can be expressed as: / :year / :location / topic / :id, and the target project deployment path of the topic page can be expressed as: / :year / :location / lecture / :id.
[0040] The embodiment of the present invention provides a template processing method for a single-page application, by constructing a dynamic basic path of a project deployment path; wherein the dynamic basic path is a dynamic routing path; constructing a static business unit routing path of the project deployment path; splicing the dynamic basic path with the business unit routing path to obtain a target project deployment path of the single-page application; wherein the dynamic basic path is located in front of the business unit routing path. The technical solution of the embodiment of the present invention is adopted, and the year and location are used as the primary routing parameters, which better reflects the organizational structure and data model of the meeting and is more in line with the business logic; the routing structure of the project deployment path is clearer, code redundancy is reduced, and the maintainability of the code is improved.
[0041] Embodiment 2
[0042] Figure 2 The following is a flow chart of a template processing method for a single-page application provided in an embodiment of the present invention. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the template processing method for a single-page application provided in an embodiment of the present invention may include the following steps:
[0043] S210. Build a dynamic basic path for the project deployment path.
[0044] In the embodiment of the present invention, a conference management system is taken as an example to construct project deployment paths for various conference projects.
[0045] As an optional but non-limiting implementation, the dynamic base path of the construction project deployment path includes:
[0046] Dynamic basic paths for different project deployment paths are constructed by dynamically modifying dynamic keywords in the dynamic basic path; wherein the dynamic basic path is composed of dynamic keywords, and the dynamic keywords include year and location.
[0047] Among them, since the same type of meetings may be held at different times or different locations, when constructing the project deployment path of the meeting, dynamic basic paths can be constructed for different times or different locations; dynamic basic paths for different project deployment paths can be constructed by dynamically modifying the dynamic keywords in the dynamic basic path.
[0048] In an optional scheme of an embodiment of the present invention, after the dynamic basic path is made dynamic, the dynamic basic path can be reused indefinitely; for example, when constructing a project target deployment path at the same time and location, the constructed dynamic basic path can be reused without modifying the existing routing structure, thereby improving the scalability of the system.
[0049] S220: Construct a business unit routing path for the project deployment path.
[0050] Among them, the business unit routing path is a fixed routing path in the project deployment path, which is a static routing path.
[0051] As an optional but non-limiting implementation, the business unit routing path of building the project deployment path includes but is not limited to steps B1-B2:
[0052] Step B1: construct a storage unit for a service unit routing path; wherein the service unit routing path is a static routing path.
[0053] Step B2: Use the constructed business unit routing path as a business unit template and save it to the storage unit.
[0054] Among them, a storage unit is constructed for the business unit routing path, and the business unit routing path is used as a business unit template and saved in the storage unit. When constructing the corresponding project deployment path, the corresponding business unit routing path can be directly selected from the storage unit. For example, when constructing the project deployment path of the special meeting, the corresponding special business unit routing path can be directly selected from the storage unit.
[0055] S230: Concatenate the dynamic basic path with the business unit routing path to obtain the target project deployment path of the single-page application.
[0056] Among them, the target project deployment path of the single-page application is composed of the dynamic basic path and the static business unit routing path, with the dynamic basic path in front and the business unit routing path in the back, which can be expressed as dynamic basic path + business unit routing path.
[0057] As an optional but non-limiting implementation, the dynamic basic path is concatenated with the business unit routing path to obtain the target project deployment path of the single-page application. The method includes but is not limited to steps C1-C2:
[0058] Step C1: Get the dynamic keywords of the single-page application to be processed, and build a dynamic basic path for the project deployment path.
[0059] Step C2: concatenate the dynamic basic path with the corresponding business unit routing path to obtain the target project deployment path of the single-page application.
[0060] Among them, since the keywords in the project deployment path of the single-page application are dynamically changing, while the business unit is unchanged, it is necessary to determine the dynamic keywords of the single-page application to be processed and build a dynamic basic path for the project deployment path; obtain the corresponding business unit routing path from the storage unit for splicing to obtain the target project deployment path of the single-page application.
[0061] The target project deployment path constructed in the embodiment of the present invention is composed of a dynamic basic path and a business unit routing path. The structure is more intuitive, and users can quickly understand the currently browsed meeting information, which enhances the user experience; it can more easily realize cross-conference resource sharing and comparison; it can easily handle multi-level dynamic parameters, adapt to complex business needs, and has higher flexibility.
[0062] S240: Verify the target dynamic keyword in the deployment path of the single-page application target project to determine whether specific information contained in the target dynamic keyword is correct.
[0063] Among them, after building the target project deployment path of the single-page application, the target dynamic keyword in the target project deployment path needs to be verified to determine whether the target dynamic keyword is correct. For example, the specific information time of the dynamic keyword in the dynamic basic path is verified. Since the time is a number, if the dynamic keyword in the dynamic basic path is not a number, it can be determined that the specific information contained in the target dynamic keyword is incorrect; if the dynamic keyword in the dynamic basic path is a number, then continue to check whether the specific number in the dynamic keyword is correct.
[0064] S250: If the specific information contained in the target dynamic keyword is incorrect, return to the dynamic basic path construction page and reconstruct the target dynamic keyword.
[0065] Among them, when verifying the dynamic keyword time in the dynamic basic path, if it is determined that the dynamic keyword in the dynamic basic path is not a number or the number is incorrect, return to the dynamic basic path construction page and re-edit the dynamic keyword time to construct the correct dynamic basic path.
[0066] The embodiment of the present invention provides a template processing method for a single-page application, by constructing a dynamic basic path of a project deployment path; constructing a business unit routing path of the project deployment path; splicing the dynamic basic path with the business unit routing path to obtain a target project deployment path of the single-page application; verifying the target dynamic keyword in the target project deployment path of the single-page application to determine whether the specific information contained in the target dynamic keyword is correct; if the specific information contained in the target dynamic keyword is incorrect, returning to the dynamic basic path construction page and reconstructing the target dynamic keyword. By adopting the technical solution of the embodiment of the present invention, the time or place of the same type of meeting can be easily added without modifying the existing routing structure, thereby improving the scalability of the system; the routing structure of the project deployment path is clearer, code redundancy is reduced, and the maintainability of the code is improved.
[0067] Embodiment 3
[0068] Figure 3 This is a schematic diagram of the structure of a template processing device for a single-page application provided in an embodiment of the present invention. The technical solution of this embodiment can be applied to the case of template processing of the routing path of a single-page application. The device can be implemented by software and / or hardware and is generally integrated on any electronic device with network communication function, including but not limited to: servers, computers, personal digital assistants and other devices. Figure 3 As shown, the template processing device for a single-page application provided in this embodiment may include: a dynamic routing path construction module 310, a static routing path construction module 320 and a routing path template module 330; wherein,
[0069] A dynamic routing path building module 310 is used to build a dynamic basic path of a project deployment path; wherein the dynamic basic path is a dynamic routing path;
[0070] A static routing path construction module 320 is used to construct a business unit routing path of a project deployment path;
[0071] The routing path template module 330 is used to splice the dynamic basic path with the business unit routing path to obtain the target project deployment path of the single-page application; wherein the dynamic basic path is located in front of the business unit routing path.
[0072] Based on the above embodiment, optionally, the dynamic routing path construction module is specifically used to:
[0073] Dynamic basic paths for different project deployment paths are constructed by dynamically modifying dynamic keywords in the dynamic basic path; wherein the dynamic basic path is composed of dynamic keywords, and the dynamic keywords include year and location.
[0074] Based on the above embodiment, optionally, the static routing path construction module is specifically used to:
[0075] A storage unit for constructing a service unit routing path; wherein the service unit routing path is a static routing path;
[0076] The constructed business unit routing path is used as a business unit template and saved in a storage unit.
[0077] Based on the above embodiment, optionally, the routing path template module is specifically used for:
[0078] Get the dynamic keywords of the single-page application to be processed and build the dynamic basic path of the project deployment path;
[0079] The dynamic basic path is concatenated with the corresponding business unit routing path to obtain the target project deployment path of the single-page application.
[0080] Based on the above embodiment, optionally, the device further includes a verification module, which is specifically used to:
[0081] Verify the target dynamic keyword in the deployment path of the single-page application target project to determine whether the specific information contained in the target dynamic keyword is correct;
[0082] If the specific information contained in the target dynamic keyword is incorrect, return to the dynamic basic path construction page and rebuild the target dynamic keyword.
[0083] The template processing device for a single-page application provided in an embodiment of the present invention can execute the template processing method for a single-page application provided in any of the above-mentioned embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the template processing method for a single-page application. For detailed processes, please refer to the relevant operations of the template processing method for a single-page application in the above-mentioned embodiments.
[0084] Embodiment 4
[0085] Figure 41 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, 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 merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0086] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, 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 the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. 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.
[0087] A number 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, speakers, etc.; a storage unit 18, such as a 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.
[0088] The processor 11 may be a variety of general and / or special processing components with 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 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 executes the various methods and processes described above, such as the template processing method of a single-page application.
[0089] In some embodiments, the template processing method for a single-page application may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the template processing method for a single-page application described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the template processing method for a single-page application in any other appropriate manner (e.g., by means of firmware).
[0090] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0092] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0093] To provide interaction with a user, the systems and techniques described herein may 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 trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0094] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may 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), a blockchain network, and the Internet.
[0095] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0096] Embodiment 5
[0097] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the template processing method for a single-page application as provided in any embodiment of the present application.
[0098] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0099] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0100] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A template processing method for a single-page application, characterized in that: The method comprises: Constructing a dynamic basic path of a project deployment path; wherein the dynamic basic path is a dynamic routing path; constructing a business unit routing path of a project deployment path; wherein the business unit routing path is a static routing path; The dynamic basic path is concatenated with the business unit routing path to obtain the target project deployment path of the single-page application; wherein the dynamic basic path is located in front of the business unit routing path.
2. The method according to claim 1, characterized in that The dynamic base path of the construction project deployment path includes: Dynamic basic paths for different project deployment paths are constructed by dynamically modifying dynamic keywords in the dynamic basic path; wherein the dynamic basic path is composed of dynamic keywords, and the dynamic keywords include year and location.
3. The method according to claim 1, characterized in that The business unit routing path for constructing the project deployment path includes: A storage unit that builds a routing path for a business unit; The constructed business unit routing path is used as a business unit template and saved in a storage unit.
4. The method according to claim 1, characterized in that: The method of splicing the dynamic basic path with the business unit routing path to obtain the target project deployment path of the single-page application includes: Get the dynamic keywords of the single-page application to be processed and build the dynamic basic path of the project deployment path; The dynamic basic path is concatenated with the corresponding business unit routing path to obtain the target project deployment path of the single-page application.
5. The method according to claim 1, characterized in that After the dynamic basic path is concatenated with the business unit routing path to obtain the target project deployment path of the single-page application, the method further includes: Verify the target dynamic keyword in the deployment path of the single-page application target project to determine whether the specific information contained in the target dynamic keyword is correct; If the specific information contained in the target dynamic keyword is incorrect, return to the dynamic basic path construction page and rebuild the target dynamic keyword.
6. A template processing device for a single-page application, characterized in that: The device comprises: A dynamic routing path construction module, used to construct a dynamic basic path of a project deployment path; wherein the dynamic basic path is a dynamic routing path; Static routing path building module, used to build the business unit routing path of the project deployment path; The routing path template module is used to splice the dynamic basic path with the business unit routing path to obtain the target project deployment path of the single-page application; wherein the dynamic basic path is located in front of the business unit routing path.
7. The device according to claim 6, characterized in that The dynamic routing path construction module is specifically used for: Dynamic basic paths for different project deployment paths are constructed by dynamically modifying dynamic keywords in the dynamic basic path; wherein the dynamic basic path is composed of dynamic keywords, and the dynamic keywords include year and location.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing 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 template processing method for a single-page application as described in any one of claims 1-5.
9. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the template processing method for a single-page application as described in any one of claims 1-5.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the template processing method for a single-page application according to any one of claims 1 to 5.