WO2019134237A1 - 多页面切换方法、装置、终端设备及存储介质 - Google Patents

多页面切换方法、装置、终端设备及存储介质 Download PDF

Info

Publication number
WO2019134237A1
WO2019134237A1 PCT/CN2018/077335 CN2018077335W WO2019134237A1 WO 2019134237 A1 WO2019134237 A1 WO 2019134237A1 CN 2018077335 W CN2018077335 W CN 2018077335W WO 2019134237 A1 WO2019134237 A1 WO 2019134237A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
subpage
data
current
sub
Prior art date
Application number
PCT/CN2018/077335
Other languages
English (en)
French (fr)
Inventor
方小伟
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019134237A1 publication Critical patent/WO2019134237A1/zh

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/448Execution paradigms, e.g. implementations of programming paradigms
    • 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

Definitions

  • the present application relates to the field of application development, and in particular, to a multi-page switching method, apparatus, terminal device, and storage medium.
  • the embodiment of the present invention provides a multi-page switching method, device, terminal device, and storage medium, so as to solve the problem that a page load time is long when multi-page switching occurs, thereby causing a page blank.
  • the embodiment of the present application provides a multi-page switching method, including:
  • the parent page obtains a page jump instruction, where the page jump instruction includes a next subpage ID
  • the parent page is configured to call a page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switch to the next subpage display page corresponding to the next subpage ID according to the page interaction method function;
  • the parent page obtains the current subpage transit data through the current subpage based on the page jump instruction
  • the parent page is based on the page jump instruction to call the load data method function of the JavaScript object shared by the child page, and according to the load data method function and the current subpage transfer data, the next subpage ID is obtained. One subpage data, and the next subpage data is loaded on the next subpage display page.
  • the embodiment of the present application provides a multi-page switching apparatus, including:
  • a page jump instruction obtaining module configured to acquire a page jump instruction by the parent page, where the page jump instruction includes a next sub-page ID
  • a page switching module configured to: call, by the parent page, a page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switch to the next page corresponding to the next child page ID according to the page interaction method function
  • the subpage displays the page;
  • a transit data obtaining module configured to: obtain, by the current subpage, the current subpage transit data by using the current subpage based on the page jump instruction;
  • a data loading module configured to: use a load data method function of the JavaScript object shared by the child page based on the page jump instruction, and obtain the next child according to the load data method function and the current subpage transfer data. The next subpage data corresponding to the page ID, and loading the next subpage data on the next subpage display page.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, where the processor executes the computer The following steps are implemented when reading the instruction:
  • the parent page obtains a page jump instruction, where the page jump instruction includes a next subpage ID
  • the parent page is configured to call a page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switch to the next subpage display page corresponding to the next subpage ID according to the page interaction method function;
  • the parent page obtains the current subpage transit data through the current subpage based on the page jump instruction
  • the parent page is based on the page jump instruction to call the load data method function of the JavaScript object shared by the child page, and according to the load data method function and the current subpage transfer data, the next subpage ID is obtained. One subpage data, and the next subpage data is loaded on the next subpage display page.
  • an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by a processor, the following steps are implemented:
  • the parent page obtains a page jump instruction, where the page jump instruction includes a next subpage ID
  • the parent page is configured to call a page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switch to the next subpage display page corresponding to the next subpage ID according to the page interaction method function;
  • the parent page obtains the current subpage transit data through the current subpage based on the page jump instruction
  • the parent page is based on the page jump instruction to call the load data method function of the JavaScript object shared by the child page, and according to the load data method function and the current subpage transfer data, the next subpage ID is obtained. One subpage data, and the next subpage data is loaded on the next subpage display page.
  • the parent page acquires a page jump instruction, and the page jump instruction includes the next sub-page ID, and the obtained page jump instruction can Effectively achieve the purpose of page switching and jumping.
  • the parent page calls the page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switches to the next child page display page corresponding to the next child page ID according to the page interaction method function, and jumps based on the page through the parent page.
  • the page instruction method function of the JavaScript object shared by the sub-page is called, so that each time the parent page switches the method function of the JavaScript object shared by the child page, the time of calling the JavaScript object is actually only used once.
  • the parent page obtains the current subpage transit data through the current subpage, and the parent page obtains the subpage transit data through the subpage, thereby realizing the function of using the parent page for data transfer, through the parent page and the subpage. Communication between the two increases the efficiency of loading data.
  • the last parent page is based on the page jump instruction to call the load data method function of the JavaScript object shared by the child page, and according to the load data method function and the current subpage transfer data, obtain the next subpage data corresponding to the next subpage ID, and The next subpage data is loaded in the next subpage display page, and the loading data method function of the JavaScript object shared by the subpage and the current subpage transit data are called by the parent page, thereby realizing the effect of quickly and completely loading the next subpage data.
  • FIG. 1 is a flowchart of a multi-page switching method in Embodiment 1 of the present application.
  • FIG. 2 is a specific flow chart before step S10 of FIG. 1.
  • FIG. 3 is a specific flow chart of step S20 of FIG. 1.
  • step S40 of FIG. 1 is a specific flow chart of step S40 of FIG. 1.
  • FIG. 5 is a schematic block diagram of a multi-page switching apparatus in Embodiment 2 of the present application.
  • FIG. 6 is a schematic diagram of a terminal device in Embodiment 4 of the present application.
  • FIG. 1 shows a flow chart of a multi-page switching method in this embodiment.
  • the multi-page switching method can be applied to a terminal device installed with a multi-page application, so that the application does not have a blank page when the page is switched, and the effect of fast page switching is improved, and the page switching efficiency is improved.
  • the terminal device is a device that can interact with the user, including but not limited to devices such as a smart phone and a tablet.
  • the multi-page switching method includes the following steps:
  • S10 The parent page obtains a page jump instruction, and the page jump instruction includes a next subpage ID.
  • a page jump instruction is an instruction for performing a jump between sub-pages in an application, and the page jump instruction includes a next sub-page ID.
  • the next sub-page ID refers to the identifier used to uniquely identify the next sub-page to which the page jump instruction logically points.
  • the next subpage does not refer to a fixed, specific subpage, but a page pointed to by the logic determined by the page jump instruction. If the next subpage ID of the page jump instruction jump is "demo2", then the next subpage at this time refers to the subpage with the next subpage ID "demo2", and not other subpage IDs. It is a corresponding subpage such as "demo1" or "demo3".
  • the user runs the application on the terminal device, and after the application runs, the parent page is loaded, and the parent page loads the home page by default. That is, the first page displayed when the application is running is the first page of the home page that the parent page loads by default. At this point, the home page we are talking about is not the same as the parent page. To be precise, the home page is also a child page, except that when the application is initially loaded, the parent page loads one of the child pages as the home page by default. . It can be understood that the parent page is a page that is common to the home page subpage and other subpages, that is, the process of multi-page switching is actually performed under the parent page, and the page to be switched is each under the parent page. Subpage. The application's parent page is loaded by the application runtime, which provides a running environment for subsequent multi-page non-blank switching, and prepares for multi-page no-white switching.
  • the page jump instruction obtained by the parent page is triggered when the get button corresponding to the child page is clicked, and the page jump instruction includes a corresponding next child page ID for jumping to the next child page.
  • the application then executes the page jump instruction, and the parent page jumps the current subpage to the next subpage corresponding to the next subpage ID according to the page jump instruction.
  • the current subpage is a subpage displayed on the terminal device screen before the page jump, and the current subpage may be a homepage subpage, which may be a subpage displayed after the last jump.
  • the page jump instruction obtained by the parent page can effectively achieve the purpose of page switching and jumping.
  • the next subpage is associated with the get button of the page jump instruction. That is, the get button of the iframe corresponding to the subpage is pre-bound with the next subpage ID, and the specific manner of the binding is based on the logical position of the iframe on the page containing the iframe.
  • the application acquires the next sub-page ID bound to it according to the get button, and executes an instruction to jump from the current sub-page to the next sub-page.
  • the next sub-page ID can be obtained conveniently and accurately according to the acquisition button, and the jump of the next sub-page can be realized.
  • the multi-page switching method before the step of obtaining a page jump instruction by the parent page, the multi-page switching method further includes the following steps:
  • S11 Create at least two sub-pages on the parent page by using an iframe tag.
  • the iframe tag is a kind of tag in HTML5 (the fifth major modification of Hypertext Markup Language (HTML)), and the tag is specifically expressed as ⁇ iframe>.
  • the iframe tag is a form of frame expression.
  • the iframe tag is generally used to implement the function of including other pages in the page. For example, the content of various sub-pages can be loaded in the parent page of the application, and loaded and displayed in the sub-page. The content of other subpages.
  • the iframe tag can make the page as beautiful as the whole, and the layout is more layered, and can load and display the contents of other pages included in the page.
  • At least two sub-pages are created on the parent page by using the HTML5 iframe tag through the HTML5 embedded by the application.
  • a sub-page is set as the home page initially loaded by the application runtime, and the home page is the home page sub-page.
  • the number of sub-pages can be multiple.
  • the actual number of sub-pages to be developed is determined according to the complexity of the application.
  • the actual development application uses iframe tags to embed multiple sub-pages in the parent page, which is convenient for implementation. Jump and switch functions between sub-pages. Therefore, in the case of a large number of sub-pages, the efficiency of switching between sub-pages is particularly important.
  • each subpage is set by default to load the subpage structure and the subpage rendering.
  • the HTML5 iframe tag has a number of properties that allow you to set and adjust how the subpages corresponding to the iframe tag are displayed on the parent page.
  • the iframe tag includes: name: inline frame name, frameborder: inline frame border, scrolling: whether scroll bar appears ("auto” is automatic, "yes” is displayed, "no” is not displayed), src: embedded The address of the file, style: the style of the embedded document (such as setting the background of the document, etc.). To implement a hyperlink on a page that points to an embedded page, you need to name the iframe.
  • the corresponding iframe is set to the iframe only by loading the subpage structure and the subpage rendering.
  • the subpage data is not loaded, and the subpage data of the subpage is loaded only when jumping to the subpage corresponding to the iframe.
  • each sub-page includes a sub-page display page and sub-page data, and the sub-page structure and the sub-page rendering belong to the content included in the sub-page display page.
  • the sub-page can only display simple sub-page structure and sub-page rendering without loading sub-page data, which can improve the speed of sub-page loading, and help the page to achieve no blank jump effect between pages. .
  • S20 The parent page invokes a page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switches to the next subpage display page corresponding to the next subpage ID according to the page interaction method function.
  • JavaScript an object is data that has properties and methods.
  • a JavaScript object shared by a subpage is a JavaScript object that extracts JavaScript objects having the same function between subpages and uniformly encapsulates them.
  • the page interaction method function of the JavaScript object shared by the subpage refers to the same page interaction method function used when the page interaction is performed between the subpages, and the page interaction method function is uniformly encapsulated into the JavaScript object shared by the subpage.
  • the next subpage includes the next subpage display page and the next subpage data.
  • the next subpage display page refers to the logically displayed page of the next subpage, and the next subpage data refers to all the data loaded by the next subpage.
  • the parent page calls the page interaction method function of the JavaScript object shared by the pre-packaged sub-page, and according to the page interaction method function, according to the next sub-page ID corresponding to the next Subpage, switching from the current subpage to the next subpage display page.
  • the page interaction method function of the JavaScript object shared by the subpage is called, only the operation of switching to the next subpage display page is realized, because the page interaction method function is only responsible for the page interaction, and is not responsible for the page data loading.
  • the page switching can be made smoother.
  • the page interaction method function of the JavaScript object shared by the subpage multiple times actually takes only one loading time, avoiding each page jump.
  • the page interaction method function is called again when it is transferred.
  • the page interaction method function with the same function between the sub-pages is encapsulated into the JavaScript object shared by the sub-pages.
  • the parent page calls the JavaScript object shared by the pre-packaged sub-pages, in the process of multiple page jumps. Because the application has a caching function, each sub-page refers to the same JavaScript object multiple times and actually only takes one load time, which greatly improves the efficiency of page switching and shortens the waiting time when the page is switched.
  • step S20 the parent page invokes a page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switches to the next child page ID according to the page interaction method function.
  • the corresponding next sub-page display page includes the following steps:
  • S21 Acquire a corresponding next subpage display page by using the next subpage ID, and preset the next subpage display page to be set on either side of the screen according to the page interaction method function.
  • the application obtains the corresponding next subpage display page according to the next subpage ID, and preliminarily locates the next subpage display page on either side of the screen according to the page interaction method function, where the screen here It refers to the display screen of the terminal device, that is, the actual interface that the user can see.
  • the screen On either side of the screen is a logical interface on the outside of the screen that is not visible to the user.
  • the logical interface can be on the upper side, left side, right side, lower side or other position of the screen.
  • the next subpage display page may be pre-set on the right side of the screen according to a transition method (such as the changePage method function) in the page interaction method function.
  • the current sub-page (including the current sub-page display page and the current sub-page data) is moved to the screen, and the next sub-page display page is moved to the current sub-port according to the page interaction method function.
  • the page is in the original position of the screen to implement the process of page interaction. Specifically, when the current subpage is moved to either side of the screen, the next subpage display page can be simultaneously moved to the original position of the current subpage in the same direction to avoid overlapping of the two pages.
  • the current subpage is moved to the left side of the screen, and the next subpage display page is also moved to the left side, and the moving rate of the two is the same, and when the next subpage is displayed,
  • the move action ends when the page moves to the screen position.
  • the page switching is part of the page jump, and when the page jumps, the subpage data of the next subpage is also loaded.
  • the page action switching and the page data loading are performed simultaneously when the page jumps, and the above step S20 is to highlight the process of page interaction (switching), and the following steps S30-S40 are highlighted.
  • the process of page data loading has no order relationship between the two.
  • the current subpage is the subpage displayed on the terminal device screen before the page jumps.
  • Each subpage contains transit data, wherein the transit data refers to data that takes effect when the page jumps from the current subpage to the next subpage.
  • the face page relay data refers to the transfer data contained in the current subpage.
  • the transit data may specifically be an organization level, an organization code, a data dimension, and the like.
  • the parent page obtains the current subpage transit data through the current subpage, and saves the current subpage transit data in the parent page, so that the parent page is based on the parent page during the page jump process.
  • the current subpage transfer data jumps to the next subpage, and the next subpage data is loaded.
  • the parent page obtains the current subpage transit data through the current subpage, realizes the function of using the parent page for data transfer, and improves the efficiency of loading data through the communication between the parent page and the subpage.
  • the current subpage includes the current subpage relay data, and the current subpage relay data is saved in the JavaScript object of the current subpage.
  • step S30 specifically includes the following steps: the parent page obtains the current subpage relay data through the JavaScript object of the current subpage.
  • Each subpage has a JavaScript object of a subpage
  • the parent page has a JavaScript object of the parent page
  • the JavaScript object shared by the subpages mentioned in step S20 refers to the same method shared by the JavaScript objects of each subpage.
  • the function is uniformly encapsulated into a JavaScript object, which is called a JavaScript object shared by the child pages.
  • the current subpage relay data is the data that takes effect when the page jumps. Because there are many situations in the jump between pages, and the actual needs of the user are different, the current subpage transfer data is not a common part between subpages, and needs to be separate. Get it.
  • the current subpage includes the current subpage transit data
  • the current subpage saves the current subpage transit data in the JavaScript object of the current subpage, so that the parent page can directly obtain the current through the JavaScript object of the current subpage.
  • Subpage relay data
  • the method further includes the following steps: the parent page saves the current subpage relay data in the JavaScript object of the parent page.
  • the parent page performs an action of acquiring the current subpage transit data according to the obtained page jump instruction, specifically, the parent page obtains the current subpage transit data through the JavaScript object of the current subpage, and the current subpage is obtained.
  • the page relay data is saved in the JavaScript object of the parent page. For example, if the current sub-page is a car insurance daily report, and the page jumps through the current sub-page transfer data such as the organization level and the organization code, the data of the southeast area is seen from the national data in the current sub-page of the auto insurance daily report, and again When you click to see the data in Guangdong, each action will save the organization code and organization level of the current subpage to the JavaScript object of the current subpage. The parent page then saves the organization code and the organization level through the JavaScript object of the current subpage. In the JavaScript object of the parent page.
  • the parent page calls the load data method function of the JavaScript object shared by the child page, and loads the next subpage data corresponding to the next subpage ID according to the load data method function and the current subpage transfer data.
  • the load data method function of the JavaScript object shared by the child page refers to the load data method function with the same function between different sub-pages.
  • the load data method function compares the page interaction method function, because the switching action between pages is relatively fixed (for example, according to the sequential logical relationship between the pages, there are switching actions such as sliding to the left or sliding upward), so the page interaction method function may include Most of the pages have the same switching action; while the data loading between pages is different, there may be only a part of the loading data is the same, so the current subpage forwarding data is needed to determine the final loading data. If there is no shared load data method function between the two sub-pages, the shared load data method function is allowed to be empty. In fact, the page jump process only uses the current sub-page transfer data to implement data loading.
  • the parent page calls the load data method function of the JavaScript object shared by the child page, and obtains the current subpage transfer data, and loads the data by the load data method function and the current subpage transfer data.
  • the subpage data by calling the loading data method function of the JavaScript object shared by the subpage, actually only takes one time to call the loading data method function of the JavaScript object, and the data transfer through the parent page can directly obtain the data required for the jump. , speed up the data loading, and achieve the effect of quickly loading data when jumping from the current subpage to the next subpage.
  • step S40 based on the page jump instruction, the parent page calls the load data method function of the JavaScript object shared by the child page, according to the load data method function and the current subpage transfer data. Loading the next subpage data corresponding to the next subpage ID, specifically including the following steps:
  • the next subpage data refers to all data loaded in the next subpage, including subpage common data and subpage non-shared data.
  • the parent page will call the load data method function of the JavaScript object shared by the child page, and load the child page common data in the next child page data according to the load data method function.
  • it may be the common data about the auto insurance part in the auto insurance daily sub-page and the auto insurance detail sub-page.
  • S42 Call the load data method function corresponding to the current subpage transfer data according to the current subpage transfer data, and obtain the subpage non-shared data in the next subpage data.
  • step S41 refers to the method function required to load the data, but the data specifically loaded by the two and the specific load data method are used.
  • the functions are not the same.
  • step S41 refers to a load data method function corresponding to the sub-page shared data in the next sub-page data; and this step refers to a load data method function corresponding to the current sub-page transfer data.
  • the parent page invokes the load data method function corresponding to the transfer data of the subpage according to the obtained current subpage transfer data, and loads the subpage non-shared data in the next subpage data.
  • the transfer data (here specifically refers to the organization code and organization level of the auto insurance daily report, that is, an institution in Guangdong), requests the detailed data of an institution in Guangdong in the auto insurance detail sub-page corresponding to the current sub-page transfer data.
  • the transfer data requests the detailed data of an institution in Guangdong in the auto insurance detail sub-page corresponding to the current sub-page transfer data.
  • the parent page first acquires a page jump instruction, and the page jump instruction includes a next sub-page ID, and the page jump instruction obtained can effectively achieve the purpose of page switching and jumping. , can accurately achieve the results of page jumps. Then, the parent page calls the page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, and switches to the next subpage display page corresponding to the next subpage ID according to the page interaction method function, and jumps based on the page through the parent page.
  • the page instruction method function of the JavaScript object shared by the sub-page is called, so that each time the parent page switches the method function of the JavaScript object shared by the child page, the time of calling the JavaScript object is actually only used once.
  • the parent page obtains the transfer data of the sub-page through the page jump instruction, realizes the function of using the parent page for data transfer, and effectively improves the efficiency of loading data through the communication between the parent page and the sub-page.
  • the last parent page is based on the page jump instruction to call the load data method function of the JavaScript object shared by the child page, and according to the load data method function and the current subpage transfer data, obtain the next subpage data corresponding to the next subpage ID, and The next subpage data is loaded in the next subpage display page.
  • the data transfer through the parent page can directly obtain the data required for the jump, speed up the data loading, and realize the fast jump from the current subpage to the next subpage. The effect of loading data.
  • FIG. 5 is a schematic block diagram showing a multi-page switching apparatus corresponding to the multi-page switching method in the first embodiment.
  • the multi-page switching apparatus includes a page jump instruction acquisition module 10, a page switching module 20, a relay data acquisition module 30, and a data loading module 40.
  • the implementation functions of the page jump instruction acquisition module 10, the page switching module 20, the transit data acquisition module 30, and the data loading module 40 correspond one-to-one with the steps corresponding to the multi-page switching method in the first embodiment. To avoid redundancy, the implementation The examples are not detailed one by one.
  • the page jump instruction acquisition module 10 is configured to obtain a page jump instruction for the parent page, and the page jump instruction includes the next sub-page ID.
  • the page switching module 20 is configured to, according to the page jump instruction, invoke a page interaction method function of the JavaScript object shared by the child page according to the page jump instruction, and switch to the next subpage display page corresponding to the next subpage ID according to the page interaction method function.
  • the transit data obtaining module 30 is configured to obtain, by the current subpage, the current subpage transit data by using the current subpage based on the page jump instruction.
  • the data loading module 40 is configured to: according to the page jump instruction, the load data method function of the JavaScript object shared by the child page is called according to the page jump instruction, and the next data corresponding to the next subpage ID is obtained according to the load data method function and the current subpage transfer data. Subpage data, and the next subpage data is loaded on the next subpage display page.
  • the page switching module 20 includes a positioning unit 21 and a moving unit 22.
  • the locating unit 21 is configured to obtain a corresponding next sub-page display page by using the next sub-page ID, and pre-position the next sub-page display page on either side of the screen according to the page interaction method function.
  • the mobile unit 22 is configured to move the current sub-page to the off-screen position away from the position where the next sub-page display page is located according to the page interaction method function, and move the next sub-page display page to the original position of the current sub-page on the screen.
  • the current subpage includes the current subpage relay data, and the current subpage relay data is saved in the JavaScript object of the current subpage.
  • the transit data obtaining module 30 is configured to obtain, by the parent page, the current subpage transit data by using the JavaScript object of the current subpage.
  • the multi-page switching device further includes a relay data saving module 50 for the parent page to save the current sub-page relay data in the JavaScript object of the parent page.
  • the next sub-page ID is associated with the get button of the page jump instruction.
  • the data loading module 40 includes a shared data acquiring unit 41 and a non-shared data acquiring unit 42.
  • the shared data obtaining unit 41 is configured to acquire the subpage common data in the next subpage data according to the loading data method function corresponding to the JavaScript object shared by the subpage.
  • the non-shared data obtaining unit 42 is configured to call the load data method function corresponding to the current subpage transfer data according to the current subpage transfer data, and obtain the subpage non-shared data in the next subpage data.
  • the multi-page switching device further includes a sub-page setting module 60, and the sub-page setting unit 60 includes a sub-page creating unit 61 and a sub-page default setting unit 62.
  • the subpage creating unit 61 is configured to create at least two subpages on the parent page by using an iframe tag.
  • the sub-page default setting unit 62 is configured to be based on an iframe tag, and each sub-page is set by default to load a sub-page structure and a sub-page rendering.
  • the page jump instruction obtaining module 10 is configured to acquire a page jump instruction by the parent page, and the page jump instruction includes the next sub-page ID, which can be effectively obtained by the obtained page jump instruction. To achieve the purpose of page switching and jumping, the result of page jump can be accurately realized.
  • the page switching module 20 is configured to use a page interaction method function of the JavaScript object shared by the parent page based on the page jump instruction, and switch to the next subpage display page corresponding to the next subpage ID according to the page interaction method function, and pass the page interaction method function.
  • the parent page calls the page interaction method function of the JavaScript object shared by the child page based on the page jump instruction, so that each time the parent page is called, the page interaction method function of the JavaScript object shared by the child page is actually called once.
  • the time of the JavaScript object effectively realizes the effect of no white space switching between pages during the page switching process, which greatly improves the efficiency of page switching and shortens the waiting time when the page is switched.
  • the transit data obtaining module 30 is configured to obtain the current subpage transit data through the current subpage based on the page jump instruction, and improve the efficiency of loading the data by communicating between the parent page and the subpage.
  • the data loading module 40 is configured to use the load data method function of the JavaScript object shared by the parent page based on the page jump instruction, and obtain the next child corresponding to the next child page ID according to the load data method function and the current subpage transfer data.
  • the page data, and the next subpage data is loaded in the next subpage display page, and the data transfer through the parent page can directly obtain the data required for the jump, speed up the data loading, and realize the next subpage from the current subpage. The effect of quickly loading data when a page jumps.
  • the embodiment provides a computer readable storage medium on which computer readable instructions are stored, and when the computer readable instructions are executed by the processor, the multi-page switching method in Embodiment 1 is implemented. No longer.
  • the computer readable instructions are executed by the processor, the functions of the modules/units in the multi-page switching device in Embodiment 2 are implemented. To avoid repetition, details are not described herein again.
  • FIG. 6 is a schematic diagram of a terminal device in this embodiment.
  • terminal device 70 includes a processor 71, a memory 72, and computer readable instructions 73 stored in memory 72 and operative on processor 71.
  • the processor 71 implements the various steps of the multi-page switching method of Embodiment 1 when the computer readable instructions 73 are executed, such as steps S10, S20, S30, and S40 shown in FIG.
  • the processor 71 executes the computer readable instructions 73
  • the functions of each module/unit of the multi-page switching device in Embodiment 2 are implemented, as shown in FIG. 5, the page jump instruction acquiring module 10, the page switching module 20, and the transit data acquiring module. 30 and the function of the data loading module 40.
  • computer readable instructions 73 may be partitioned into one or more modules/units, one or more modules/units being stored in memory 72 and executed by processor 71 to complete the application.
  • the one or more modules/units may be an instruction segment of a series of computer readable instructions 73 capable of performing a particular function, which is used to describe the execution of computer readable instructions 73 in the terminal device 70.
  • the computer readable instructions 70 can be divided into the page jump instruction acquisition module 10, the page switching module 20, the relay data acquisition module 30, and the data loading module 40 in Embodiment 2, and the specific functions of each module are as in Embodiment 2. In order to avoid repetition, we will not repeat them here.
  • the terminal device 70 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 71, a memory 72. It will be understood by those skilled in the art that FIG. 6 is only an example of the terminal device 70, and does not constitute a limitation of the terminal device 70, and may include more or less components than those illustrated, or combine some components, or different components.
  • the terminal device may further include an input/output device, a network access device, a bus, and the like.
  • the processor 71 may be a central processing unit (CPU), or may be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 72 may be an internal storage unit of the terminal device 70, such as a hard disk or a memory of the terminal device 70.
  • the memory 72 may also be an external storage device of the terminal device 70, such as a plug-in hard disk provided on the terminal device 70, a smart memory card (SMC), a Secure Digital (SD) card, and a flash memory card (Flash). Card) and so on.
  • the memory 72 may also include both an internal storage unit of the terminal device 70 and an external storage device.
  • Memory 72 is used to store computer readable instructions as well as other programs and data required by the terminal device.
  • the memory 72 can also be used to temporarily store data that has been or will be output.
  • 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 integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated modules/units if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the present application implements all or part of the processes in the foregoing embodiments, and may also be implemented by computer readable instructions, which may be stored in a computer readable storage medium.
  • the computer readable instructions when executed by a processor, may implement the steps of the various method embodiments described above.
  • the computer readable instructions comprise computer readable instruction code, which may be in the form of source code, an object code form, an executable file or some intermediate form or the like.
  • the computer readable medium can include any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, a computer memory, a read only memory (ROM, Read-Only) Memory), random access memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media.
  • a recording medium a USB flash drive
  • a removable hard drive a magnetic disk, an optical disk
  • a computer memory a read only memory (ROM, Read-Only) Memory
  • RAM random access memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种多页面切换方法、装置、终端设备及存储介质。该多页面切换方法,包括:父页面获取页面跳转指令;父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据。该多页面切换方法进行多页面切换时,可以达到多页面切换时页面加载时间短的切换效果。

