A method for switching pages and related equipment
By setting the sub-application directory and menu items on the main application page, users can select and enter each sub-application and its menu items on the main application page, and communicate between the terminal and the server to realize page switching, solving the cumbersome page switching in the existing technology The problem has improved the convenience and efficiency of page switching and adapted to path flexibility in multiple application scenarios.
Patent Information
- Application Number
- CN202210591066.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-05-27
AI Technical Summary
When switching pages, existing micro front-end technologies need to first enter the pages of different sub-applications, and then switch the directory. The operation is cumbersome and difficult to compatible with the parallel operation of new and old systems.
By setting the sub-application directory on the main application page, users can choose to enter each sub-application and its menu items, the terminal sends a page switching request to the main application server, the main application server sends a page switching instruction to the sub-application server, and the sub-application server determines the target work to achieve convenient and efficient page switching.
It simplifies the page switching process, improves convenience and efficiency, adapts to page path flexibility in multiple application scenarios, and reduces the difficulty of system transformation.
Smart Images

Figure CN114968460B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of page display, and specifically to a page switching method and related equipment. Background Art
[0002] Micro frontends apply the concept of microservices to the browser side, resulting in a frontend application of multiple sub-applications assembled in a main application. The main application and each sub-application can be run, developed, and deployed independently.
[0003] Many businesses have more or less historical application projects, most of which are based on old framework systems. In daily operations, these systems need to be integrated into the new framework before they can be used, but rewriting the old logic is a waste of time and energy. Micro frontends can integrate these systems and be compatible with new and old systems running in parallel.
[0004] In the case of multiple sub-applications, the sub-applications of the prior art micro-frontend can only use the directory under the sub-application to switch to different pages of the same sub-application when switching pages. When it is necessary to switch to a specific page of a different sub-application, it is necessary to first enter the page of the different sub-application, and then use the directory under the different sub-application page to switch to the specific page, which is cumbersome. Summary of the invention
[0005] The embodiments of the present application provide a page switching method and related devices for improving the convenience of page switching.
[0006] A first aspect of an embodiment of the present application provides a method for page switching, including:
[0007] Display the main application page of the cloud platform and the sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and several menu items under each sub-application, and each menu item corresponds to several work items;
[0008] Determine the first menu item of the selected first sub-application, send a page switching request to the main application server, the page switching request includes the first sub-application identifier and the first menu item identifier, so that the main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, the page switching instruction includes the first menu item identifier;
[0009] The page display information sent by the first sub-application server is received, and the target work item determined by the first sub-application server according to the page switching instruction is displayed on the sub-application page.
[0010] In the embodiment of the present application, a sub-application directory is set in the main application page, and sub-applications and menu items are arranged in the sub-application directory. Each menu item corresponds to a number of work items, so that the user can select to enter each sub-application and its menu item on the main application page to execute each work item. The terminal receives a signal from the user selecting a sub-application and a menu item on the main application page, and the terminal sends a page switching request to the main application server. The main application server sends a page switching instruction to the sub-application server, and the sub-application server determines the target work item. The embodiment of the present application realizes convenient and efficient selection and switching.
[0011] In an implementation of the first aspect of the embodiment of the present application, the work item has a corresponding application project, the page switching request sent to the main application server includes the first sub-application identifier, the first menu item identifier and the first application project identifier, and the page switching instruction sent to the first sub-application server includes the first menu item identifier and the first application project identifier;
[0012] The target work item displayed on the sub-application page is a work item associated with the first application project.
[0013] In an embodiment of the present application, application projects are used to divide the work items under each menu item, so that the work items have two classification dimensions, each work item has an application project dimension and a menu item dimension, multiple work items are divided into multiple application projects according to the application project dimension, and multiple work items are divided into multiple menu items according to the menu item dimension; a multi-application scenario entrance is set, and the first application project to be used is selected to enter the multi-application scenario. When switching sub-application pages in the multi-application scenario, the first menu item to be opened is determined through the sub-application directory displayed on the main application page, and the page is switched under the control of the first sub-application server, and the target work item jointly determined by the first menu item and the first application project is displayed on the sub-application page.
[0014] In an implementation method of the first aspect of the embodiment of the present application, an application project entrance is displayed on the main application page or the sub-application page, application project identifiers of multiple application projects are arranged at the application project entrance, and work items corresponding to each menu item are divided into each application project.
[0015] In the embodiment of the present application, an application project entrance is provided, which can adapt to single application scenarios and multiple application scenarios, realize the parallel operation of single application scenarios and multiple application scenarios, and provide a flexible page access method.
[0016] A second aspect of an embodiment of the present application provides a method for page switching, including:
[0017] The cloud platform includes a main application server and a sub-application server, a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and several menu items under each sub-application, and each menu item corresponds to several work items;
[0018] The main application server receives a page switching request sent by the terminal, where the page switching request includes a first sub-application identifier and a first menu item identifier;
[0019] The main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, where the page switching instruction includes the first menu item identifier;
[0020] The first sub-application server receives a page switching instruction sent by the main application server;
[0021] The first sub-application server determines the target work item according to the page switching instruction;
[0022] The first sub-application server sends page display information including the target work item to the terminal, so that the terminal displays the target work item on the sub-application page.
[0023] In the embodiment of the present application, a sub-application directory is set in the main application page, and sub-applications and menu items are arranged in the sub-application directory. Each menu item corresponds to a number of work items, so that the user can select to enter each sub-application and its menu item on the main application page to execute each work item. The terminal receives a signal from the user selecting a sub-application and a menu item on the main application page, and the terminal sends a page switching request to the main application server. The main application server sends a page switching instruction to the sub-application server, and the sub-application server determines the target work item. The embodiment of the present application realizes convenient and efficient selection and switching.
[0024] In an implementation manner of the second aspect of the embodiment of the present application, the work item has a corresponding application project, and the page switching request includes a first sub-application identifier, a first menu item identifier, and a first application project identifier;
[0025] The main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, specifically including:
[0026] The main application server obtains the correspondence between the page switching request and the page switching instruction, determines the page switching instruction according to the correspondence, and sends the page switching instruction to the first sub-application server, where the page switching instruction includes the first menu item identifier and the first application project identifier;
[0027] The first sub-application server determines the target work item according to the page switching instruction, specifically including:
[0028] The first sub-application server determines the first menu item identifier and the first application project identifier according to the page switching instruction;
[0029] The first sub-application server determines the target work item according to the first application project identifier and the first menu item identifier.
[0030] In the embodiment of the present application, a correspondence between a page switching request and a page switching instruction is established, the main application server sends a page switching instruction to the sub-application server according to the correspondence, the sub-application server determines the target work item according to the page switching instruction, and the sub-application server controls the client to switch pages so that the sub-application page of the client displays the target work item. Through the "page switching request-page switching instruction" correspondence, the page path in a multi-application scenario can be completely different from the path of the same page in a single application scenario, thereby improving the path flexibility.
[0031] In an implementation method of the second aspect of the embodiment of the present application, the main application server or the sub-application server controls the main application page or the sub-application page, displays an application project entrance, arranges application project identifiers of multiple application projects at the application project entrance, and the work items corresponding to each menu item are divided into multiple application projects.
[0032] In an embodiment of the present application, application projects are used to divide the work items under each menu item, so that the work items have two classification dimensions, each work item has an application project dimension and a menu item dimension, multiple work items are divided into multiple application projects according to the application project dimension, and multiple work items are divided into multiple menu items according to the menu item dimension.
[0033] A third aspect of an embodiment of the present application provides a system for page switching, including:
[0034] A display unit, used to display a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and a number of menu items under each sub-application, and each menu item corresponds to a number of work items;
[0035] a sending unit, configured to determine the first menu item of the selected first sub-application, and send a page switching request to the main application server, the page switching request including the first sub-application identifier and the first menu item identifier, so that the main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, the page switching instruction including the first menu item identifier;
[0036] The receiving unit is used to receive the page display information sent by the first sub-application server, and display the target work item determined by the first sub-application server according to the page switching instruction on the sub-application page.
[0037] In an implementation of the third aspect of the embodiment of the present application, the work item has a corresponding application project, the page switching request sent to the main application server includes the first sub-application identifier, the first menu item identifier and the first application project identifier, and the page switching instruction sent to the first sub-application server includes the first menu item identifier and the first application project identifier;
[0038] The target work item displayed on the sub-application page is a work item associated with the first application project.
[0039] An implementation of the third aspect of the embodiment of the present application further includes:
[0040] The entry unit is used to display the application project entry on the main application page or the sub-application page, arrange the application project identifiers of multiple application projects at the application project entry, and the work items corresponding to each menu item are divided into each application project.
[0041] A fourth aspect of an embodiment of the present application provides a system for page switching, including:
[0042] The cloud platform includes a main application server and a sub-application server, a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and several menu items under each sub-application, and each menu item corresponds to several work items;
[0043] A main application receiving unit, configured to receive a page switching request sent by a terminal, wherein the page switching request includes a first sub-application identifier and a first menu item identifier;
[0044] The main application sending unit is used to send a page switching instruction to the first sub-application server according to the first sub-application identifier, where the page switching instruction includes the first menu item identifier;
[0045] A first sub-application receiving unit, configured to receive a page switching instruction sent by a main application server;
[0046] A first sub-application determination unit, configured to determine a target work item according to a page switching instruction;
[0047] The first sub-application sending unit is used to send page display information containing a target work item to the terminal, so that the terminal displays the target work item on the sub-application page.
[0048] In an implementation of the fourth aspect of the embodiments of the present application,
[0049] The work item has a corresponding application project, and the page switching request includes a first sub-application identifier, a first menu item identifier, and a first application project identifier;
[0050] The main application sending unit is specifically used to obtain the corresponding relationship between the page switching request and the page switching instruction, determine the page switching instruction according to the corresponding relationship, and send the page switching instruction to the first sub-application server, where the page switching instruction includes the first menu item identifier and the first application project identifier;
[0051] The first sub-application determination unit is specifically used for:
[0052] Determine the first menu item identifier and the first application item identifier according to the page switching instruction;
[0053] A target work item is determined according to the first application project identifier and the first menu item identifier.
[0054] In an implementation method of the fourth aspect of an embodiment of the present application, the main application server or the sub-application server controls the main application page or the sub-application page, displays an application project entrance, arranges application project identifiers of multiple application projects at the application project entrance, and the work items corresponding to each menu item are divided into multiple application projects.
[0055] A fifth aspect of an embodiment of the present application provides a computer device, including:
[0056] CPU, memory;
[0057] The memory is either transient storage memory or persistent storage memory;
[0058] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method of the first aspect or the second aspect.
[0059] A sixth aspect of an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the method of the first aspect or the second aspect.
[0060] A seventh aspect of the embodiments of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method of the first aspect or the second aspect.
[0061] An eighth aspect of an embodiment of the present application provides a chip system, which includes at least one processor and a communication interface, the communication interface and at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions to execute the method of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a schematic diagram of the architecture of the page switching method of the embodiment of the present application;
[0063] Figures 2 to 6It is a schematic diagram of various flow charts of the method for page switching of the embodiment of the present application;
[0064] Figure 7 This is a schematic diagram of the effect of the method for page switching in an embodiment of the present application;
[0065] Figures 8 to 10 It is a schematic diagram of various structures of a system for page switching in an embodiment of the present application;
[0066] Fig.11 is a schematic diagram of the structure of a computer device according to an embodiment of the present application;
[0067] Fig.12 It is a schematic diagram of the effect of the page switching method in the prior art. DETAILED DESCRIPTION
[0068] The embodiments of the present application provide a page switching method and related devices for improving the convenience of page switching.
[0069] The embodiments of the present application can be implemented by a computer device, which may include at least one of a terminal and a server, wherein the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0070] like Fig.12 As shown, in the existing system display page, when the sub-application switches pages, the main application activates the corresponding sub-application and displays the corresponding sub-application page. On the sub-application page, the page is switched by clicking the menu item in the sub-application, which is cumbersome.
[0071] The embodiment of the present application establishes communication between the main application server and the sub-application server. When a menu item is selected, the main application server notifies the corresponding sub-application server to switch pages. The embodiment of the present application implements routing switching by the sub-application server to switch pages, which adapts to the existing technical architecture and does not require major transformation or reconstruction of the system, thereby reducing development costs and transformation difficulties. Figure 1As shown, the architecture of the page switching system proposed in the embodiment of the present application includes a terminal 101 and a cloud platform 102, the cloud platform 102 includes a main application server 104 and multiple sub-application servers 103, the terminal 101 is connected to the main application server 104, each sub-application server 103 is connected to the terminal 101, and each sub-application server 103 is connected to the main application server 104. The terminal 101 can also be called a client or a user.
[0072] The terms are explained here: page switching system: refers to the system composed of the main application and all sub-applications; main application: refers to an application that has some business functions and provides a page framework (such as a directory) for the entire system; sub-application: refers to each application with independent business functions.
[0073] like Figure 2 As shown, an embodiment of the present application provides a method for page switching, which specifically includes steps 201 to 203.
[0074] 201. Display the main application page of the cloud platform and the sub-application page nested in the main application page.
[0075] The main application page and the sub-application pages nested in the main application page are displayed, wherein the main application page includes the system's sub-application directory, the sub-application directory arranges the sub-application identifiers of multiple sub-applications and the menu item identifiers of several menu items under each sub-application, and each menu item corresponds to several work items. The identifier can be a name or address, etc.
[0076] 202. Determine the first menu item of the selected first sub-application, and send a page switching request to the main application server.
[0077] The page switching request includes the first sub-application identifier and the first menu item identifier, so that the main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, and the page switching instruction includes the first menu item identifier;
[0078] 203. Receive page display information sent by the first sub-application server, and display the target work item determined by the first sub-application server according to the page switching instruction on the sub-application page.
[0079] The page display information sent by the first sub-application server is received, and the target work item determined by the first sub-application server according to the first application project identifier and the first menu item identifier is displayed on the sub-application page, wherein the page display information carries the target work item.
[0080] In the embodiment of the present application, a sub-application directory is set in the main application page, and sub-applications and menu items are arranged in the sub-application directory. Each menu item corresponds to a number of work items, so that the user can select to enter each sub-application and its menu item on the main application page to execute each work item. The terminal receives a signal from the user selecting a sub-application and a menu item on the main application page, and the terminal sends a page switching request to the main application server. The main application server sends a page switching instruction to the sub-application server, and the sub-application server determines the target work item. The embodiment of the present application realizes convenient and efficient selection and switching.
[0081] like Figure 3 As shown, an embodiment of the present application provides a method for page switching, which specifically includes steps 301 to 305.
[0082] 301. The main application server receives a page switching request sent by a terminal.
[0083] The page switching request includes a first sub-application identifier and a first menu item identifier;
[0084] The cloud platform includes a main application server and a sub-application server, a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and several menu items under each sub-application, and each menu item corresponds to several work items;
[0085] 302. The main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier.
[0086] The page switching instruction includes the first menu item identifier. The main application server first determines the first sub-application server according to the first sub-application identifier, and then sends the page switching instruction to the first sub-application server.
[0087] 303. The first sub-application server receives a page switching instruction sent by the main application server;
[0088] 304. The first sub-application server determines a target work item according to the page switching instruction;
[0089] 305. The first sub-application server sends page display information including the target work item to the terminal.
[0090] The first sub-application server sends page display information carrying the target work item to the client, so that the terminal displays the target work item on the sub-application page.
[0091] In the embodiment of the present application, a sub-application directory is set in the main application page, and sub-applications and menu items are arranged in the sub-application directory. Each menu item corresponds to a number of work items, so that the user can select to enter each sub-application and its menu item on the main application page to execute each work item. The terminal receives a signal from the user selecting a sub-application and a menu item on the main application page, and the terminal sends a page switching request to the main application server. The main application server sends a page switching instruction to the sub-application server, and the sub-application server determines the target work item. The embodiment of the present application realizes convenient and efficient selection and switching.
[0092] like Figure 4 As shown, an embodiment of the present application provides a method for page switching, which specifically includes steps 401 to 410.
[0093] 401. Display the main application page and the sub-application page.
[0094] The client displays the main application page and the sub-application page. The sub-application page is a micro-frontend page nested in the main application page. The main application page is controlled by the main application server, and the sub-application page is controlled by multiple sub-application servers.
[0095] 402. Display the sub-application directory.
[0096] The client displays the sub-application directory of the system on the main application page. The sub-application directory includes multiple sub-application identifiers and several menu item identifiers under each sub-application identifier. Each menu item corresponds to several work items.
[0097] 403. Display the application project entrance.
[0098] The client displays an application project entrance on the main application page, where multiple application project identifiers are arranged, and work items corresponding to each menu item are divided into multiple application projects. Application projects may be, for example, financial cloud, human resources cloud, etc.
[0099] 404. Determine a first sub-application identifier, a first menu item identifier, and a first application project identifier.
[0100] The client determines the selected first sub-application identifier, first menu item identifier and first application project identifier, and sends the first sub-application identifier, first menu item identifier and first application project identifier to the main application server, so that the main application server sends the first menu item identifier and the first application project identifier to the first sub-application server according to the first sub-application identifier.
[0101] 405. Generate page switching request.
[0102] The main application server obtains the first sub-application identifier, the first menu item identifier and the first application project identifier input by the client, and generates a page switching request, which includes the sub-first application identifier, the first menu item identifier and the first application project identifier. The page switching request can also be called the main application path.
[0103] 406. Determine the page switching instruction.
[0104] The main application server obtains the correspondence between the page switching request and the page switching instruction, determines the page switching instruction according to the correspondence, determines the first sub-application server according to the first sub-application identifier,
[0105] 407. Send a page switching instruction. The page switching instruction may also be referred to as a sub-application path.
[0106] The main application server sends a page switching instruction to the first sub-application server, where the page switching instruction includes a first menu item identifier and a first application project identifier.
[0107] The first sub-application server receives the page switching instruction sent by the main application server, and the first sub-application server determines the first menu item identifier and the first application project identifier according to the page switching instruction.
[0108] 408. Determine the target work items.
[0109] The first sub-application server determines the target work item according to the first application project identifier and the first menu item identifier, each menu item corresponds to a plurality of work items, and the work items corresponding to each menu item are divided into a plurality of application projects.
[0110] 409. Send the target work item.
[0111] The first sub-application server sends page display information to the client, so that the sub-application page displays the target work item.
[0112] 410. Display the target work item.
[0113] The client receives the page display information sent by the first sub-application server, and displays the target work item determined by the first sub-application server according to the first application project identifier and the first menu item identifier on the sub-application page.
[0114] like Figure 5 As shown, an embodiment of the present application provides a method for page switching, and the application project entrance can adapt to single application scenarios and multiple application scenarios. The corresponding application project entrance can be called a single application scenario entrance and a multiple application scenario entrance, specifically including steps 501 to 507.
[0115] 501. Display a single application scenario entrance.
[0116] A single application scenario entrance is displayed on the main application page. Here, two sub-applications are taken as an example. The single application scenario entrance displayed on the main application page arranges a first sub-application identifier and a second sub-application identifier.
[0117] 502. Select a sub-application in a single application scenario.
[0118] Receive the user's selection at the entrance of a single application scenario and enter the corresponding sub-application. Here, the user selects the first sub-application as an example. Embed the sub-application page in the main application page, display the details of the first sub-application on the sub-application page, and the details of the first sub-application displayed on the sub-application page include the first sub-application directory. The first sub-application directory displays multiple menu items under the first sub-application. Here, take the example of two menu items under the first sub-application, and display the first menu item and the second menu item under the first application in the first sub-application directory.
[0119] 503. Select a menu item in a single application scenario.
[0120] Receive the menu item selected by the user and display the corresponding menu item details on the sub-application page. Here, the user selecting the first menu item is taken as an example. The details of the first menu item of the first sub-application are displayed on the sub-application page. The details of the first menu item include multiple application items. Here, there are two application items under the first menu item as an example. The first menu item includes a first work item and a second work item. Several application projects can form an application project group. Different work items of the same application project can be under the same menu item, under different menu items of the same sub-application, or under different menu items of different sub-applications. A work item can only be divided into one application project, that is, a work item cannot belong to two application projects at the same time.
[0121] It should be noted that steps 501 to 503 are optional steps and may not be performed. Steps 501 to 503 are steps for accessing data through a single application scenario, thereby achieving compatibility with single application scenarios and multiple application scenarios.
[0122] 504. Display multiple application scenario entrances.
[0123] Receive information that the user clicks on the multi-application scene entrance and enter the multi-application mixed switching display mode. There are many ways to enter the multi-application scene, and the following are two examples:
[0124] The first method is to display multiple sub-application entrances on the main application page, display the "Application Project Management" sub-application entrance on the main application page, receive the user's signal of selecting the "Application Project Management" sub-application, and display the details of the "Application Project Management" on the sub-application page; the second method is to open the console on the main application page, select the "Application Project Management" sub-application on the console, and display the details of the "Application Project Management" on the sub-application page. In the details of the application project management, display the application projects under one or more application project groups. Receive the application project selected by the user in the "Application Project Management" and display the details of the corresponding application project on the sub-application page. For example, display the titles of "First Application Project" and "Second Application Project" in the details of the application project management sub-application.
[0125] 505. Select application projects in multiple application scenarios.
[0126] Determine the application project selected by the user in the application project management, and display the details of the selected application project on the sub-application page, and display the main application page directory on the main application page. The main application page directory includes the title of the sub-application and the title of the menu item under the sub-application. Determine the menu item under the sub-application selected by the user, and generate a page switching request. The page switching request includes the English identification of the sub-application, the address of the menu item, the application project group number, and the application project number. Here, the user selects the first application project in the application project management as an example to illustrate. After determining that the first application project is selected, the main application page directory displayed on the main application page includes "the first sub-application" and its "first menu item" and "the second menu item". At the same time, the main application page directory also includes "the second sub-application" and its "third menu item" and "the fourth menu item". Receive the menu item selected by the user in the main application page directory. Here, the selection of "the first menu item" is used as an example to illustrate. After determining that the first menu item is selected, a page switching request is generated. The page switching request is "the number of the first application project group / the number of the first application project / the English identification of the first sub-application / the address of the first menu item".
[0127] As shown in the following table, the first sub-application includes the first menu item and the second menu item, the first menu item includes the first work item and the second work item, the second menu item includes the third work item and the fourth work item, wherein the first work item, the third work item and the fourth work item belong to the first application project, and the second work item belongs to the second application project; the second sub-application includes the third menu item and the fourth menu item, the third menu item includes the fifth work item and the sixth work item, the fourth menu item includes the seventh work item and the eighth work item, wherein the eighth work item belongs to the first application project, and the fifth work item, the sixth work item and the seventh work item belong to the second application project. Both the first application project and the second application project belong to the first application project group, and there is also a second application project group, and the application projects under the second application project group are not described in detail.
[0128]
[0129] It should be noted that a work item can be a template, a task, a form, etc.
[0130] 506. Generate a page switching request and a page switching instruction.
[0131] In multi-application mode, the sub-application directory in the sub-application page is hidden, and the system's sub-application directory is displayed in the main application page. The main application page can also display the application project group identifier of the application project in the current sub-application page. The application project in the current sub-application page is the application project selected by the user before entering the multi-application mixed switching display mode, continuing the example above, that is, the first work item. The menu items under the sub-application directory use page switching requests, and the menu items under the sub-application directory use page switching instructions. The main application stores the correspondence between page switching requests and page switching instructions, and the correspondence can be stored in a relationship table or text. The page switching request includes the sub-application English identification identifier, the menu item address and the application project group number, and the application project number; the page switching instruction includes the menu item address and the application project number. For example, if the page switching request is "the number of the first application project group / the number of the first application project / the English identification of the first sub-application / the address of the first menu item", the first sub-application determines the page switching instruction as "the address of the first menu item".
[0132] The sub-application directory can be a multi-level directory or a single-level directory. The single-level directory displays the menu items of each sub-application; the first level of the multi-level directory displays each sub-application, and the second level displays each menu item under the sub-application. Here we take a multi-level directory as an example. The sub-application directory is designed to allow users to see the location of the work item in the current sub-application page from a global dimension, and when switching pages through the sub-application directory, only the data related to the first application project can be displayed.
[0133] Receive information about the user clicking on a menu item in the sub-application directory. The main application server parses the page switching request of the clicked menu item, and obtains the corresponding page switching instruction based on the correspondence between the page switching request and the page switching instruction stored in the main application server. The main application server notifies the corresponding sub-application server according to the page switching instruction. The specific notification method can be that the main application server obtains the path to be switched by the sub-application server by querying the correspondence, and then communicates with the corresponding sub-application server through the window.postMessage() method to notify the sub-application server to switch pages. In other words, the main application server does not directly provide the content corresponding to the menu item, but notifies the sub-application server to provide the content corresponding to the menu item.
[0134] Taking the example of a user clicking on the fourth menu item of the second sub-application under the sub-application directory, the main application server parses the page switching request of the fourth menu item as "the number of the first application project group / the number of the first application project / the English logo of the second sub-application / the address of the fourth menu item", and the obtained sub-application address is the second sub-application, the menu item address is the fourth menu item, the application project group number is the first application project group, and the application project number is the first application project. According to the correspondence between the page switching request and the page switching instruction, it is determined that the menu item address in the corresponding page switching instruction is the fourth menu item. The main application server communicates with the second sub-application server, and the main application server sends an instruction to the second sub-application server, the instruction including the page switching instruction, which instructs the sub-application server to perform routing switching according to the page switching instruction to achieve page switching of the sub-application page.
[0135] The specific instruction may include a first instruction and a second instruction, wherein the first instruction includes a menu item address and the second instruction includes an application item number. The first instruction and the second instruction may be packaged and sent together or separately and successively.
[0136] 507. The sub-application page switches pages.
[0137] After receiving the first instruction and the second instruction from the main application server, the sub-application server switches pages according to the menu item address in the first instruction, and filters the work items in the menu item according to the application project number in the second instruction, and displays the work items belonging to the application project number in the second instruction on the sub-application page, and hides the work items that do not belong to the application project number in the second instruction. For example, after the second sub-application server receives the first instruction from the main application server, the second sub-application server switches the sub-application page to display the fourth menu item according to the first instruction, and displays the eighth work item belonging to the first application project on the sub-application page according to the second instruction, and hides the seventh work item that does not belong to the first application project.
[0138] It should be noted that the main application server and each sub-application server can be respectively run in different servers or other devices.
[0139] like Figure 6 As shown, the embodiment of the present application provides a method for page switching. Based on the single application scenario of "single application", the system is optimized to adapt to the multi-application scenario of "multi-application". On the main application page, choose whether to enter the multi-application scenario or the single application scenario, and perform different processing for different scenarios.
[0140] For a single application scenario, existing technology is used for implementation.
[0141] For multi-application scenarios, establish communication between the main application server and the sub-application server, and implement the function of clicking the sub-application directory and switching the sub-application page. The specific implementation process is as follows:
[0142] First, a corresponding relationship of "page switching request-page switching instruction" is established in the main application server, and the page switching request corresponds to the page switching instruction one by one. The corresponding relationship can be stored in the main application server in a table form. When the sub-application directory is clicked, the main application server obtains the page switching instruction to be switched by the sub-application server by querying the corresponding relationship, and then the main application server communicates with the corresponding sub-application server through the window.postMessage() method to notify the sub-application server to switch pages. After receiving the message, the sub-application server executes the route switching operation to realize the page switching and hides the sub-application directory at the same time.
[0143] It should be noted that the first sub-application can also be called sub-application A; the first sub-application entrance can also be called sub-application A entrance; the first menu item can also be called menu one; the multi-application scenario entrance can also be called a multi-application entrance or a multi-application mixed switching display entrance; the main application page can also be called a system page or a main page; the sub-application page can also be called a sub-page.
[0144] like Figure 7 As shown, as an embodiment of the present invention, the system may include a main application page 701 and a sub-application page 702. The sub-application directory 703 displayed in the main application page 701 includes a first sub-application entry and a second sub-application entry. The sub-application directory 703 also includes: a first menu item entry and a second menu item entry of the next level of the first sub-application, and a third menu item entry and a fourth menu item entry of the next level of the second sub-application. Of course, the sub-application directory of the present invention can set more sub-application entries and menu items according to actual scenarios.
[0145] After receiving a signal that the first sub-application entry is clicked, the sub-application page 702 displays the first sub-application. The first sub-application includes a first menu item and a second menu item.
[0146] After receiving a signal that the first menu item entry is clicked, the sub-application page 702 displays the first menu item of the first sub-application. The first menu item includes a first work item and a second work item.
[0147] There can be two entrances to multiple application scenarios, one in the application project management sub-application and one in the main application. Clicking these two entrances will achieve the same effect.
[0148] After entering the multi-application scenario, for example, selecting the second application project, the main application page opens a browser tab page to display each sub-application from the perspective of the second application project.
[0149] The application items may be switched through the sub-application directory provided at the head of the main application page, for example, switching from the second application item to the first application item.
[0150] You can switch between different sub-applications by clicking the sub-application directory on the left side of the main application page.
[0151] like Figure 8 As shown, an embodiment of the present application provides a system for page switching, including:
[0152] The display unit 801 is used to display the main application page of the cloud platform and the sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and a number of menu items under each sub-application, and each menu item corresponds to a number of work items;
[0153] The sending unit 802 is used to determine the first menu item of the selected first sub-application, and send a page switching request to the main application server, where the page switching request includes the first sub-application identifier and the first menu item identifier, so that the main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, where the page switching instruction includes the first menu item identifier;
[0154] The receiving unit 803 is configured to receive the page display information sent by the first sub-application server, and display the target work item determined by the first sub-application server according to the page switching instruction on the sub-application page.
[0155] like Fig. 9 As shown, an embodiment of the present application provides a system for page switching, including:
[0156] The display unit 901 is used to display the main application page of the cloud platform and the sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and a number of menu items under each sub-application, and each menu item corresponds to a number of work items;
[0157] The sending unit 902 is used to determine the first menu item of the selected first sub-application, and send a page switching request to the main application server, where the page switching request includes the first sub-application identifier and the first menu item identifier, so that the main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, where the page switching instruction includes the first menu item identifier;
[0158] The receiving unit 903 is configured to receive page display information sent by the first sub-application server, and display the target work item determined by the first sub-application server according to the page switching instruction on the sub-application page.
[0159] The entry unit 904 is used to display the application project entry on the main application page or the sub-application page, arrange the application project identifiers of multiple application projects at the application project entry, and divide the work items corresponding to each menu item into each application project.
[0160] The work item has a corresponding application project, the page switching request sent to the main application server includes the first sub-application identifier, the first menu item identifier and the first application project identifier, and the page switching instruction sent to the first sub-application server includes the first menu item identifier and the first application project identifier;
[0161] The target work item displayed on the sub-application page is a work item associated with the first application project.
[0162] like Fig.10 As shown, an embodiment of the present application provides a system for page switching, including:
[0163] The cloud platform includes a main application server and a sub-application server, a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and several menu items under each sub-application, and each menu item corresponds to several work items;
[0164] The main application receiving unit 1001 is used to receive a page switching request sent by a terminal, where the page switching request includes a first sub-application identifier and a first menu item identifier;
[0165] The main application sending unit 1002 is used to send a page switching instruction to the first sub-application server according to the first sub-application identifier, where the page switching instruction includes the first menu item identifier;
[0166] The first sub-application receiving unit 1003 is used to receive a page switching instruction sent by the main application server;
[0167] A first sub-application determining unit 1004 is used to determine a target work item according to a page switching instruction;
[0168] The first sub-application sending unit 1005 is used to send page display information including a target work item to the terminal, so that the terminal displays the target work item on the sub-application page.
[0169] like Fig.10 As shown, the embodiment of the present application also provides a system for page switching, including:
[0170] The cloud platform includes a main application server and a sub-application server, a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and several menu items under each sub-application, and each menu item corresponds to several work items;
[0171] The main application receiving unit 1001 is used to receive a page switching request sent by a terminal, where the page switching request includes a first sub-application identifier and a first menu item identifier;
[0172] The main application sending unit 1002 is used to send a page switching instruction to the first sub-application server according to the first sub-application identifier, where the page switching instruction includes the first menu item identifier;
[0173] The first sub-application receiving unit 1003 is used to receive a page switching instruction sent by the main application server;
[0174] A first sub-application determining unit 1004 is used to determine a target work item according to a page switching instruction;
[0175] The first sub-application sending unit 1005 is used to send page display information including a target work item to the terminal, so that the terminal displays the target work item on the sub-application page.
[0176] The work item has a corresponding application project, and the page switching request includes a first sub-application identifier, a first menu item identifier, and a first application project identifier;
[0177] The main application sending unit 1002 is specifically used to obtain the correspondence between the page switching request and the page switching instruction, determine the page switching instruction according to the correspondence, and send the page switching instruction to the first sub-application server, where the page switching instruction includes the first menu item identifier and the first application project identifier;
[0178] The first sub-application determining unit 1004 is specifically configured to:
[0179] Determine the first menu item identifier and the first application item identifier according to the page switching instruction;
[0180] A target work item is determined according to the first application project identifier and the first menu item identifier.
[0181] The main application server or the sub-application server controls the main application page or the sub-application page, displays the application project entrance, arranges the application project identifiers of multiple application projects at the application project entrance, and the work items corresponding to each menu item are divided into multiple application projects.
[0182] like Fig.11 As shown, the embodiment of the present application further provides a computer device 1100, including:
[0183] Central processing unit 1101, memory 1102;
[0184] The memory 1102 is a temporary storage memory or a permanent storage memory;
[0185] The CPU 1101 is configured to communicate with the memory 1102 and execute instructions in the memory 1102 to perform the following operations: Figures 1 to 7 The method in the illustrated embodiment.
[0186] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, when the instructions are executed on a computer, the computer executes the following Figures 1 to 7 The method in the illustrated embodiment.
[0187] The present application also provides a computer program product including instructions, which, when executed on a computer, causes the computer to execute the following Figures 1 to 7 The method in the illustrated embodiment.
[0188] The embodiment of the present application also provides a chip system, which includes at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected through a line, and the at least one processor is used to run a computer program or instruction to execute the following steps: Figures 1 to 7 The method in the illustrated embodiment.
[0189] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0190] The terms "first", "second", "third", "fourth", etc. in the specification and claims of this application 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 described herein can be implemented in an order other than that shown or described herein.
[0191] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0192] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0194] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A page switching method, characterized in that: include: Displaying a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and a number of menu items under each of the sub-applications, each of the menu items corresponds to a number of work items, and the work items do not belong to two application projects at the same time; Determine the first menu item of the selected first sub-application, and send a page switching request to the main application server, the page switching request including the first sub-application identifier and the first menu item identifier, so that the main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, the page switching instruction including the first menu item identifier; The page display information sent by the first sub-application server is received, and the target work item determined by the first sub-application server according to the page switching instruction is displayed on the sub-application page.
2. The page switching method according to claim 1, characterized in that: The work item has a corresponding application project, the page switching request sent to the main application server includes the first sub-application identifier, the first menu item identifier and the first application project identifier, and the page switching instruction sent to the first sub-application server includes the first menu item identifier and the first application project identifier; The target work item displayed on the sub-application page is the work item associated with the first application project.
3. The page switching method according to claim 2, characterized in that: Also includes The application project entrance is displayed on the main application page or the sub-application page, application project identifiers of a plurality of the application projects are arranged at the application project entrance, and the work items corresponding to the respective menu items are divided into the respective application projects.
4. A page switching method, characterized in that: include: The cloud platform includes a main application server and a sub-application server, a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and a plurality of menu items under each of the sub-applications, each of the menu items corresponds to a plurality of work items, and the work items do not belong to two application projects at the same time; The main application server receives a page switching request sent by the terminal, wherein the page switching request includes a first sub-application identifier and a first menu item identifier; The main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, wherein the page switching instruction includes a first menu item identifier; The first sub-application server receives a page switching instruction sent by the main application server; The first sub-application server determines a target work item according to the page switching instruction; The first sub-application server sends page display information including the target work item to the terminal, so that the terminal displays the target work item on the sub-application page.
5. The page switching method according to claim 4, characterized in that: The work item has the corresponding application project, and the page switching request includes the first sub-application identifier, the first menu item identifier and the first application project identifier; The main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, specifically including: The main application server obtains the correspondence between the page switching request and the page switching instruction, determines the page switching instruction according to the correspondence, and sends the page switching instruction to the first sub-application server, where the page switching instruction includes the first menu item identifier and the first application project identifier; The first sub-application server determines the target work item according to the page switching instruction, specifically including: The first sub-application server determines the first menu item identifier and the first application project identifier according to the page switching instruction; The first sub-application server determines the target work item according to the first application project identifier and the first menu item identifier.
6. The page switching method according to claim 5, characterized in that: The main application server or the sub-application server controls the main application page or the sub-application page, displays an application project entrance, arranges application project identifiers of multiple application projects in the application project entrance, and the work items corresponding to each menu item are divided into multiple application projects.
7. A page switching system, characterized in that: include: A display unit, used to display a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and a plurality of menu items under each of the sub-applications, each of the menu items corresponds to a plurality of work items, and the work items do not belong to two application projects at the same time; a sending unit, configured to determine a first menu item of a selected first sub-application, and send a page switching request to a main application server, wherein the page switching request includes a first sub-application identifier and a first menu item identifier, so that the main application server sends a page switching instruction to the first sub-application server according to the first sub-application identifier, wherein the page switching instruction includes the first menu item identifier; The receiving unit is configured to receive page display information sent by the first sub-application server, and display a target work item determined by the first sub-application server according to the page switching instruction on the sub-application page.
8. A page switching system, characterized in that: include: The cloud platform includes a main application server and a sub-application server, a main application page of the cloud platform and a sub-application page nested in the main application page, wherein the main application page has a sub-application directory, the sub-application directory includes multiple sub-applications and a plurality of menu items under each of the sub-applications, each of the menu items corresponds to a plurality of work items, and the work items do not belong to two application projects at the same time; A main application receiving unit, configured to receive a page switching request sent by a terminal, wherein the page switching request includes a first sub-application identifier and a first menu item identifier; a main application sending unit, configured to send a page switching instruction to a first sub-application server according to the first sub-application identifier, wherein the page switching instruction includes a first menu item identifier; A first sub-application receiving unit, configured to receive a page switching instruction sent by a main application server; A first sub-application determination unit, configured to determine a target work item according to the page switching instruction; The first sub-application sending unit is used to send page display information containing a target work item to a terminal, so that the terminal displays the target work item on the sub-application page.
9. A computer device, characterized in that: include: CPU, memory; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 6.
11. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
