CN113961298A - Page switching method, device, equipment and medium - Google Patents

Page switching method, device, equipment and medium Download PDF

Info

Publication number
CN113961298A
CN113961298A CN202111361274.XA CN202111361274A CN113961298A CN 113961298 A CN113961298 A CN 113961298A CN 202111361274 A CN202111361274 A CN 202111361274A CN 113961298 A CN113961298 A CN 113961298A
Authority
CN
China
Prior art keywords
page
subsystem
vue
switching
instance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111361274.XA
Other languages
Chinese (zh)
Inventor
王关胜
陈波
张泽峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111361274.XA priority Critical patent/CN113961298A/en
Publication of CN113961298A publication Critical patent/CN113961298A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

The application relates to the technical field of resource scheduling, in particular to a page switching method, device, equipment and medium, which are used for solving the problem of how to keep a page state during cross-system page switching. The method is applied to a resource management system based on a micro front end, the resource management system comprises a first subsystem and a second subsystem, the first subsystem and the second subsystem correspond to different front end applications, and the method comprises the following steps: switching from a first page of the first subsystem to a second page of the second subsystem in response to a first access operation performed on the first page; wherein the first access operation is to access the second page; loading a pre-cached vue instance of the second subsystem, displaying page data of the second page in vue instance of the second subsystem.

Description