Description

多页面切换方法、装置、终端设备及存储介质
本专利申请以2018年1月8日提交的申请号为201810014131.3,名称为“多页面切换方法、装置、终端设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及应用程序开发领域,尤其涉及一种多页面切换方法、装置、终端设备及存储介质。
背景技术
在应用程序开发领域,应用程序页面的交互和页面数据的加载一般通过多页面应用实现。多页面应用中的各子页面开发相对独立,可支持多人同时开发,使其开发维护过程简单,但多页面应用在进行页面切换的前一段时间会出现空白,这是因为加载出页面需要时间。这使得多页面切换时加载页面时间较长,导致存在页面空白的问题。
发明内容
本申请实施例提供一种多页面切换方法、装置、终端设备及存储介质,以解决多页面切换时页面加载时间长,从而导致存在页面空白的问题。
第一方面,本申请实施例提供一种多页面切换方法,包括:
父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
第二方面,本申请实施例提供一种多页面切换装置,包括:
页面跳转指令获取模块,用于父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
页面切换模块,用于父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
中转数据获取模块,用于父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
数据加载模块,用于父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
第三方面,本申请实施例提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函 数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
本申请实施例所提供的多页面切换方法、装置、终端设备及存储介质中,首先父页面获取页面跳转指令,页面跳转指令包括下一子页面ID,通过获取的页面跳转指令,能够有效达到页面切换、跳转的目的。然后父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据页面交互方法函数切换到与下一子页面ID相对应的下一子页面显示页面,通过父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,使得每次切换中父页面在调用子页面共有的JavaScript对象的页面交互方法函数时,实际上只花了一次调用该JavaScript对象的时间,有效实现了页面切换过程中页面间无空白衔接切换的效果。接着父页面基于页面跳转指令,通过当前子页面获取当前子页面中转数据,父页面通过子页面获取到子页面中转数据,实现了利用父页面进行数据中转的功能,通过父页面与子页面之间的沟通,提高了加载数据的效率。最后父页面基于页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据加载数据方法函数和当前子页面中转数据,获取下一子页面ID相对应的下一子页面数据,并将下一子页面数据加载在下一子页面显示页面,通过父页面调用子页面共有的JavaScript对象的加载数据方法函数和当前子页面中转数据,实现了将下一子页面数据快速、完整加载的效果。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例1中多页面切换方法的一流程图。
图2是图1中步骤S10之前的一具体流程图。
图3是图1中步骤S20的一具体流程图。
图4是图1中步骤S40的一具体流程图。
图5是本申请实施例2中多页面切换装置的一原理框图。
图6是本申请实施例4中终端设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例1
图1示出本实施例中多页面切换方法的一流程图。该多页面切换方法可应用在安装有多页面应用程序的终端设备中,用于使应用程序在页面切换时无空白页面出现,实现页面快速切换的效果,提高页面切换效率。其中,该终端设备是可与用户进行交互的设备,包括但不限于智能手机和平板等设备。如图1所示,该多页面切换方法包括如下步骤:
S10:父页面获取页面跳转指令,页面跳转指令包括下一子页面ID。
其中,父页面是一个逻辑上的页面,在应用程序运行时,应用程序会加载父页面。页面跳转指令是指在应用程序中用于进行子页面间跳转的指令,该页面跳转指令包括下一子页面ID。下一子页面ID是指用于唯一标识该页面跳转指令逻辑指向的下一子页面的标识。下一子页面并不是指某一个固定、具体的子页面,而是根据页面跳转指令决定的逻辑指向的页面。若页面跳转指令跳转的下一子页面ID为“demo2”,则此时的下一子页面就是指该下一子页面ID为“demo2”的子页面,而不会是其他子页面ID为“demo1”或“demo3”等对应的子页面。
优选地,用户在终端设备上运行应用程序,应用程序运行后将加载父页面,父页面默认加载首页子页面。即在应用程序运行时第一个显示的页面是父页面默认加载的首页子页面。此时,我们所说的首页并不等同于父页面,准确来讲,首页子页面也是一个子页面,只不过是在应用程序初始加载时,父页面默认加载了其中一个子页面作为首页子页面。可以理解地,父页面是一个在首页子页面及其他子页面共同之上的页面,即多页面切换的过程中实际上都是在父页面下进行的,进行切换的页面是父页面下的各个子页面。通过应用程序运行时加载应用程序的父页面,为后续实现多页面无空白切换提供了运行的环境,做好了多页面无空白切换的前期准备。
本实施例中,父页面获取的页面跳转指令是子页面对应的获取按钮被点击时触发的,该页面跳转指令包含对应的下一子页面ID,用于跳转至下一子页面。应用程序随即执行该页面跳转指令,父页面根据页面跳转指令将当前子页面跳转到该下一子页面ID所对应的下一子页面。该当前子页面即页面跳转之前在终端设备屏幕显示的子页面,该当前子页面 可以是首页子页面,可以是上一次跳转后显示的子页面。通过父页面获取的页面跳转指令,能够有效达到页面切换、跳转的目的。
在一具体实施方式中,下一子页面与页面跳转指令的获取按钮相关联。即iframe对应子页面的获取按钮与下一子页面ID是预先绑定好的,绑定的具体方式是根据该iframe在包含该iframe的页面上的逻辑位置进行绑定的。当用户点击iframe对应子页面的获取按钮时,应用程序会根据该获取按钮获取与其绑定的下一子页面ID,执行跳转由当前子页面跳转到下一子页面的指令。通述获取按钮的按钮位置与下一子页面ID之间的绑定,可以便捷、准确地根据获取按钮获取到下一子页面ID,并实现下一子页面的跳转。
在一具体实施方式中,如图2所示,在父页面获取页面跳转指令的步骤之前,该多页面切换方法还包括如下步骤:
S11:采用iframe标签在父页面创建至少两个子页面。
其中,iframe标签是HTML5(超文本标记语言(Hypertext Markup Language,HTML)的第五次重大修改)中标签的一种,该标签具体表达为<iframe>。iframe标签是框架表达的一种形式,iframe标签一般用来实现在页面中包含别的页面的功能,例如可以在应用程序的父页面加载各种不同子页面的内容,在子页面中加载、展示其他子页面的内容。iframe标签可以使得页面整体上变得美观,格局排版上更加有层次感,并能加载、展示页面中包含的其他页面的内容。
本实施例中,在应用程序开发过程中,通过应用程序嵌入的HTML5,采用HTML5的iframe标签在父页面创建出至少两个子页面。优选地,设置一子页面为应用程序运行时初始默认加载的首页,该首页即为首页子页面。在应用程序实际开发的过程中,子页面数量上可以为多个,实际开发的子页面数量根据应用程序的复杂程度决定,实际开发应用程序采用iframe标签在父页面中嵌入多个子页面,便于实现子页面间的跳转和切换功能。故在子页面较多的情况下,子页面间切换的效率就显得尤其重要。
S12:基于iframe标签,每个子页面默认设置为加载子页面结构和子页面渲染。
HTML5的iframe标签拥有很多属性,通过这些属性可以设置和调整iframe标签对应的子页面在父页面上的展示方式。例如iframe标签包括:name:内嵌帧名称,frameborder:内嵌帧边框,scrolling:是否出现滚动条(“auto”为自动,“yes”为显示,“no”为不显示),src:内嵌入文件的地址,style:内嵌文档的样式(如设置文档背景等)。如要实现页面上的超链接指向某一个嵌入的页面,则需要给这个iframe命名。方法是<iframe name=**>,例如将该嵌入的页面命名为aa,写入<iframe width=420height=330name=aa  frameborder=0src=http://www.cctv.com></iframe>,然后,网页上的超链接语句应该写为:<a href=URL target=aa>,即可实现页面上的超链接指向某一个页面命名为aa的嵌入的页面。
本实施例中,根据子页面的子页面结构、子页面渲染和子页面数据加载的实际情况,通过采用iframe标签的src属性,将对应的iframe默认设置为该iframe只加载子页面结构和子页面渲染,但是不加载子页面数据,只有当跳转到该iframe对应的子页面上才会加载该子页面的子页面数据。具体地,每一子页面包括子页面显示页面和子页面数据,子页面结构和子页面渲染都属于子页面显示页面包含的内容。通过iframe的默认设置,可以使得子页面只显示简单的子页面结构和子页面渲染,而不加载子页面数据,能够提高子页面加载的速度,有助于页面间实现页面无空白快速跳转的效果。
S20:父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据页面交互方法函数切换到与下一子页面ID相对应的下一子页面显示页面。
其中,JavaScript中的所有事物都是对象,如字符串、数字、数组和日期等等。在JavaScript中,对象是拥有属性和方法的数据。子页面共有的JavaScript对象是指将各个子页面间具有相同功能的JavaScript对象提取出来,并统一封装的JavaScript对象。子页面共有的JavaScript对象的页面交互方法函数是指子页面间进行页面交互时采用的相同的页面交互方法函数,该页面交互方法函数统一封装到子页面共有的JavaScript对象中。其中,下一子页面包括下一子页面显示页面和下一子页面数据。下一子页面显示页面是指下一子页面在逻辑上的用于显示的页面,下一子页面数据是指下一子页面加载的所有数据。
本实施例中,根据获取的页面跳转指令,父页面调用预先封装好的子页面共有的JavaScript对象的页面交互方法函数,再根据该页面交互方法函数,依照下一子页面ID对应的下一子页面,从当前子页面切换到下一子页面显示页面。在调用子页面共有的JavaScript对象的页面交互方法函数时,只是实现切换到下一子页面显示页面的操作,其原因在于,该页面交互方法函数只负责页面交互,而不负责页面数据加载。通过调用子页面共有的JavaScript对象的页面交互方法函数,可以使得页面切换时更加流畅,多次引用子页面共有的JavaScript对象的页面交互方法函数实际只花费一次的加载时间,避免了每次页面跳转时都要重新调用页面交互方法函数。将子页面间功能相同的页面交互方法函数封装到子页面共有的JavaScript对象中,根据页面跳转指令,父页面调用预先封装好的子页面共有的JavaScript对象,在多次页面跳转的过程中,由于应用程序有缓存功 能,各个子页面多次引用一个相同的JavaScript对象实际只花费一次的加载时间,大大提高了页面切换的效率,缩短了页面切换时的等待时间。
在一具体实施方式中,如图3所示,步骤S20中,父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据页面交互方法函数切换到与下一子页面ID相对应的下一子页面显示页面,具体包括如下步骤:
S21:通过下一子页面ID获取相对应的下一子页面显示页面,根据页面交互方法函数将下一子页面显示页面预先设置在屏幕外任一侧。
本实施例中,应用程序根据下一子页面ID获取相对应的下一子页面显示页面,根据页面交互方法函数预先将下一子页面显示页面定位在屏幕外任一侧,其中,这里的屏幕是指终端设备的显示屏幕,即用户能够看到的实际界面。屏幕外任一侧是指用户看不到的在屏幕外侧的逻辑界面,该逻辑界面可以是在屏幕的上侧、左侧、右侧、下侧或其他位置。例如,可根据页面交互方法函数中的转场方法(如changePage方法函数)将下一子页面显示页面预先设置在屏幕的右侧。
S22:根据页面交互方法函数,令当前子页面向屏幕外移动,同时将下一子页面显示页面移动到当前子页面在屏幕原本的位置,以实现页面交互的过程。
本实施例中,根据页面交互方法函数,令当前子页面(包括当前子页面显示页面和当前子页面数据)向屏幕外移动,同时根据页面交互方法函数令下一子页面显示页面移动到当前子页面在屏幕原本的位置,实现页面交互的过程。具体地,在令当前子页面向屏幕外任一侧移动时,可以沿相同方向同时将下一子页面显示页面移动到当前子页面在屏幕原本的位置,以避免两个页面出现重叠。例如,根据页面交互方法函数中的animate方法函数,将当前子页面向屏幕左侧移动,同时也将下一子页面显示页面向左侧移动,两者移动的速率相同,且当下一子页面显示页面移动到屏幕位置时结束该移动动作。通过上述页面交互方法函数,能够实现多页面交互(即切换)的过程。由于该页面交互方法函数是通过子页面共有的JavaScript对象调用的,则在多次页面切换的过程中,由于应用程序有缓存功能,各个子页面多次引用一个页面交互方法函数实际只花费一次的加载时间,大大提高了页面切换的效率,缩短了页面切换时的等待时间。
需要说明的是,页面切换是页面跳转的一部分,在页面跳转时,还包括加载下一子页面的子页面数据。在一个具体实施方式中,页面跳转时页面动作性的切换和页面数据的加载是同时进行的,以上步骤S20是为了重点突出页面交互(切换)的过程,以下步骤S30-S40则是重点突出页面数据加载的过程,两者之间并无前后顺序关系。
S30:父页面基于页面跳转指令,通过当前子页面获取当前子页面中转数据。
当前子页面即页面跳转之前在终端设备屏幕显示的子页面。每一子页面中包含中转数据,其中,中转数据是指页面跳转时从当前子页面跳转到下一子页面过程中起承接作用的数据。当面子页面中转数据是指当前子页面所包含的中转数据。例如,该中转数据具体可以是机构等级、机构代码和数据维度等等。
本实施例中,根据获取的页面跳转指令,父页面通过当前子页面获取当前子页面中转数据,并将该当前子页面中转数据保存在父页面中,以在页面跳转过程中父页面根据当前子页面中转数据跳转到下一子页面,加载下一子页面数据。父页面通过当前子页面获取到当前子页面中转数据,实现了利用父页面进行数据中转的功能,通过父页面与子页面之间的沟通,提高了加载数据的效率。
在一具体实施方式中,当前子页面包括当前子页面中转数据,当前子页面中转数据保存在当前子页面的JavaScript对象中。
在该具体实施方式中,步骤S30具体包括如下步骤:父页面通过当前子页面的JavaScript对象获取当前子页面中转数据。
每一子页面都有子页面的JavaScript对象,父页面有父页面的JavaScript对象,在步骤S20中提及的子页面共有的JavaScript对象是指将每一子页面的JavaScript对象共有的、相同的方法函数统一封装成一个JavaScript对象,将该JavaScript对象称为子页面共有的JavaScript对象。当前子页面中转数据是页面跳转时起承接作用的数据,因为页面间的跳转有多种情况,且用户的实际需求不同,因此当前子页面中转数据不是子页面间共有的部分,需要单独进行获取。本实施例中,当前子页面包括当前子页面中转数据,并且当前子页面将当前子页面中转数据保存在当前子页面的JavaScript对象中,以使父页面能够通过当前子页面的JavaScript对象直接获取当前子页面中转数据。
进一步地,在父页面通过当前子页面的JavaScript对象获取当前子页面中转数据的步骤之后,还包括如下步骤:父页面将当前子页面中转数据保存在父页面的JavaScript对象中。
本实施例中,父页面根据获取的页面跳转指令,执行获取当前子页面中转数据的动作,具体为父页面通过当前子页面的JavaScript对象,获取该当前子页面中转数据,并将该当前子页面中转数据保存在父页面的JavaScript对象中。例如,当前子页面为车险日报,且页面通过机构等级、机构代码等当前子页面中转数据进行页面跳转时,在车险日报这个当前子页面中从全国的数据看到东南区的数据,并再次点击看到广东的数据时,每次动作 都会把当前子页面的机构代码和机构等级保存到当前子页面的JavaScript对象中,父页面再通过当前子页面的JavaScript对象将机构代码和机构等级保存到父页面的JavaScript对象中。
S40:基于页面跳转指令,父页面调用子页面共有的JavaScript对象的加载数据方法函数,根据加载数据方法函数和当前子页面中转数据,加载下一子页面ID相对应的下一子页面数据。
子页面共有的JavaScript对象的加载数据方法函数是指不同子页面间具有相同功能的加载数据方法函数。加载数据方法函数相比较页面交互方法函数,因为页面间的切换动作比较固定(例如根据页面之间的顺序逻辑关系,有向左侧滑动或向上滑动等切换动作),故页面交互方法函数可以包括绝大多数页面间相同的切换动作;而页面间数据的加载是有一定的差异的,可能只存在一部分加载数据是相同的,因此还需要借助当前子页面中转数据来确定最终加载的数据。如果两个子页面间没有共有的加载数据方法函数,则该共有的加载数据方法函数允许为空,实际上页面跳转过程只借助当前子页面中转数据实现数据的加载。
本实施例中,根据获取的页面跳转指令,父页面调用子页面共有的JavaScript对象的加载数据方法函数,并且获取当前子页面中转数据,通过加载数据方法函数和当前子页面中转数据加载下一子页面数据,通过调用子页面共有的JavaScript对象的加载数据方法函数实际上只花费一次调用该JavaScript对象的加载数据方法函数的时间,通过父页面实现数据的中转能够直接获取跳转所需的数据,加快数据加载的速度,实现从当前子页面向下一子页面跳转时快速加载数据的效果。
在一具体实施方式中,如图4所示,步骤S40中,基于页面跳转指令,父页面调用子页面共有的JavaScript对象的加载数据方法函数,根据加载数据方法函数和当前子页面中转数据,加载下一子页面ID相对应的下一子页面数据,具体包括如下步骤:
S41:根据加载数据方法函数获取下一子页面数据中的子页面共有数据。
下一子页面数据是指下一子页面中加载的所有数据,包括子页面共有数据和子页面非共有数据。本实施例中,在页面跳转过程中,父页面将调用子页面共有的JavaScript对象的加载数据方法函数,并根据该加载数据方法函数加载下一子页面数据中的子页面共有数据。例如可以是车险日报子页面和车险详情子页面中关于车险部分的共有数据。
S42:根据当前子页面中转数据,调用与当前子页面中转数据相对应的加载数据方法函数,获取下一子页面数据中的子页面非共有数据。
其中,与当前子页面中转数据相对应的加载数据方法函数与步骤S41中的加载数据方法函数都是指加载数据所需的方法函数,但是,两者具体加载的数据和具体采用的加载数据方法函数是不相同的。如步骤S41是指与下一子页面数据中的子页面共有数据相对应的加载数据方法函数;而本步骤是指与当前子页面中转数据相对应的加载数据方法函数。
本实施例中,在页面跳转过程中,父页面根据获取的当前子页面中转数据,调用与该子页面中转数据对应的加载数据方法函数,加载下一子页面数据中的子页面非共有数据。
例如,当页面是通过机构等级、机构代码等当前子页面中转数据进行页面跳转时,在车险日报当前子页面从全国的数据看到东南区的数据,并再次点击看到广东的数据时,每次动作都会把当前子页面的机构代码和机构等级保存到当前子页面的JavaScript对象中,父页面再通过当前子页面将机构代码和机构等级保存到父页面的JavaScript对象中。当在该车险日报子页面需要查看广东某一机构车险日报的详情时,因为车险日报和车险详情是不同的子页面,所以在页面跳转时需要根据父页面的JavaScript对象中保存的当前子页面中转数据(在这里具体是指车险日报的机构代码和机构等级,即广东的某一机构),请求该当前子页面中转数据对应的车险详情子页面中广东的某一机构的详情数据。通过广东车险日报子页面的当前子页面中转数据,实现从广东车险日报子页面跳转到广东车险详情子页面的功能。
本实施例所提供的多页面切换方法中,首先父页面获取页面跳转指令,页面跳转指令包括下一子页面ID,通过获取的页面跳转指令,能够有效达到页面切换、跳转的目的,能够准确实现页面跳转的结果。接着父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据页面交互方法函数切换到与下一子页面ID相对应的下一子页面显示页面,通过父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,使得每次切换中父页面在调用子页面共有的JavaScript对象的页面交互方法函数时,实际上只花了一次调用该JavaScript对象的时间,有效实现了页面切换过程中页面间无空白衔接切换的效果,大大提高了页面切换的效率,缩短了页面切换时的等待时间。然后父页面通过页面跳转指令获取到子页面中转数据,实现了利用父页面进行数据中转的功能,通过父页面与子页面之间的沟通,有效提高加载数据的效率。最后父页面基于页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据加载数据方法函数和当前子页面中转数据,获取下一子页面ID相对应的下一子页面数据,并将下一子页面数据加载在下一子页面显示页面,通过父页面实现数据的中转能够直接获取跳转所需的数据,加快数据加载的速度,实现从当前子页面向下一子页面跳转时快速加载 数据的效果。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
实施例2
图5示出与实施例1中多页面切换方法一一对应的业多页面切换装置的原理框图。如图5所示,该多页面切换装置包括页面跳转指令获取模块10、页面切换模块20、中转数据获取模块30和数据加载模块40。其中,页面跳转指令获取模块10、页面切换模块20、中转数据获取模块30和数据加载模块40的实现功能与实施例1中多页面切换方法对应的步骤一一对应,为避免赘述,本实施例不一一详述。
页面跳转指令获取模块10,用于父页面获取页面跳转指令,页面跳转指令包括下一子页面ID。
页面切换模块20,用于父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据页面交互方法函数切换到与下一子页面ID相对应的下一子页面显示页面。
中转数据获取模块30,用于父页面基于页面跳转指令,通过当前子页面获取当前子页面中转数据。
数据加载模块40,用于父页面基于页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据加载数据方法函数和当前子页面中转数据,获取下一子页面ID相对应的下一子页面数据,并将下一子页面数据加载在下一子页面显示页面。
优选地,页面切换模块20包括定位单元21和移动单元22。
定位单元21,用于通过下一子页面ID获取相对应的下一子页面显示页面,根据页面交互方法函数将下一子页面显示页面预先定位在屏幕外任一侧。
移动单元22,用于根据页面交互方法函数,令当前子页面沿远离下一子页面显示页面所在的位置向屏幕外移动,将下一子页面显示页面移动到当前子页面在屏幕原本的位置。
优选地,当前子页面包括当前子页面中转数据,当前子页面中转数据保存在当前子页面的JavaScript对象中。
中转数据获取模块30,用于父页面通过所述当前子页面的JavaScript对象获取所述当前子页面中转数据。
优选地,多页面切换装置还包括中转数据保存模块50,用于父页面将当前子页面中转数据保存在父页面的JavaScript对象中。
优选地,下一子页面ID与页面跳转指令的获取按钮相关联。
优选地,数据加载模块40包括共有数据获取单元41和非共有数据获取单元42。
共有数据获取单元41,用于根据子页面共有的JavaScript对象相对应的加载数据方法函数获取下一子页面数据中的子页面共有数据。
非共有数据获取单元42,用于根据当前子页面中转数据,调用与当前子页面中转数据相对应的加载数据方法函数,获取下一子页面数据中的子页面非共有数据。
优选地,多页面切换装置还包括子页面设置模块60,子页面设置模块60包括子页面创建单元61和子页面默认设置单元62。
子页面创建单元61,用于采用iframe标签在父页面创建至少两个子页面。
子页面默认设置单元62,用于基于iframe标签,每个子页面默认设置为加载子页面结构和子页面渲染。
本实施例所提供的多页面切换装置中,页面跳转指令获取模块10用于父页面获取页面跳转指令,页面跳转指令包括下一子页面ID,通过获取的页面跳转指令,能够有效达到页面切换、跳转的目的,能够准确实现页面跳转的结果。页面切换模块20用于父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据页面交互方法函数切换到与下一子页面ID相对应的下一子页面显示页面,通过父页面基于页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,使得每次切换中父页面在调用子页面共有的JavaScript对象的页面交互方法函数时,实际上只花了一次调用该JavaScript对象的时间,有效实现了页面切换过程中页面间无空白衔接切换的效果,大大提高了页面切换的效率,缩短了页面切换时的等待时间。中转数据获取模块30用于父页面基于页面跳转指令,通过当前子页面获取当前子页面中转数据,通过父页面与子页面之间的沟通,有效提高加载数据的效率。数据加载模块40用于父页面基于页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据加载数据方法函数和当前子页面中转数据,获取下一子页面ID相对应的下一子页面数据,并将下一子页面数据加载在下一子页面显示页面,通过父页面实现数据的中转能够直接获取跳转所需的数据,加快数据加载的速度,实现从当前子页面向下一子页面跳转时快速加载数据的效果。
实施例3
本实施例提供一计算机可读存储介质,该计算机可读存储介质上存储有计算机可读指令,该计算机可读指令被处理器执行时实现实施例1中多页面切换方法,为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现实施例2中多页面切换装置中 各模块/单元的功能,为避免重复,这里不再赘述。
实施例4
图6是本实施例中终端设备的示意图。如图6所示,终端设备70包括处理器71、存储器72以及存储在存储器72中并可在处理器71上运行的计算机可读指令73。处理器71执行计算机可读指令73时实现实施例1中多页面切换方法的各个步骤,例如图1所示的步骤S10、S20、S30和S40。或者,处理器71执行计算机可读指令73时实现实施例2中多页面切换装置各模块/单元的功能,如图5所示页面跳转指令获取模块10、页面切换模块20、中转数据获取模块30和数据加载模块40的功能。
示例性的,计算机可读指令73可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器72中,并由处理器71执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令73的指令段,该指令段用于描述计算机可读指令73在终端设备70中的执行过程。例如,计算机可读指令70可被分割成实施例2中的页面跳转指令获取模块10、页面切换模块20、中转数据获取模块30和数据加载模块40,各模块的具体功能如实施例2所示,为避免重复,此处不一一赘述。
终端设备70可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。终端设备可包括,但不仅限于,处理器71、存储器72。本领域技术人员可以理解,图6仅仅是终端设备70的示例,并不构成对终端设备70的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器71可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门陈列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器72可以是终端设备70的内部存储单元,例如终端设备70的硬盘或内存。存储器72也可以是终端设备70的外部存储设备,例如终端设备70上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器72还可以既包括终端设备70的内部存储单元也包括外部存储设备。存储器72用于存储计算机可读指令以及终端设备所需的其他程序和数 据。存储器72还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种多页面切换方法,其特征在于,包括:
    父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
    父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
    父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
    父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
  2. 根据权利要求1所述的多页面切换方法,其特征在于,在所述父页面获取页面跳转指令的步骤之前,所述多页面切换方法还包括:
    采用iframe标签在父页面创建至少两个子页面;
    基于所述iframe标签,每个所述子页面默认设置为加载子页面结构和子页面渲染。
  3. 根据权利要求1所述的多页面切换方法,其特征在于,所述根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面,包括:
    通过所述下一子页面ID获取相对应的所述下一子页面显示页面,根据所述页面交互方法函数将所述下一子页面显示页面预先定位在屏幕外任一侧;
    根据所述页面交互方法函数,令当前子页面沿远离所述下一子页面显示页面所在的位置向屏幕外移动,将所述下一子页面显示页面移动到所述当前子页面在屏幕原本的位置。
  4. 根据权利要求1所述的多页面切换方法,其特征在于,所述当前子页面包括所述当前子页面中转数据,所述当前子页面中转数据保存在所述当前子页面的JavaScript对象中;
    所述父页面通过当前子页面获取当前子页面中转数据,包括:
    所述父页面通过所述当前子页面的JavaScript对象获取所述当前子页面中转数据。
  5. 根据权利要求4所述的多页面切换方法,其特征在于,在所述父页面通过所述当前子页面的JavaScript对象获取所述当前子页面中转数据的步骤之后,还包括:
    父页面将所述当前子页面中转数据保存在所述父页面的JavaScript对象中。
  6. 根据权利要求1所述的多页面切换方法,其特征在于,所述根据所述加载数据方法 函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,包括:
    根据所述子页面共有的JavaScript对象相对应的加载数据方法函数获取所述下一子页面数据中的子页面共有数据;
    根据所述当前子页面中转数据,调用与所述当前子页面中转数据相对应的加载数据方法函数,获取所述下一子页面数据中的子页面非共有数据。
  7. 根据权利要求1所述的多页面切换方法,其特征在于,所述下一子页面ID与所述页面跳转指令的获取按钮相关联。
  8. 一种页面切换装置,其特征在于,包括:
    页面跳转指令获取模块,用于父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
    页面切换模块,用于父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
    中转数据获取模块,用于父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
    数据加载模块,用于父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
  9. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
    父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
    父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
    父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相 对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
  10. 根据权利要求9所述的终端设备,其特征在于,在所述父页面获取页面跳转指令的步骤之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    采用iframe标签在父页面创建至少两个子页面;
    基于所述iframe标签,每个所述子页面默认设置为加载子页面结构和子页面渲染。
  11. 根据权利要求9所述的终端设备,其特征在于,所述根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面,包括:
    通过所述下一子页面ID获取相对应的所述下一子页面显示页面,根据所述页面交互方法函数将所述下一子页面显示页面预先定位在屏幕外任一侧;
    根据所述页面交互方法函数,令当前子页面沿远离所述下一子页面显示页面所在的位置向屏幕外移动,将所述下一子页面显示页面移动到所述当前子页面在屏幕原本的位置。
  12. 根据权利要求9所述的终端设备,其特征在于,所述所述当前子页面包括所述当前子页面中转数据,所述当前子页面中转数据保存在所述当前子页面的JavaScript对象中;
    所述父页面通过当前子页面获取当前子页面中转数据,包括:
    所述父页面通过所述当前子页面的JavaScript对象获取所述当前子页面中转数据。
  13. 根据权利要求12所述的终端设备,其特征在于,在所述父页面通过所述当前子页面的JavaScript对象获取所述当前子页面中转数据的步骤之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    父页面将所述当前子页面中转数据保存在所述父页面的JavaScript对象中。
  14. 根据权利要求9所述的终端设备,其特征在于,所述根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,包括:
    根据所述子页面共有的JavaScript对象相对应的加载数据方法函数获取所述下一子页面数据中的子页面共有数据;
    根据所述当前子页面中转数据,调用与所述当前子页面中转数据相对应的加载数据方法函数,获取所述下一子页面数据中的子页面非共有数据。
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    父页面获取页面跳转指令,所述页面跳转指令包括下一子页面ID;
    父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的页面交互方法函 数,根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面;
    父页面基于所述页面跳转指令,通过当前子页面获取当前子页面中转数据;
    父页面基于所述页面跳转指令调用子页面共有的JavaScript对象的加载数据方法函数,根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,并将所述下一子页面数据加载在所述下一子页面显示页面。
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,在所述父页面获取页面跳转指令的步骤之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    采用iframe标签在父页面创建至少两个子页面;
    基于所述iframe标签,每个所述子页面默认设置为加载子页面结构和子页面渲染。
  17. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述根据所述页面交互方法函数切换到与所述下一子页面ID相对应的下一子页面显示页面,包括:
    通过所述下一子页面ID获取相对应的所述下一子页面显示页面,根据所述页面交互方法函数将所述下一子页面显示页面预先定位在屏幕外任一侧;
    根据所述页面交互方法函数,令当前子页面沿远离所述下一子页面显示页面所在的位置向屏幕外移动,将所述下一子页面显示页面移动到所述当前子页面在屏幕原本的位置。
  18. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述当前子页面包括所述当前子页面中转数据,所述当前子页面中转数据保存在所述当前子页面的JavaScript对象中;
    所述父页面通过当前子页面获取当前子页面中转数据,包括:
    所述父页面通过所述当前子页面的JavaScript对象获取所述当前子页面中转数据。
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,在所述父页面通过所述当前子页面的JavaScript对象获取所述当前子页面中转数据的步骤之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    父页面将所述当前子页面中转数据保存在所述父页面的JavaScript对象中。
  20. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述根据所述加载数据方法函数和所述当前子页面中转数据,获取所述下一子页面ID相对应的下一子页面数据,包括:
    根据所述子页面共有的JavaScript对象相对应的加载数据方法函数获取所述下一子页面数据中的子页面共有数据;
    根据所述当前子页面中转数据,调用与所述当前子页面中转数据相对应的加载数据方法函数,获取所述下一子页面数据中的子页面非共有数据。
