Disclosure of Invention
In order to solve the above technical problems, a main object of the present invention is to provide a page jump method, device, system and storage medium, so as to solve the technical problem that when the same dependent navigation is set under different navigation buttons of an independent page in the prior art, if a page corresponding to a popped message link is jumped from a current page, the dependent navigation of which navigation button is jumped to cannot be selected, and thus the page corresponding to the message link cannot be jumped to.
The technical scheme of the invention is realized by the following modes:
a page jump method comprises the following steps:
generating a jump command according to a page address, wherein the jump command is a uniform resource locator command and comprises the page address;
judging whether the page address in the jump command comprises an independent page address or not;
when the page address in the jump command comprises an independent page address, jumping to an independent page corresponding to the independent page address, and simultaneously displaying the pages embedded in the independent page;
otherwise, the page address in the jump command is a sub-page address, and the sub-page corresponding to the sub-page address is jumped to through an independent page frame bearing the sub-page so as to complete the jump of the page.
Preferably, when the page address in the jump command includes an independent page address, the jump command further includes a jump parameter, and a value of the jump parameter is an address of a page embedded in the independent page; the page embedded in the independent page corresponding to the address of the page embedded in the independent page is embedded in the independent page corresponding to the address of the independent page;
and simultaneously displaying the independent page corresponding to the independent page address and the page embedded in the independent page corresponding to the address of the page embedded in the independent page according to the independent page address and the address of the page embedded in the independent page.
Preferably, a first-level navigation is arranged in an independent page corresponding to the independent page address, the first-level navigation corresponds to a page embedded in the independent page, a second-level navigation and a third-level navigation are arranged in the page embedded in the independent page, the second-level navigation and the third-level navigation are respectively provided with a subordinate page embedded in the independent page, and the priority of the first-level navigation, the priority of the second-level navigation and the priority of the third-level navigation are sequentially reduced.
Preferably, when the page address in the jump command is a sub-page address, displaying the sub-page corresponding to the sub-page address through an independent page frame bearing the sub-page, wherein a sub-page title is set in the sub-page address.
Preferably, the display mode of the sub-page comprises: the title bar is arranged at the top or the bottom of the independent page frame, a return key is arranged on the left side of the title bar, a sub-page title is arranged in the middle of the title bar, and the sub-page for displaying contents is arranged below or above the title bar.
Preferably, the sub-page title is set by a default value set by the jump command or a native code.
Preferably, before determining whether the page corresponding to the page address in the jump command is an independent page, the method further includes:
initializing an application program corresponding to the jump command;
defining page addresses of independent pages and sub-pages in the application program;
and acquiring the page address.
A page jump device comprises
A skip command generation module, configured to generate a skip command according to a page address, where the skip command is a uniform resource locator command and includes the page address;
the judging module is used for judging whether the page address in the jump command comprises an independent page address or not;
the skip module is used for skipping to an independent page corresponding to the independent page address when the page address in the skip command comprises the independent page address, and simultaneously displaying the pages embedded in the independent page; otherwise, the page address in the jump command is a sub-page address, and the sub-page corresponding to the sub-page address is jumped to through an independent page frame bearing the sub-page so as to complete the jump of the page.
A page jump system comprising:
a memory for storing program instructions;
and the processor is used for executing the program instructions to realize the jump method.
A storage medium storing readable instructions which, when executed by a processor, implement the jump method described above.
Compared with the prior art, the page skipping method, the device, the system and the storage medium have the following beneficial effects that:
1) the invention determines the page needing to be jumped finally by defining page addresses for the independent page and the sub-page, generating a jump command of a uniform resource locator according to the page addresses, and judging whether the jump command needs to jump to the independent page or the sub-page. When the message link is popped up, whether the message link is jumped to an independent page or a sub-page can be judged according to the page address by the jump method.
2) The method can directly jump to the page corresponding to the subordinate navigation according to the page address when the jump command summary only comprises the sub-page address, namely different navigation buttons in the independent page navigation bar are provided with the same subordinate navigation, and the page corresponding to the subordinate navigation is not the page corresponding to the subordinate navigation in the navigation buttons and is a regenerated sub-page. The sub-page is displayed by a unified independent page frame carrying the sub-pages. The problem that in the prior art, when the same subordinate navigation is arranged in different navigation buttons in an independent page navigation bar, the subordinate navigation in which navigation button can not be selected, so that correct page jump can not be carried out is solved.
3) When the jump method jumps to the independent page, the jump command comprises the independent page address and the sub-page address, the independent page is provided with the first-level navigation, the first-level navigation corresponds to the page embedded in the independent page in the sub-page address, the page embedded in the independent page is also provided with the second-level navigation or more levels of navigation, and each level of navigation respectively corresponds to the page embedded in the independent page which is subordinate to the page embedded in the independent page and corresponds to the previous-level navigation. When the independent page and the page embedded in the independent page exist at the same time, the independent page and the page embedded in the independent page can be displayed at the same time after the independent page is jumped to. Therefore, the invention also realizes the function of jumping of the multi-level sub-pages in the independent page, and the page corresponding to the navigation from the first level to the last level of the independent page can be clearly displayed.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
The invention is further explained with reference to the drawings.
The preset steps need to be executed in advance before executing the flow of the jump method shown in fig. 1, and the steps shown in fig. 1 are executed after the preset steps are executed. The presetting step mainly comprises the following steps:
initializing the application program needing to be jumped, initializing all data of the application program, and ensuring that the application program does not receive the influence of other data. The application program needing to jump is initialized during design and installation, and the application program needing to jump is directly used when the application program needs to be used.
Since the page in the application is divided into an independent page and a sub-page, the page addresses of the independent page and the sub-page in the application are defined after the application is initialized. The addresses of the individual pages and the addresses of the sub-pages are defined by uniform resource locators. The independent page address may be an independent page of the main page only, and an independent page may be understood as a page that can occupy the full screen of the application, that is, a page that is displayed from the beginning of the application opening and includes an option button in the most basic navigation bar (or menu bar) of the application. For example, in fig. 2, the independent page includes four navigation option buttons of live broadcast, highlight, discovery id and personal center displayed in the bottom navigation bar, no matter what sub-page is embedded in the page displayed by the four navigation option buttons, as long as the page including the navigation option buttons is the independent page. A sub-page may be understood as a page embedded in a separate page.
And acquiring a defined independent page address or sub-page address, wherein the acquired independent page address or sub-page address is used for jumping to the acquired independent page or sub-page.
As shown in fig. 1, which is a schematic flow chart of a page jump method provided in an embodiment of the present invention, the page jump method mainly includes the following steps:
step S100, generating a jump command according to the page address, wherein the jump command is a uniform resource locator command and comprises the page address.
Specifically, a jump command is generated according to the acquired independent page address and the sub-page address after the definition, and the generated jump command comprises the independent page address and/or the sub-page address after the definition. The jump command can only comprise an independent page address or only comprise a sub-page address, when the jump command only comprises the independent page address, the main page of the application program is directly jumped to according to the jump command, and when the jump command only comprises the sub-page address, the sub-page is directly jumped to according to the jump command. The jump command is also a Uniform Resource Locator (URL) command that matches a defined independent page address or sub-page address.
Taking the YY application as an example, when another application (for example, a tremble or the like) is used, in the process of watching a video on a tremble, an information link of YY pops up from a page of the currently played video on the tremble, and when the information link of the popped up YY is interested, the information link needs to be clicked. The information link is generated based on the defined individual page address or sub-page address as a jump command. Before the jump command is not clicked, the jump command is only acquired, the page to which the jump command needs to jump is not jumped, and whether the page to which the jump command needs to jump is an independent page or a sub-page is not known.
Step S200, judging whether the page address in the jump command is an independent page address. After the jump command is generated, the page jump is required according to the jump command, that is, the jump command is required to be clicked, and after the jump command is clicked, the jump operation is executed according to the jump command. The jump command specifies which addresses to jump to and which addresses to jump to. And the YY application program judges whether the page address in the jump command is an independent page address or a sub-page address.
And step S300, when the page address in the jump command is an independent page address, jumping to an independent page corresponding to the independent page address, and simultaneously displaying the pages embedded in the independent page.
Specifically, when the page address in the jump command only includes the independent page address, directly jumping to the home page of the independent page included in the jump command according to the jump command, wherein the independent page address included in the jump command is the home page address of the application program. Since the other navigations in the application's home page and the corresponding sub-pages are not included in the jump command. Also taking the YY application as an example, if the jump command is as follows:
yymobile://Entrance/MainActivity
- -/Entrance/MainActivity (Home page)
The jump command only comprises a home page address, a page after jumping is a default home page in the YY application program, the default home page is a page corresponding to a live button in the navigation bar, and the default home page can also be a page corresponding to other buttons in the navigation bar. Referring to fig. 2, in the page displayed in fig. 2, the live broadcast, the bright spot, the discovery id in the bottom navigation bar and the bright spot in the four navigation buttons in the personal center are in a solid state, so the page displayed in fig. 2 is an independent page of the bright spot, the bright spot in the solid state is switched to the solid live broadcast, and meanwhile, the independent page of the bright spot is also switched to the independent page in the live broadcast, that is, the independent page after the jump command jumps. And when only jumping to the independent page, displaying the default corresponding sub-pages simultaneously without considering the page embedded in the independent page and included in the independent page.
Further, when the page address in the jump command includes not only the independent page address but also the jump parameter, it is necessary to further jump to the page corresponding to the jump parameter after jumping to the independent page. The value of the jump parameter is the address of a page embedded in an independent page, and the page embedded in the independent page corresponding to the address of the page embedded in the independent page is embedded in the independent page corresponding to the address of the independent page. And simultaneously displaying the independent page corresponding to the independent page address and the page embedded in the independent page corresponding to the address of the page embedded in the independent page according to the independent page address and the address of the page embedded in the independent page.
The method comprises the steps that a first-level navigation is arranged in an independent page corresponding to an independent page address, the first-level navigation corresponds to a page embedded in the independent page, a second-level navigation and a third-level navigation, even more multi-level navigation, are arranged in the page embedded in the independent page, the second-level navigation, the third-level navigation and even more multi-level navigation are respectively provided with a page embedded in the independent page in a subordinate manner, the priority of the first-level navigation, the priority of the second-level navigation and the priority of the third-level navigation are sequentially reduced, and the higher the navigation level is, the lower the.
Taking fig. 2 as an example for explanation, the jump commands corresponding to the pages shown in the figure are as follows:
the jump command includes an independent page address and a sub-page address corresponding to a sub-page embedded in the independent page. In a command
yymobile://Entrance/MainActivity?
- -/Entrance/MainActivity (Home page)
Namely the independent page address, the page corresponding to the live broadcast navigation button can be jumped to through the independent page address. As the default of the system is the live navigation button in the navigation bar, the system jumps to the page corresponding to the live navigation button, and can also jump to the page corresponding to other navigation buttons in the navigation bar through setting.
Among the above jump commands
The value of the jump parameter is the address of the page embedded in the independent page, finally the jump can be carried out to the page embedded in the independent page corresponding to the address of the page embedded in the independent page through the address of the independent page and the address of the page embedded in the independent page, and the page embedded in the independent page is displayed in the independent page corresponding to the address of the independent page.
When passing through the jump command
After the jump, the independent page corresponding to the independent page address is the content shown in 201 in fig. 2. The page embedded in the independent page corresponding to the address of the page embedded in the independent page is the content shown at 202 in fig. 2. The page embedded in the independent page is embedded in the independent page, and the independent page is an independent page corresponding to the home page. When the jump command has a first-level navigation, a first-level navigation button (such as live broadcast, bright spot, id discovery and personal center) is arranged in the navigation bar, and the jump command has a first-level navigation address, so that the independent page is jumped from the page corresponding to the first page to the independent page corresponding to the bright-spot navigation button. The page displayed by the highlight navigation button shown in 201 is an independent page, and a navigation bar button which is the most basic of the application program is displayed in the page. The page displayed by 202 is a page embedded in the independent page of the independent page corresponding to the bright point of the navigation button in the primary navigation, and the page embedded in the independent page realizes the jump through the last two addresses in the jump command.
202, the page embedded in the independent page is further provided with a secondary navigation, the secondary navigation can be a small video, a melody and a skew reading set at the top, three navigation buttons in the secondary navigation are respectively provided with a subordinate page embedded in the independent page, and a tertiary navigation is further arranged in the page embedded in the independent page, and the tertiary navigation is shown as a square, a topic and the same city in the figure. Taking the small video in the secondary navigation button as an example, the page embedded in the independent page corresponding to the small video is the tertiary navigation and the page embedded in the independent page corresponding to the tertiary navigation. The page shown in 203 in the figure is a page corresponding to the square navigation button in the three-level navigation, and the page shown in fig. 2 is a page to be finally displayed by the jump command.
The page embedded in the independent page can be embedded with a plurality of slaves, the priority of the navigation is lower as the navigation series is higher. And the page finally jumped by the jump command is the page of the last subordinate embedded in the independent page and corresponds to the navigation of the last level.
When the jump method jumps to the independent page, the jump command comprises the independent page address and the sub-page address, the independent page is provided with the first-level navigation, the first-level navigation corresponds to the page embedded in the independent page in the sub-page address, the page embedded in the independent page is also provided with the second-level navigation or more levels of navigation, and each level of navigation respectively corresponds to the page embedded in the independent page which is subordinate to the page embedded in the independent page and corresponds to the previous-level navigation. When the independent page and the page embedded in the independent page exist at the same time, the independent page and the page embedded in the independent page can be displayed at the same time after the independent page is jumped to. Therefore, the invention also realizes the function of jumping of the multi-level sub-pages in the independent page, and the page corresponding to the navigation from the first level to the last level of the independent page can be clearly displayed.
Step S400, when the page address in the jump command does not include the independent page address, the page address in the jump command is a sub-page address, and the sub-page corresponding to the sub-page address is jumped to through the independent page frame bearing the sub-page.
Specifically, the sub-page corresponding to the sub-page address may be displayed through an independent page frame bearing the sub-page, and the sub-page address is provided with a sub-page title. If the jump command only comprises the sub-page address, directly jumping to the sub-page address in the jump command according to the sub-page address in the jump command, no matter which independent page corresponding to the navigation button originally embedded in the primary navigation bar comprises the sub-page address or which page embedded in the independent page is the subordinate embedded page of the page corresponding to the navigation button embedded in the independent page. The sub-page after the jump is displayed through a uniform independent page frame carrying the sub-page, and the sub-page after the jump occupies all display interfaces of the whole application program.
The display mode of the sub-page comprises the following steps: the title bar is arranged at the top or the bottom of the independent page frame, a return key is arranged on the left side of the title bar, a sub-page title is arranged in the middle of the title bar, and the sub-page for displaying contents is arranged below or above the title bar. And the sub-page title is set through a default value set by the jump command or the local code, wherein the title mode set in the jump command has the highest priority and is used preferentially.
Referring to fig. 3, for example, the jump commands corresponding to the pages shown in the figure are as follows:
yymobile:// TinyVideo/squarettitle ═ square
Since the navigation of the plaza is not available in the navigation buttons in the top page navigation bar of the application program, namely the primary navigation bar, and only the address of the sub-page exists in the jump command, the page after the jump is directly the sub-page of the plaza, no matter which of the independent pages of the application program including the primary navigation is embedded in the page of the independent page. For example, when the squares are set in the navigation corresponding to the pages of the independent page embedded in the small video, the mystery and the wry in the diagram shown in fig. 2, the system directly jumps to a new square sub-page according to the jump command, and the content displayed by the square sub-page comprises the content embedded in the pages of the independent page in the small video, the mystery and the wry. The sub-page is displayed through a separate page frame carrying the sub-page, so the display effect of the sub-page is also to occupy the whole screen of the application, as shown in 301.
The sub-page display mode can be a title bar arranged at the top of an independent page frame, a return key is arranged on the left side of the title bar, a sub-page title is arranged in the middle of the title bar, a square sub-page for displaying content is arranged below or above the title bar, and the square sub-page is as shown in 302.
The method can directly jump to the page corresponding to the subordinate navigation according to the page address when the jump command summary only comprises the sub-page address, namely different navigation buttons in the independent page navigation bar are provided with the same subordinate navigation, and the page corresponding to the subordinate navigation is not the page corresponding to the subordinate navigation in the navigation buttons and is a regenerated sub-page. The sub-page is displayed by a unified independent page frame carrying the sub-pages. The problem that in the prior art, when the same subordinate navigation is arranged in different navigation buttons in an independent page navigation bar, the subordinate navigation in which navigation button can not be selected, so that correct page jump can not be carried out is solved.
The page jumping method provided by the embodiment of the invention realizes the page jumping, and the page jumping method can be completed by a jumping device. As shown in fig. 4, the present invention also provides a page jump device, which mainly includes:
the jump command generating module 1 is configured to generate a jump command according to a page address, where the jump command is a uniform resource locator command and includes the page address.
And the judging module 2 is used for judging whether the page address in the jump command is an independent page address.
The skip module 3 is used for skipping to an independent page corresponding to the independent page address when the page address in the skip command is the independent page address, and simultaneously displaying the pages embedded in the independent page; otherwise, the page address in the jump command is a sub-page address, and the sub-page corresponding to the sub-page address is jumped to through an independent page frame bearing the sub-page so as to complete the jump of the page.
The skipping device can realize the scheme in the skipping method, can solve the problem solved by the skipping method, and achieves the technical effect same as that of the skipping method.
The invention also provides a page jump system, which comprises: more than one memory and more than one processor. Wherein,
a memory (not shown) for storing program instructions, the memory may be transient or persistent.
And the processor (not shown in the figure) is used for executing the program instructions to implement the page jump method in the technical scheme.
The invention also provides a storage medium, wherein the storage medium stores readable instructions, and the readable instructions can be executed by a processor to realize the page jump method in the technical scheme.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are also included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.