Page switching method, device, equipment and medium
Technical Field
The present application relates to the field of resource scheduling technologies, and in particular, to the field of web application, and in particular, to a method, an apparatus, a device, and a medium for page switching.
Background
In the field of web page (web) application, a user often switches back and forth between multiple pages, and keep-alive is a component built in Vue, and when the user switches pages within a system, the page state can be kept through keep-alive, for example, when switching from an a page to a B page and then switching back from the B page to the a page, the data of the a page is still kept.
However, in the resource management system based on the micro front end, a single web application is converted into an application in which a plurality of small front end applications are aggregated into one, each front end application is a subsystem, and there is a service requirement that pages of the two subsystems jump to each other. Since vue instances of different subsystems are different, keep-alive cannot maintain page state at page switches across systems.
Disclosure of Invention
The embodiment of the application provides a page switching method, a page switching device, page switching equipment and a page switching medium, which are used for solving the problem of how to keep a page state during page switching of a cross-system.
In a first aspect, the present application provides a page switching method, where the method is applied to a resource management system based on a micro front end, where the resource management system includes a first subsystem and a second subsystem, and the first subsystem and the second subsystem correspond to different front end applications, and the method includes:
switching from a first page of the first subsystem to a second page of the second subsystem in response to a first access operation performed on the first page; wherein the first access operation is to access the second page;
loading a pre-cached vue instance of the second subsystem, displaying page data of the second page in vue instance of the second subsystem.
In the embodiment of the application, the first subsystem and the second subsystem of the resource management system correspond to different front-end applications, and the vue instance of the second subsystem is cached in advance, so that when the first page of the first subsystem is switched back to the second page of the second subsystem, the vue instance of the second subsystem which is cached in advance can be loaded, and then the page data of the second page in the vue instance of the second subsystem is displayed, so that the page state is maintained when the pages of the cross-system are switched, the second page is rendered from zero differently, the page data of the second page is displayed as soon as possible, and the user experience is improved.
In one possible embodiment, before switching from a first page of the first subsystem to a second page of the second subsystem in response to a first access operation at the first page, the method further comprises:
saving vue instances of the second subsystem in response to a second access operation on the second page, switching from the second page to the first page; wherein the second access operation is to access the first page.
In the embodiment of the present application, before leaving the second page, vue instance of the second subsystem is saved so that when switching back to the second page later, vue instance of the second subsystem can be loaded directly to restore the second page of the second subsystem as soon as possible.
In one possible embodiment, prior to saving the vue instance of the second subsystem in response to a second access operation on the second page, the method further comprises:
responding to the input operation on the second page, and acquiring user operation data;
writing the user operation data to an vue instance of the second subsystem.
In the embodiment of the application, the operation data of the second page by the user is written into the vue instance of the second subsystem, so that when the second page is switched back subsequently, the data already input by the user can be retained, repeated input by the user is avoided, and the user experience is improved.
In a possible embodiment, before switching from the first page to a second page of the second subsystem, the method further comprises:
if the vue instance of the first subsystem cached in advance does not exist, saving the current vue instance of the first subsystem; alternatively, the first and second electrodes may be,
if the vue instance of the first subsystem cached in advance exists, deleting vue instances of the first subsystem cached in advance, and saving the current vue instance of the first subsystem.
In the embodiment of the present application, before leaving the first page, the current vue instance of the first subsystem is saved, or the vue instance of the first subsystem cached in advance is deleted, and the current vue instance of the first subsystem is saved, so that when switching back to the first page subsequently, the vue instance of the first subsystem can be directly loaded, and the page data of the first page can be restored as soon as possible.
In a second aspect, the present application provides a page switching apparatus, where the apparatus is disposed in a resource management system based on a micro front end, the resource management system includes a first subsystem and a second subsystem, and the first subsystem and the second subsystem correspond to different front end applications, and the apparatus includes:
a switching unit configured to switch from a first page of the first subsystem to a second page of the second subsystem in response to a first access operation performed on the first page; wherein the first access operation is to access the second page;
and the loading display unit is used for loading the pre-cached vue instance of the second subsystem and displaying the page data of the second page in the vue instance of the second subsystem.
In a possible embodiment, the apparatus further comprises a saving module;
the saving module is used for saving vue examples of the second subsystem in response to a second access operation performed on a second page of the second subsystem before switching from a first page to the second page of the second subsystem in response to the first access operation performed on the first page of the first subsystem; wherein the second access operation is to access the first page;
the switching module is further configured to switch from the second page to the first page.
In a possible embodiment, the apparatus further comprises a write module configured to:
obtaining user operation data in response to an input operation performed on the second page, before saving the vue instance of the second subsystem in response to a second access operation performed on the second page;
writing the user operation data to an vue instance of the second subsystem.
In a possible embodiment, the saving module is further configured to:
before switching from the first page to a second page of the second subsystem, if there is no vue instance of the first subsystem cached in advance, saving a current vue instance of the first subsystem; alternatively, the first and second electrodes may be,
if the vue instance of the first subsystem cached in advance exists, deleting vue instances of the first subsystem cached in advance, and saving the current vue instance of the first subsystem.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the steps comprised in the method of any one of the first aspect according to the obtained program instructions.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of any of the first aspects.
In a fifth aspect, the present application provides a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the first aspects.
Drawings
Fig. 1 is a schematic structural diagram of a resource management system based on a micro front end according to an embodiment of the present application;
fig. 2 is a flowchart of a page switching method according to an embodiment of the present application;
fig. 3 is a structural diagram of a page switching apparatus according to an embodiment of the present application;
fig. 4 is a structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof, which are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The "plurality" in the present application may mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
Before describing the page switching method provided by the embodiment of the present application, for convenience of understanding, the following detailed description is first provided for the technical background of the embodiment of the present application.
As businesses grow more, many projects are designed into a micro-front-end architecture for ease of management. The micro front end is a thought similar to micro service, the idea of back end micro service is applied to a browser end, a single web application is decomposed into a plurality of smaller, simpler and mutually irrelevant front end applications according to service logic, each front end application is a subsystem which can be independently operated, independently developed and independently deployed, the development efficiency is greatly improved, and the front end application is still cohesive single application when seen by a user. For example, when a user fills a form in an a page of a certain subsystem, after filling data of a part of form items, the user needs to leave the current page to inquire a B page of another subsystem, and then return to the a page to continue filling, but when the user switches back to the a page, the user finds that the previously filled data is lost, needs to reproduce and fill, and thus user experience is poor.
In the prior art, when a page is switched, a keep-alive caches the state of the page wrapped in the page, and the page is not re-rendered when the wrapped page is re-entered next time, but page data of the page is read from the cache for display. However, the keep-alive is a built-in component of vue, and can only keep the page state when the page is switched under the condition of belonging to the same vue, and the keep-alive cannot keep the page state when the page is switched across systems due to different vue instances of different subsystems.
In view of this, the present application provides a page switching method. The method can be executed by a page switching device, and the page switching device can be realized by a terminal or a server, wherein the terminal is a personal computer, a mobile phone and the like, and the server is a physical service or a virtual server and the like.
In the embodiment of the application, the page switching device can firstly realize a micro front end framework based on front end routing distribution in the browser, and construct a resource management system based on the micro front end. Referring to fig. 1, a schematic structural diagram of a resource management system based on a micro front end according to an embodiment of the present application is shown, where the resource management system 100 includes a first subsystem 110 and a second subsystem 120. The first subsystem 110 and the second subsystem 120 correspond to different front-end applications, respectively. For example, the Web application is split into 2 front-end applications, the 2 front-end applications include package sales management and product management, the first subsystem 110 corresponds to the sales management application, and the second subsystem 120 corresponds to the product management application.
It should be noted that fig. 1 is an example of the resource management system including a first subsystem 110 and a second subsystem 120, and the number of subsystems is not limited in practice, and is equal to the number of front-end applications, and each subsystem corresponds to one front-end application.
In the embodiment of the application, the resource management system based on the micro front end realizes the complete decoupling of each subsystem, the maintainability and the expandability of the resource management system at the later stage are increased, the multi-system can be subjected to incremental updating, for example, only a first subsystem or only a second subsystem is updated, the quick integration of the new subsystem can be realized through simple configuration on the premise of not modifying codes, and in addition, the compiling and constructing time of the system is also reduced.
In the following, a method for executing page switching in a resource management system by a page switching device will be described as an example in conjunction with the resource management system based on a micro front end shown in fig. 1. Fig. 2 is a flowchart of a page switching method according to an embodiment of the present application.
S210, responding to a first access operation performed on a first page of the first subsystem, and switching from the first page to a second page of the second subsystem.
The currently displayed page of the page switching device is the first page of the first subsystem, and the page switching device can be switched from the first page of the resource management system to the first page of the first subsystem. For example, a user may enter an account and a password, log in a resource management system based on a micro front end, and enter a front page of the resource management system, where the front page displays a subsystem list under the authority of the user, where the subsystem list includes a first subsystem, such as a sales management subsystem, and a second subsystem, such as a product management subsystem. If the user wants to access the first subsystem, the user clicks the icon of the first subsystem, and the page can be navigated to the first subsystem according to the route.
The page switching device may also switch from other pages of the first subsystem to the first page of the first subsystem, the other pages being pages of the plurality of pages of the first subsystem other than the first page. The page switching device may also switch from the second page of the second subsystem to the first page of the first subsystem. The page switching device can also switch the page of other subsystems to the first page of the first subsystem, and the other subsystems are the subsystems in the resource management system except the first subsystem and the second subsystem.
In one possible embodiment, to avoid loss of page data for the first page, the page switching device may save vue instances of the first subsystem in response to a first access operation performed on the first page of the first subsystem, and then switch from the first page to a second page of the second subsystem, taking into account a subsequent possible switch back to the first page.
The first access operation is used for accessing a second page of the second subsystem, and the first access operation is a single-click operation, a double-click operation and the like, for example, a user wants to access the second subsystem and clicks an icon of the second subsystem on the first page. Vue is a lightweight framework with vue instances for each subsystem, and each vue instance is used to store data for the corresponding subsystem. The vue example of the first subsystem includes page data and user operation data of all pages involved in the first subsystem, the page data being data displayed by default on the page, and the user operation data being data input by the user. It should be noted that the vue instance of the first subsystem does not include user operation data if the user has not performed an input operation on any of the pages of the first subsystem.
The page switch device processes differently depending on whether vue instances of the first subsystem are cached, which is described separately below.
In the first case, there is no pre-cached vue instance of the first subsystem.
If the page switching device is switched to the first subsystem for the first time, the pre-cached vue instance of the first subsystem does not exist in the page switching device, and the current vue instance of the first subsystem is directly saved.
In the second case, there is a pre-cached vue instance of the first subsystem.
If the page switching device enters the first subsystem before, there should be vue instances cached in the page switching device at the time of the first subsystem in advance, but after the page switching device enters the first page of the first subsystem this time, a user may perform an input operation on the first page, which results in a change of the vue instance of the first subsystem. Therefore, in the embodiment of the present application, if there is an vue instance of the first subsystem cached in advance, the vue instance of the first subsystem cached in advance is updated, specifically, the vue instance of the first subsystem cached in advance may be deleted, and the current vue instance of the first subsystem is saved.
Considering that the user may click into the first subsystem this time, and exit the first subsystem without any input operation on the first page, the current vue instance of the first subsystem is the same as the vue instance of the pre-cached first subsystem, and if the vue instance of the pre-cached first subsystem is updated, the efficiency of switching pages is reduced. Therefore, in one possible embodiment, the page switching device may detect whether the user performed an input operation on the first page of the first subsystem, and if it is determined that the user did not perform any input operation on the first page, the pre-cached vue instance of the first subsystem is not updated. If the user is determined to have performed an input operation on the first page, the vue instance of the first subsystem that was cached in advance is updated.
In one possible embodiment, the page switching device may also switch directly from the first page to the second page of the second subsystem without saving the vue instance of the first subsystem in response to a first access operation being performed on the first page of the first subsystem. For example, the user determines that subsequent switching back to the first subsystem is not to occur.
S220, loading the vue instance of the second subsystem cached in advance, and displaying the page data of the second page in the vue instance of the second subsystem.
After switching from the first page to the second page, the difference involves a page switch across the systems, since the first page and the second page belong to different subsystems. In this embodiment, the page switching device may load the vue instance of the second subsystem cached in advance, and display the page data of the second page in the vue instance of the second subsystem.
It should be noted that the loading vue instance is actually a hypertext markup Language (html) node that converts the vue instance into a web page, and the html node is the most basic component of the web page, and each part of the web page can be referred to as a node. For example: html tag, property, text, comment, entire document, etc. are all a node.
For example, first entering the first subsystem, the page switching device may request to acquire a static resource of the first subsystem through a fetch method, where fetch is an interface provided by the web and capable of acquiring an asynchronous resource, and the static resource is specifically, for example, an html node, and is mounted on a corresponding mount node, so as to display the first page of the first subsystem. When the page of the first subsystem is switched to the page of the second subsystem, all html nodes of the first subsystem can be deleted on the mount node, so that the first subsystem is unloaded, and all html nodes of the second subsystem are reloaded. This can prevent js (javascript) of the two subsystems from interfering with each other, and a Cascading Style Sheets (CSS) of the two subsystems from interfering with each other.
Where reference is made to how vue instances of the second subsystem are obtained, vue instances of the second subsystem may be saved the last time the second subsystem was left, as described in more detail below.
The page switching device saves vue instances of the second subsystem to switch from the second page to the first page in response to a second access operation on the second page of the second subsystem. Wherein the second access operation is for accessing the first page. A second access operation, such as a single click operation, a double click operation, etc., is performed, such as the user clicking an icon of the first subsystem on the second page. The vue instance of the second subsystem may be saved locally to the page switching device, such as in the browser's My windows folder. The vue example of the second subsystem includes page data of all pages involved in the second subsystem, and the meaning of the page data refers to the content discussed above and is not described here.
If the user performs an input operation on a certain page of the second subsystem, the vue example of the second subsystem further includes user operation data of the page, and the meaning of the user operation data refers to the contents discussed above and is not described herein again. Specifically, the page switching device acquires the user operation data in response to an input operation performed on the second page of the second subsystem, and writes the user operation data in the vue instance of the second subsystem. For example, the user filled some data into the form of the second page, at which point the data filled by the user is written to the vue instance of the second subsystem.
In a possible embodiment, when the page switching device switches pages in the same subsystem, the page switching device loads and displays the data cached in the keep-alive, so that the page state is maintained. The data cached in the keep-alive includes page data and user operation data, and the meanings of the page data and the user operation data refer to the contents of the page data and the user operation data discussed above, which are not described herein again.
For example, the page switching device is used for loading and displaying data of a third page cached in a keep-alive of the first subsystem when switching from the first page to the third page in response to a third access user operation performed on the first page of the first subsystem, wherein the third access user operation is used for accessing the third page of the first subsystem. For the third access user operation, please refer to the content of the first access user operation discussed above, which is not described herein again.
Or for example, the page switching device is used for loading and displaying the data of the fourth page cached in the keep-alive of the second subsystem when responding to a fourth access user operation performed on the second page of the second subsystem, wherein the fourth access user operation is used for accessing the fourth page of the second subsystem and switching from the second page to the fourth page. For the fourth access user operation, please refer to the content of the first access user operation discussed above, which is not described herein again.
To more clearly illustrate the cross-system page switching method, an example description is given below.
When the page switching device loads the second subsystem for the first time, the cache is not hit, namely vue instances of the second subsystem cached in advance do not exist, vue instances of the second subsystem are rendered from zero, and if pages are switched inside the second subsystem, a vue single-page cache mechanism is realized through keep-alive, namely page data cached in the keep-alive of the second subsystem is loaded and displayed. If the page of the second subsystem is switched to the page of the first subsystem, the vue instance of the second subsystem is saved and then switched to the page of the first subsystem before the second subsystem is unloaded. When the page of the first subsystem is switched back to the page of the second subsystem, the cache scheduling module in the resource management system hits the vue instance of the first subsystem cached in advance, at this time, the page of the first subsystem is not rendered from zero, but the vue instance of the first subsystem is directly loaded, so that the user operation data input by the user on the page of the first subsystem is not lost, and the user experience is improved.
Based on the same inventive concept, an embodiment of the present application provides a page switching apparatus, which is disposed in the page switching device discussed above, and specifically, in a resource management system based on a micro front end and constructed by the page switching device, where the resource management system includes a first subsystem and a second subsystem, and the first subsystem and the second subsystem correspond to different front end applications, please refer to fig. 3, and the apparatus includes:
a switching unit 301 for switching from a first page to a second page of a second subsystem in response to a first access user operation performed on the first page of the first subsystem; the first access user operation is used for accessing a second page;
and a loading display unit 302, configured to load the vue instance of the second subsystem cached in advance, and display page data of the second page in the vue instance of the second subsystem.
In a possible embodiment, the apparatus further comprises a saving module 303;
the saving module 303 is configured to save vue instances of the second subsystem in response to a second access user operation on the second page before switching from the first page to a second page of the second subsystem in response to a first access user operation on the first page of the first subsystem; the second access user operation is used for accessing the first page;
the switching module is further used for switching from the second page to the first page.
In a possible embodiment, the apparatus further includes a writing module 304, where the writing module 304 is configured to:
obtaining user operation data in response to an input user operation performed on the second page, before saving the vue instance of the second subsystem in response to a second access user operation performed on the second page;
user operation data is written to the vue instance of the second subsystem.
In a possible embodiment, the saving module 303 is further configured to:
saving a current vue instance of the first subsystem if there is no vue instance of the first subsystem pre-cached prior to switching from the first page to a second page of the second subsystem; alternatively, the first and second electrodes may be,
if the vue instance of the first subsystem is cached in advance, the vue instance of the first subsystem cached in advance is deleted, and the current vue instance of the first subsystem is saved.
As an embodiment, the apparatus discussed in fig. 3 may implement any of the page switching methods discussed above, and details thereof are not repeated here.
Based on the same inventive concept, the present application provides an electronic device, which can implement the functions of the page switching device discussed above, referring to fig. 4, the device includes a processor 401 and a memory 402,
a memory 402 for storing program instructions;
a processor 401, configured to call the program instructions stored in the memory 402, and execute the steps included in any of the page switching methods discussed above according to the obtained program instructions. Because the principle of the electronic device for solving the problem is similar to the page switching method, the implementation of the electronic device can refer to the implementation of the method, and repeated details are not repeated.
The processor 401 may be a Central Processing Unit (CPU), or one or more combinations of a digital processing unit, an image processor, and the like. The memory 602 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 402 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or the memory 402 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 402 may be a combination of the above.
As an example, the processor 401 in fig. 4 may implement any of the page switching methods discussed above, and the processor 401 may also implement the functions of the page switching apparatus discussed above in fig. 3.
Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, and a computer program product includes: computer program code which, when run on a computer, causes the computer to perform any of the page switching methods as discussed above. Since the principle of solving the problem of the computer-readable storage medium is similar to that of the page switching method, the implementation of the computer-readable storage medium can refer to the implementation of the method, and repeated details are not repeated.
Based on the same inventive concept, the embodiment of the present application further provides a computer program product, where the computer program product includes: computer program code which, when run on a computer, causes the computer to perform any of the page switching methods as discussed above. Because the principle of solving the problems of the computer program product is similar to that of the page switching method, the implementation of the computer program product can refer to the implementation of the method, and repeated details are not repeated.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of user-operated steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (11)