PCT/CN2018/077335 2018-01-08 2018-02-27 多页面切换方法、装置、终端设备及存储介质 WO2019134237A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810014131.3 2018-01-08
CN201810014131.3A CN108459888B (zh) 2018-01-08 2018-01-08 多页面切换方法、装置、终端设备及存储介质

Publications (1)

Publication Number Publication Date
WO2019134237A1 true WO2019134237A1 (zh) 2019-07-11

Family

ID=63220524

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/077335 WO2019134237A1 (zh) 2018-01-08 2018-02-27 多页面切换方法、装置、终端设备及存储介质

Country Status (2)

Country Link
CN (1) CN108459888B (zh)
WO (1) WO2019134237A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542296A (zh) * 2018-11-30 2019-03-29 北京字节跳动网络技术有限公司 一种标题的切换方法、装置、电子设备及可读介质
CN110119296B (zh) * 2019-04-30 2021-09-14 华为技术有限公司 切换父页面和子页面的方法、相关装置
CN112988531B (zh) * 2019-12-18 2022-08-12 中国移动通信集团浙江有限公司 应用软件的易用性评估方法、装置及计算设备
CN111324340B (zh) * 2020-02-20 2021-07-20 腾讯科技(深圳)有限公司 基于网页副本的交互方法、装置、存储介质和计算机设备
CN112068837B (zh) * 2020-09-10 2023-07-18 浪潮软件科技有限公司 一种终端页面调转及数据保持的方法
CN112182442A (zh) * 2020-09-28 2021-01-05 湖南亚信软件有限公司 页面处理方法、装置、电子设备及计算机可读存储介质
CN113312119B (zh) * 2021-06-04 2024-03-15 广州博冠信息科技有限公司 信息同步方法及装置、计算机可读存储介质、电子设备
CN114816564B (zh) * 2022-04-01 2024-10-29 维沃移动通信有限公司 应用加载方法、装置和电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6877134B1 (en) * 1997-08-14 2005-04-05 Virage, Inc. Integrated data and real-time metadata capture system and method
CN103856540A (zh) * 2012-12-06 2014-06-11 腾讯科技(深圳)有限公司 响应处理方法及响应处理装置
CN105989083A (zh) * 2015-02-11 2016-10-05 阿里巴巴集团控股有限公司 切换访问环境的方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572263B (zh) * 2014-12-30 2017-11-07 腾讯科技(深圳)有限公司 一种页面数据交互方法、相关装置及系统
CN107480148A (zh) * 2016-06-07 2017-12-15 广州市动景计算机科技有限公司 控制网页跳转的方法及装置及用户终端

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6877134B1 (en) * 1997-08-14 2005-04-05 Virage, Inc. Integrated data and real-time metadata capture system and method
CN103856540A (zh) * 2012-12-06 2014-06-11 腾讯科技(深圳)有限公司 响应处理方法及响应处理装置
CN105989083A (zh) * 2015-02-11 2016-10-05 阿里巴巴集团控股有限公司 切换访问环境的方法及装置

