Page display method and deviceTechnical Field
The invention relates to the field of mobile communication, in particular to a page display method and device.
Background
Usually, when browsing web pages or shopping on apps of mobile devices, the web pages need to show different kinds of merchandise lists or news lists. Due to the limitation of the display area of the mobile device, a software developer may display a plurality of lists on a page, thereby causing each list not to completely display the specific content of each list. In the prior art, developers would add one "more" control or button per list to link to a page that fully displays the specific content of each list.
In view of the above display manner, when a user browses a web page or shops, whenever browsing the bottom of the current list, the user needs to check more specific contents of the current list and need to return to the top of the current list to click the "more" control, and this operation manner may cause inconvenience in operation and poor user experience in the process of browsing for a long time.
Disclosure of Invention
In view of the above situation, the present invention provides a page display method and apparatus, so as to solve the operation problem that it is inconvenient for a user to browse a page when browsing the page on a mobile device and entering another list.
The technical scheme of the invention is to provide a page display method, which comprises the following steps: loading a plurality of lists in a page, and arranging first controls which can be respectively linked to more information corresponding to the lists at first preset positions of the lists; identifying a list currently being browsed and corresponding content; and according to the identified list currently browsed, fixedly setting a second control which can be linked to more information corresponding to the currently browsed list at a second preset position of the screen.
Optionally, identifying the list currently being browsed and the corresponding content comprises: and identifying the list as a currently browsed list according to the position relation between the first control of the currently displayed list and the screen display area.
Optionally, identifying the list currently being browsed and the corresponding content further comprises: acquiring the current screen scrolling height, a first vertical coordinate of a first control of each list and a second vertical coordinate of the bottom of the list; and if the current screen scrolling height is larger than the first vertical coordinate and smaller than the second vertical coordinate, the list is the currently browsed list.
Optionally, the first preset position includes, but is not limited to, the upper right corner of the list.
Optionally, the second predetermined location includes, but is not limited to, a top of the screen.
The present invention also provides a page display apparatus, comprising: the page information module is used for loading a plurality of lists in a page, and first controls which can be respectively linked to more information corresponding to the lists are arranged at first preset positions of the lists; the position processing module is used for identifying the list which is browsed currently and the corresponding content; and the control generating module is used for fixedly setting a second control which can be linked to more information corresponding to the currently browsed list at a second preset position of the screen according to the identified currently browsed list.
Optionally, the position processing module identifies the list as a currently browsed list according to a position relationship between the first control of the currently displayed list and the screen display area.
Optionally, the position processing module further comprises: the position calculation module is used for acquiring the current screen scrolling height, a first vertical coordinate of the first control of each list and a second vertical coordinate of the bottom of the list; and the position judging module is used for judging that the list is the currently browsed list if the current screen scrolling height is larger than the first vertical coordinate and smaller than the second vertical coordinate.
Optionally, the first preset position includes, but is not limited to, the upper right corner of the list.
Optionally, the second predetermined location includes, but is not limited to, a top of the screen.
By the page display method and the page display device, when commodities are selected and purchased on the mobile equipment or pages are browsed to enter other lists, the operation of a user is facilitated, and the use experience of the user is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. In the drawings:
FIG. 1 is a schematic diagram of an application scenario of the present invention;
FIG. 2 is a flow chart of a method of the present invention;
FIG. 3 is a schematic view of the apparatus of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
According to the embodiment of the invention, a page display method and a display device are provided.
Application scene overview
Fig. 1 is a schematic view of an application scenario of the present invention. Specifically, the application scenario of the present invention includes application software (hereinafter abbreviated as App) and a mobile terminal, where the mobile terminal may be, for example and without limitation, a mobile electronic device such as a mobile phone, a tablet computer, a personal digital assistant, a vehicle-mounted computer, an electronic book reader, and the like.
It should be understood that the height of the web page is denoted as H, the height of the current screen display is denoted as H2, and the term "scroll height" referred to herein is the distance H1 from the vertex of the current screen to the vertex of the web page.
Example one
FIG. 2 is a flowchart of a page display method according to the present invention. The method comprises the following steps: loading a plurality of lists in a page, and arranging first controls which can be respectively linked to more information corresponding to the lists at first preset positions of the lists; identifying a list currently being browsed and corresponding content; and according to the identified list currently browsed, fixedly setting a second control which can be linked to more information corresponding to the currently browsed list at a second preset position of the screen.
Optionally, identifying the list currently being browsed and the corresponding content comprises: and identifying the list as a currently browsed list according to the position relation between the first control of the currently displayed list and the screen display area.
Optionally, identifying the list currently being browsed and the corresponding content further comprises: acquiring the current screen scrolling height, a first vertical coordinate of a first control of each list and a second vertical coordinate of the bottom of the list; and if the current screen scrolling height is larger than the first vertical coordinate and smaller than the second vertical coordinate, the list is the currently browsed list.
Optionally, the first preset position includes, but is not limited to, the upper right corner of the list.
Optionally, the second predetermined location includes, but is not limited to, a top of the screen.
The present invention will be described in detail with reference to a specific embodiment, however, it should be noted that the specific embodiment is only for better describing the present invention and should not be construed as limiting the present invention.
When a user clicks the mobile phone to execute the App, a plurality of preset lists are loaded on the page according to the content of the page after the App of the mobile phone is opened, then an 'more' control is generated at the upper right corner of each preset list, and the preset name of each module is displayed on the left side of the 'more' control. When a user selects commodities or browses pages on the App, the preset lists are sequentially displayed on the page of the mobile phone according to the list sequence preset by the page according to the upward dragging action of the user.
And identifying the list as the currently browsed list according to the position relation between the first control of the currently browsed list and the screen display area. Specifically, the current screen scroll height H1 is obtained and the vertical coordinate X1 of the "more" control in the upper right corner of each list in the web page and the vertical coordinate X2 at the bottom of the corresponding list are obtained in a loop.
The specific judgment method is as follows:
sequentially acquiring more controls of the positions of the screen which are crossed and reading the vertical coordinates X of the more controls;
the comparison conditions were: the vertical coordinate X1 of the control in the current list is less than the scroll height H1, and the vertical coordinate X2 at the bottom of the list is greater than the scroll height H1:
if the condition is not met and a next list exists, circulating the next list;
if the conditions are met, i.e., the scrolling height H1 is greater than the vertical coordinate X1 of the control in the current list, and the scrolling height H1 is less than the vertical coordinate X2 at the bottom of the list, the index of the "more" control in the current list is recorded as the index of information to be displayed.
Then, a fixed "more" control is generated at the top of the screen, and the title of the fixed "more" control is changed to the title of the record index and the link point.
Finally, the user can jump to the corresponding list page by clicking the more control.
By the page display method provided by the invention, when the mobile equipment selects and purchases commodities or browses pages to enter other lists, the operation of the user is facilitated, and the use experience of the user is effectively improved.
Example two
The present invention also provides a page display apparatus, as shown in fig. 3, theapparatus 3 includes:
thepage information module 31 is configured to load a plurality of lists in a page, and first controls that can be respectively linked to more information corresponding to the plurality of lists are respectively arranged at first preset positions of the plurality of lists; alocation processing module 32 for identifying a list currently being browsed and corresponding content; and thecontrol generating module 33 is configured to fixedly set, at a second preset position on the screen, a second control that can be linked to more information corresponding to the currently browsed list according to the identified currently browsed list.
Optionally, theposition processing module 32 identifies the currently browsed list as a list according to a position relationship between the first control of the currently displayed list and the screen display area.
Optionally, theposition processing module 32 further includes: a position calculating module 321, configured to obtain a current screen scrolling height, a first vertical coordinate of the first control of each list, and a second vertical coordinate of the bottom of the list; aposition determining module 322, configured to determine that the list is a currently browsed list if the current screen scrolling height is greater than the first vertical coordinate and less than the second vertical coordinate.
Optionally, the first preset position includes, but is not limited to, the upper right corner of the list.
Optionally, the second predetermined location includes, but is not limited to, a top of the screen.
The present invention will be described in detail with reference to a specific embodiment, however, it should be noted that the specific embodiment is only for better describing the present invention and should not be construed as limiting the present invention.
When a user clicks a mobile phone to execute an App, thepage information module 31 loads a plurality of preset lists on a page according to page contents after the mobile phone App is opened, then the upper right corner of each preset list generates one more control or button, and the left side of each more control is provided with a preset name for displaying each module. When a user selects commodities or browses pages on the App, the preset lists are sequentially displayed on the page of the mobile phone according to the list sequence preset by the page according to the upward dragging action of the user.
Theposition processing module 32 identifies the list as the currently browsed list according to the position relationship between the first control of the currently browsed list and the screen display area. Specifically, the current screen scroll height H1 is obtained and the vertical coordinate X1 of the "more" control in the upper right corner of each list in the web page and the vertical coordinate X2 at the bottom of the corresponding list are obtained in a loop.
The specific judgment method is as follows:
sequentially acquiring more controls of the positions of the screen which are crossed and reading the vertical coordinates X of the more controls;
the comparison conditions were: the vertical coordinate X1 of the control in the current list is less than the scroll height H1, and the vertical coordinate X2 at the bottom of the list is greater than the scroll height H1:
if the condition is not met and a next list exists, circulating the next list;
if the conditions are met, i.e., the scrolling height H1 is greater than the vertical coordinate X1 of the control in the current list, and the scrolling height H1 is less than the vertical coordinate X2 at the bottom of the list, the index of the "more" control in the current list is recorded as the index of information to be displayed.
Thecontrol generation module 33 then generates a fixed "more" control at the top of the screen, changing the title of the fixed "more" control to the title of the record index and the link pointer.
Finally, the user can jump to the corresponding list page by clicking the more control.
The page display device provided by the invention can facilitate the operation of a user when selecting and purchasing commodities on the mobile equipment or browsing the page and entering other lists, and effectively improve the use experience of the user.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.