1. A page switching method is applied to a resource management system based on a micro front end, the resource management system comprises a first subsystem and a second subsystem, the first subsystem and the second subsystem correspond to different front end applications, and the method comprises the following steps:
switching from a first page of the first subsystem to a second page of the second subsystem in response to a first access operation performed on the first page; wherein the first access operation is to access the second page;
loading a pre-cached vue instance of the second subsystem, displaying page data of the second page in vue instance of the second subsystem.
2. The method of claim 1, wherein prior to switching from the first page to a second page of the second subsystem in response to a first access operation at the first page of the first subsystem, the method further comprises:
saving vue instances of the second subsystem in response to a second access operation on the second page, switching from the second page to the first page; wherein the second access operation is to access the first page.
3. The method of claim 2, wherein prior to saving the vue instance of the second subsystem in response to a second access operation on the second page, the method further comprises:
responding to the input operation on the second page, and acquiring user operation data;
writing the user operation data to an vue instance of the second subsystem.
4. The method of any of claims 1-3, wherein prior to switching from the first page to a second page of the second subsystem, the method further comprises:
if the vue instance of the first subsystem cached in advance does not exist, saving the current vue instance of the first subsystem; alternatively, the first and second electrodes may be,
if the vue instance of the first subsystem cached in advance exists, deleting vue instances of the first subsystem cached in advance, and saving the current vue instance of the first subsystem.
5. A page switching device is characterized in that the device is arranged in a resource management system based on a micro front end, the resource management system comprises a first subsystem and a second subsystem, the first subsystem and the second subsystem correspond to different front end applications, and the device comprises:
a switching unit configured to switch from a first page of the first subsystem to a second page of the second subsystem in response to a first access operation performed on the first page; wherein the first access operation is to access the second page;
and the loading display unit is used for loading the pre-cached vue instance of the second subsystem and displaying the page data of the second page in the vue instance of the second subsystem.
6. The apparatus of claim 5, wherein the apparatus further comprises a save module;
the saving module is used for saving vue examples of the second subsystem in response to a second access operation performed on a second page of the second subsystem before switching from a first page to the second page of the second subsystem in response to the first access operation performed on the first page of the first subsystem; wherein the second access operation is to access the first page;
the switching module is further configured to switch from the second page to the first page.
7. The apparatus of claim 6, further comprising a write module to:
obtaining user operation data in response to an input operation performed on the second page, before saving the vue instance of the second subsystem in response to a second access operation performed on the second page;
writing the user operation data to an vue instance of the second subsystem.
8. The apparatus of any of claims 5-7, wherein the save module is further to:
before switching from the first page to a second page of the second subsystem, if there is no vue instance of the first subsystem cached in advance, saving a current vue instance of the first subsystem; alternatively, the first and second electrodes may be,
if the vue instance of the first subsystem cached in advance exists, deleting vue instances of the first subsystem cached in advance, and saving the current vue instance of the first subsystem.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps comprised by the method of any one of claims 1 to 4 in accordance with the obtained program instructions.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-4.
11. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method according to any of the preceding claims 1-4.
CN202111361274.XA 2021-11-17 2021-11-17 Page switching method, device, equipment and medium Pending CN113961298A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111361274.XA CN113961298A (en) 2021-11-17 2021-11-17 Page switching method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111361274.XA CN113961298A (en) 2021-11-17 2021-11-17 Page switching method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113961298A true CN113961298A (en) 2022-01-21