Also Published As

Publication number Publication date
CN108459888A (zh) 2018-08-28
CN108459888B (zh) 2019-10-08

Similar Documents

Publication Publication Date Title
WO2019134237A1 (zh) 多页面切换方法、装置、终端设备及存储介质
KR102179149B1 (ko) 페이지 컴포넌트 동적 레이아웃
CN108984714B (zh) 页面渲染方法、装置、电子设备及计算机可读介质
US20190320035A1 (en) Method and Apparatus for Automatically Optimizing the Loading of Images in a Cloud-Based Proxy Service
US8990289B2 (en) Server based framework for improving Ajax performance
US10303748B2 (en) Method and device for providing webpage browsing based on web browser engine kernel
CN109254773A (zh) 骨架页面生成方法、装置、设备和存储介质
CN111158686B (zh) 网页弹框生成方法及装置、电子设备、存储介质
US8245125B1 (en) Hybrid rendering for webpages
US20140222947A1 (en) Method and apparatus for browsings webpages, and storage medium
US8914813B1 (en) Interfaces to enable cross-browser extensions and applications thereof
US20170302747A1 (en) Card-type desktop implementation method, apparatus, and system
US9679075B1 (en) Efficient delivery of animated image files
WO2019052417A1 (zh) 页面加载方法、装置、电子设备及存储介质
CN108829398B (zh) 一种移动端页面交互实现方法及装置
CN111639278A (zh) 一种网页加载方法及装置
US10594764B2 (en) Request cache to improve web applications performance
CN109683978A (zh) 一种流式布局界面渲染的方法、装置以及电子设备
WO2014075509A1 (zh) 浏览器进行页面元素处理的方法及装置
CN111104117A (zh) 页面主题风格切换方法、装置、电子设备及计算机存储介质
US20240007701A1 (en) Continuing video playback when switching from a dynamic page to a non-dynamic page
CN113655999A (zh) 一种页面控件的渲染方法、装置、设备及存储介质
CN110262749B (zh) 一种网页操作方法、装置、容器、设备及介质
CN108874373B (zh) 向网页内插入信息的方法及装置、显示终端及存储介质
US10171542B2 (en) Method for providing cloud streaming service, device and system for same, and computer-readable recording medium having, recorded thereon, cloud streaming script code for same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18898089

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.10.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18898089

Country of ref document: EP

Kind code of ref document: A1