Family

ID=79470851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111361274.XA Pending CN113961298A (en) 2021-11-17 2021-11-17 Page switching method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113961298A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204398A (en) * 2023-05-06 2023-06-02 北京合众伟奇科技股份有限公司 Page caching method, processing device and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204398A (en) * 2023-05-06 2023-06-02 北京合众伟奇科技股份有限公司 Page caching method, processing device and computer readable storage medium
CN116204398B (en) * 2023-05-06 2023-08-18 北京合众伟奇科技股份有限公司 Page caching method, processing device and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109634598B (en) Page display method, device, equipment and storage medium
CN106886570B (en) Page processing method and device
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
CN106294658B (en) Webpage quick display method and device
CN107066631A (en) Display methods, device and the electronic equipment of the page
US20140208326A1 (en) File presenting method and apparatus for a smart terminal
KR20140038991A (en) Automatic synchronization of most recently used document lists
CN107291449B (en) Page rendering method, device and equipment
US9703460B2 (en) Intelligent rendering of webpages
CN113961298A (en) Page switching method, device, equipment and medium
CN117390326A (en) Page management method, device, equipment and storage medium
CN116821533A (en) Page rendering method, computer device and computer-readable storage medium
CN113536168B (en) Component processing method and device
CN115186207A (en) Method and device for loading page resources and electronic equipment
CN108804155A (en) Profile acquisition method, device, terminal and computer readable storage medium
CN113449216A (en) File processing method and device and storage medium
CN112395437B (en) 3D model loading method and device, electronic equipment and storage medium
CN110727889A (en) Static webpage resource loading method, device, medium and electronic equipment
CN108255918B (en) Method for acquiring pre-reading keyword set, webpage access equipment and electronic equipment
CN114296730A (en) Page information processing method and device and electronic equipment
CN117492855A (en) Page caching method, device, equipment and storage medium
CN117331625A (en) Page resource loading method and device, computer equipment and storage medium
CN114528510A (en) Webpage data processing method and device, electronic equipment and medium
CN114741147A (en) Method for displaying page on mobile terminal and mobile terminal
CN115495684A (en) Page loading method and device, computer equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination