CN108062321A - Page number page turning method and device based on paging - Google Patents

Page number page turning method and device based on paging Download PDF

Info

Publication number
CN108062321A
CN108062321A CN201610980741.XA CN201610980741A CN108062321A CN 108062321 A CN108062321 A CN 108062321A CN 201610980741 A CN201610980741 A CN 201610980741A CN 108062321 A CN108062321 A CN 108062321A
Authority
CN
China
Prior art keywords
page
page number
list
turning
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610980741.XA
Other languages
Chinese (zh)
Other versions
CN108062321B (en
Inventor
石鹏
贾艳凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201610980741.XA priority Critical patent/CN108062321B/en
Publication of CN108062321A publication Critical patent/CN108062321A/en
Application granted granted Critical
Publication of CN108062321B publication Critical patent/CN108062321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/954Navigation, e.g. using categorised browsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of page number page turning methods and device based on paging, it is related to field of computer technology, main purpose is to solve existing paging component to show the page number in sequence, written in code is complex, and it can only realize page turning forward or backward one by one, the problem of page-turning effect is dumb, and page turn over operation is single.The present invention main technical schemes be:Obtain the paging parameter information after paging page sum and initialization, according to the paging page is total and the paging parameter information, configure page turning list, in the page turning list comprising can batch page turning the display page number;When receiving the page-turning instruction of user, according to the page number trigger event carried in described instruction, the display page number in page turning list described in adjustment in batches.It is mainly used for the page number page turning based on paging.

Description

Page number page turning method and device based on paging
Technical field
The present invention relates to field of computer technology more particularly to a kind of page number page turning methods and device based on paging.
Background technology
With the fast development of computer technology, the method for information is obtained in Internet user by browsing webpage Popularization.Wherein, when browsing webpage, user browses the information in the different page numbers by page turn over operation.
At present, since Bootstrap is a set of simple, front end Development Framework intuitively, intrepid, it has been provided Whole, unified page structure, cascading style and action script, so as to fulfill quick, the simple development of webpage, wherein, Bootstrap provides a paging component for showing the page number and the pattern of simple front and rear page turning for webpage, still, existing Some paging components can only show the page number in sequence, and written in code is complex, and can only realize one by one forward or backward Page turning, page-turning effect is dumb, and page turn over operation is single.
The content of the invention
In view of the above problems, it is proposed that the present invention is main in order to provide a kind of page number page turning method and device based on paging Syllabus is to solve existing paging component to show the page number in sequence, and written in code is complex, and can only realize by The problem of one page turning forward or backward, page-turning effect is dumb, and page turn over operation is single.
By above-mentioned technical proposal, a kind of page number page turning method based on paging provided by the invention, including:
The paging parameter information after paging page sum and initialization is obtained, the paging parameter information includes every page of display The display page number in the maximum of the page number, page turning list to be configured is shown in item number, current accessed number of pages, page turning list to be configured Minimum value, page number length, the list length of page turning list to be configured of the display page number in page turning list to be configured;
According to the paging page is total and the paging parameter information, page turning list is configured, is wrapped in the page turning list Containing can batch page turning the display page number;
When receiving the page-turning instruction of user, according to the page number trigger event carried in described instruction, adjustment in batches institute State the display page number in page turning list.
By above-mentioned technical proposal, a kind of page number leaf turner based on paging provided by the invention, including:
Acquiring unit, for obtaining the paging parameter information after paging page sum and initialization, the paging parameter letter Breath includes maximum, page turning to be configured row that the page number is shown in every page of display item number, current accessed number of pages, page turning list to be configured The page number length of the display page number in the display minimum value of the page number, page turning list to be configured in table, page turning list to be configured List length;
Dispensing unit, it is described for according to the paging page is total and the paging parameter information, configuring page turning list In page turning list comprising can batch page turning the display page number;
Adjustment unit, for when receiving the page-turning instruction of user, thing to be triggered according to the page number carried in described instruction Part, the display page number in page turning list described in adjustment in batches.
By above-mentioned technical proposal, technical solution provided in an embodiment of the present invention at least has following advantages:
It is total to obtain the paging page first for a kind of page number page turning method and device based on paging provided in an embodiment of the present invention Paging parameter information after number and initialization, the paging parameter information include every page of display item number, current accessed number of pages, wait to match somebody with somebody Put minimum value, the page turning to be configured row of the display page number in the maximum that the page number is shown in page turning list, page turning list to be configured In table display the page number page number length, the list length of page turning list to be configured, then according to the paging page sum and The paging parameter information, configure page turning list, in the page turning list comprising can batch page turning the display page number, work as reception To user page-turning instruction when, according to the page number trigger event carried in described instruction, in page turning list described in adjustment in batches Show the page number.Compared with existing paging component, the present invention by according to the paging page number sum and paging parameter configuration one can With the page turning list of batch page turning, and automatic batch page turning is carried out according to the page-turning instruction of user, realize batch page turning, simplification is turned over Page operations, so as to improve page turning efficiency.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific embodiment for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this field Technical staff will be apparent understanding.Attached drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow chart for page number page turning method based on paging that inventive embodiments provide;
Fig. 2 shows a kind of schematic diagram for page number page turning list that inventive embodiments provide;
Fig. 3 shows the schematic diagram for another page number page turning list that inventive embodiments provide;
Fig. 4 shows the flow chart for another page number page turning method based on paging that inventive embodiments provide;
Fig. 5 shows the schematic diagram for another page number page turning list that inventive embodiments provide;
Fig. 6 shows a kind of block diagram for page number leaf turner based on paging that inventive embodiments provide;
Fig. 7 shows the block diagram for another page number leaf turner based on paging that inventive embodiments provide.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
The embodiment of the present invention provides a kind of page number page turning method based on paging, as shown in Figure 1, the described method includes:
101st, the paging parameter information after paging page sum and initialization is obtained.
Wherein, the paging parameter information includes showing in every page of display item number, current accessed number of pages, page turning list to be configured Show the maximum, the minimum value for showing the page number in page turning list to be configured, the display page number in page turning list to be configured of the page number Page number length, the list length of page turning list to be configured, paging page sum is data total number divided by every page of display Item number obtains, when the paging parameter information after the initialization browses webpage for configuring user, the page turning row of first page displaying Table, the page number length of the display page number in the page turning list to be configured and the list length of the page turning list to be configured can be with It is set according to different user demands or data content, the embodiment of the present invention is not specifically limited, and the display page number is most Big value and minimum value are the maximum and minimum value that show the page number in the display page number in addition to homepage and last page.
It should be noted that when user is clicked on wait the webpage browsed, data total number to be browsed is sent to automatically From the background, from the background with html increase with Bootstrap paging patterns ul sky lists, then beneficial to javascript scripts perform after Continuous operation.The program of paging parameter information after initialization is embodied as var Pages={ pageSize:10;pageIndex:1; showMaxPage:0;showMinPage:1;middlePage:0;realPage:0;showPageNum:10 }, wherein, PageSize is the item number of every page of display;PageIndex is the number of pages of current accessed;ShowMaxPage arranges for page turning to be configured The maximum shown in table;ShowMinPage is the minimum value shown in page turning list to be configured;MiddlePage is to be configured The page number length of the display page number in page turning list;RealPage is paging page sum;ShowPageNum is page turning to be configured The list length of list, Pages provide the common parameter in paging function.
102nd, according to the paging page is total and the paging parameter information, page turning list is configured.
Wherein, in the page turning list comprising can batch page turning the display page number, the display page number of the batch page turning Number be equal to page turning list to be configured in display the page number page number length, in the page turning list can include hide the page number And the display page number, the batch page turning are that the page number of 2 or 2 or more is carried out at the same time page turn over operation.
It should be noted that the event that user's triggering does not also perform in the page turning list can be hidden, for example, working as Preceding to be in first page, then the corresponding mark of Page forward event and omission mark can be hidden.
In addition, the program realization of configuration page turning list can be, by javascript scripts, according to data total number Totle and every page of display item number pageSize, calculates total page number realPage, page number li is added automatically into ul sky lists, Increase trigger event on the page number simultaneously, when the page number is excessive, page turning event before and after increase, while increase in front and rear page-turning button Batch page turning event realizes batch page-turning function.All program in machine codes can be configured to page turning component, convenient for straight as plug-in unit Connect use.
For example, program during configuration page turning list realize can include calling paging function dividePages (params, Callback), wherein params be needed for paging parameter formed object, callback be paging after needed for return fall function; Params={ totle:<number>,paginationId:<string>,module:<string>,callbackParams: <object>};Totle is data total number;PaginationId is the Id values of the hollow ul of html;Module divides for current call The module of page, convenient for distinguishing multiple two-page separation function components;CallbackParams is the callback times parameters fallen needed for function Object.
103rd, when receiving the page-turning instruction of user, according to the page number trigger event carried in described instruction, batch is adjusted The display page number in the whole page turning list.
Wherein, the page number trigger event can be Page forward event, backward page turning event, and the embodiment of the present invention is not done It is specific to limit.
For example, user's triggering page turning event backward, if can the display page number of batch page turning be 2,3,4,5, batch is adjusted The display page number in whole page turning list is 5,6,7,8.
For the embodiment of the present invention, specific application scenarios can be as follows, but not limited to this, including:It gets point Page page sum obtains page 15 for data total number 146 divided by every page of display item number 10, if the list length of page turning list is 11, The page number length of the display page number in page turning list to be configured is 5, and the maximum that the page number is shown in current page turning list is 6, when The minimum value that the page number is shown in preceding page turning list is 2, generates page turning list as shown in Figure 2, an omission is concealed in list Mark and the corresponding mark of Page forward event, when user's triggering page turning event backward, then by the display page number in page turning list It is adjusted to page turning list as shown in Figure 3.
It is total and first to obtain the paging page first for a kind of page number page turning method based on paging provided in an embodiment of the present invention Paging parameter information after beginningization, the paging parameter information include every page of display item number, current accessed number of pages, page turning to be configured It is shown in list in the minimum value of the display page number in the maximum of the page number, page turning list to be configured, page turning list to be configured Page number length, the list length of page turning list to be configured of the page number are shown, then according to paging page sum and described point Page parameter information, configures page turning list, in the page turning list comprising can batch page turning the display page number, when receiving user Page-turning instruction when, according to the page number trigger event carried in described instruction, the display page in page turning list described in adjustment in batches Code.Compared with existing paging component, the present invention by according to the paging page number sum and paging parameter configuration one can batch The page turning list of page turning, and automatic batch page turning is carried out according to the page-turning instruction of user, it realizes batch page turning, simplifies page turning behaviour Make, so as to improve page turning efficiency.
The embodiment of the present invention provides another page number page turning method based on paging, as shown in figure 4, the described method includes:
201st, the paging parameter information after paging page sum and initialization is obtained.
This step is identical with the method described in step 101 described in Fig. 1, is not repeating here.
It should be noted that if paging page number is less than or equal to the list length of page turning list, then it represents that current page turning List is enough to show all page numbers, is not required to front and rear page turning, and the li lists needed for paging are added into empty ul, and realization adds automatically It paginates pattern.
If the 202nd, the paging page sum is more than the list length of the page turning list to be configured, according to the paging The page is total and paging parameter information configuration page turning list.
Wherein, identified in the page turning list comprising Page forward, page turning mark, homepage mark, last page are identified, saved backward The display page number slightly in mark and page turning list, homepage mark and last page mark can be Chinese character " homepage ", " last page ", also Can be number of pages of page 1 with last page, the homepage mark is identified as constant mark with last page, is not involved in page turn over operation, The page turning forward or backward mark can be "《" or "》", the embodiment of the present invention is not specifically limited, the page turning to be configured The list length of list can be configured according to web page contents, user demand etc., and the embodiment of the present invention is not specifically limited.
It should be noted that the list length that the display page number length in page turning list is equal to page turning list subtracts Page forward Mark number, the mark of the page turning backward number that subtracts, subtract last page mark number, subtract 2 and omit a mark number homepage mark number that subtracts. When paging page sum is less than or equal to the list length of the page turning list to be configured, directly turned over according to the generation of all page numbers Page list, e.g., page sum are 6, list length 10, then the page turning list configured is " 1-2-3-4-5-6 ".Page turning list Program is embodied as increasing the page number representated by data-key attribute-bits current li on each li elements, during click, directly carries For the page number, background query is returned to, completes page-turning function;If the list that paging number of pages needed for data is more than page turning list is long Degree, i.e., when cannot disposably show all page numbers, page turning event before and after increase.If it is more than by paging page sum described The list length of page turning list to be configured, then according to the paging page is total and paging parameter information configuration page turning row Table establishes the page turning list that can realize batch page turning, simplifies page turn over operation.
For example, the paging page sum obtained by data total number is 27, the list length of page turning list to be configured is 11, then configure page turning list, in page turning list comprising homepage " 1 ", last page " 27 ", Page forward mark "《", backward page turning identify “》", 2 omit mark " ... " and display the page number " 2-3-4-5-6 ", wherein, due to display the page number be since 2, so hidden Hide the omission not an operated mark.
203a, corresponding trigger event is identified when user triggers Page forward, then by the display page in current page turning list Code carries out Page forward adjustment.
Wherein, the Page forward is adjusted to currently to show that the number batch of the page number is carried forward page turning adjustment, that is, works as Minimum value in the preceding display page number is the maximum shown after adjusting in the page number.For example, the display page number is " 5-6-7-8 ", forward The display page number after page turning is " 2-3-4-5 ".Trigger the corresponding trigger event of Page forward mark by working as user, then it will be current The display page number in page turning list carries out Page forward adjustment, realizes automatic Page forward, avoids forward page turning page by page, simplifies and divides Page step.
For the embodiment of the present invention, and step 203b that step 203a is arranged side by side, when user's triggering, page turning mark is corresponding backward Trigger event, then by current page turning list the display page number carry out backward page turning adjust.Wherein, the adjustment of page turning backward For currently to show the progress page turning adjustment backward of the number of page number batch, i.e., currently the maximum in the display page number is aobvious after adjustment Show the minimum value in the page number.For example, currently the display page number is " 2-3-4-5-6 ", the display page number after page turning is " 6-7-8- backward 9-10”.By working as user's triggering, page turning identifies corresponding trigger event backward, then by the display page number in current page turning list into Page turning adjusts row backward, realizes automatic page turning backward, avoids backward page turning page by page, simplifies page turning step.
For the embodiment of the present invention, the step 203c arranged side by side with step 203a, the page that the page-turning instruction of user carries is judged In code trigger event the page number that triggers whether be the display page number in current page turning list maximum.
Wherein, the display page number in current page turning list is the display page in page turning list in addition to homepage and last page Code.For example, homepage is 1 in current page turning list, last page 15, the display page number is 2-3-4-5-6, judges the page-turning instruction of user The page number 6 triggered in the page trigger event of carrying whether be in current page turning list display the page number maximum.Pass through Judge whether the page number that triggers in the page number trigger event that the page-turning instruction of user carries is display in current page turning list The maximum of the page number realizes in batches the efficient execution of page turning backward.
For the embodiment of the present invention, the step 203d arranged side by side with step 203a, the page that the page-turning instruction of user carries is judged In code trigger event the page number that triggers whether be the display page number in current page turning list minimum value.
Wherein, the display page number in the current page turning list is the display in page turning list in addition to homepage and last page The page number.For example, homepage is 1 in current page turning list, last page 15, the display page number 1 is 12-13-14, judges that the page turning of user refers to Make the page number 12 that triggers in the page trigger event carried whether be the display page number in current page turning list minimum value.It is logical Cross whether the page number triggered in the page number trigger event for judging the page-turning instruction carrying of user is aobvious in current page turning list Show the minimum value of the page number, realize the efficient execution of batch Page forward.
For the embodiment of the present invention, if step 204c after step 203c, judging to trigger in the page number trigger event Page number for the display page number in current page turning list maximum, then by the minimum of the display page number in current page turning list Value is adjusted to the page number of the triggering, other page numbers of the display page number are adjusted according to presetting rule, and are current Corresponding omit of display page number configuration in page turning list identifies.
Wherein, the presetting rule be according to the page number arrangement from small to large order or for according to the page number arrangement from Small order is arrived greatly, and specific choice is depending on current adjustment page number, if the corresponding mark of omitting of the configuration can be homepage Or last page then shows that 2 of configuration are omitted mark, if being connected, show one of them with showing that the page number of the page number is not attached to Omit mark.For example, the display page number is 2-3-4-5-6, the page number 6 of user's triggering is the maximum in the display page number, then will Minimum value 2 is adjusted to 6, other page numbers are the front and rear of the display page number according to being sequentially sequentially adjusted in from small to large as 7-8-9-10 Mark is omitted in position configuration, is " 1...6-7-8-9-10...15 " after adjustment.By by the display page number in current page turning list Minimum value be adjusted to the page number of the triggering, other page numbers of the display page number are adjusted according to presetting rule, and Mark is omitted for the display page number configuration in current page turning list is corresponding, realizes and carries out batch page turning automatically, improve the page number and turn over The efficiency of page.
For the embodiment of the present invention, if step 204d after step 203d, judging to trigger in the page number trigger event Page number for the display page number in current page turning list minimum value, then by the maximum of the display page number in current page turning list Value is adjusted to the page number of the triggering, other page numbers of the display page number are adjusted according to presetting rule, and are current Corresponding omit of display page number configuration in page turning list identifies.
Wherein, the presetting rule be according to the page number arrangement from small to large order or for according to the page number arrangement from Small order is arrived greatly, and specific choice is depending on current adjustment page number, if the corresponding mark of omitting of the configuration can be homepage Or last page then shows that 2 of configuration are omitted mark, if being connected, show one of them with showing that the page number of the page number is not attached to Omit mark.For example, the display page number is 11-12-13-14-15, the page number 11 of user's triggering is the minimum in the display page number Value, then be configured to 11 by maximum 15, other display page numbers are adjusted according to descending order, are adjusted to 7-8-9-10, and are It shows that mark is omitted in the front and back position configuration of the page number, is " 1...7-8-9-10-11...18 " after adjustment.By by current page turning The maximum of the display page number in list is adjusted to the page number of the triggering, other page numbers of the display page number are according to preset Rule is adjusted, and omits mark for the display page number configuration in current page turning list is corresponding, and realization is automatic to carry out batch Page turning improves the efficiency of page number page turning.
If being shown after 205a, adjustment, the maximum of the page number is greater than or equal to last page and identifies corresponding page number, will be current The maximum of the display page number in page turning list is configured to last page and identifies corresponding page number to subtract one, the display page number other The page number is adjusted according to presetting rule, and is hidden corresponding omit of the display page number in current page turning list and identified.
For example, the maximum shown after adjustment is 17, page number 15 corresponding more than last page then will show the page number most Big value is configured to 14, other page numbers are " 1...11-12-13-14-15 " after adjustment according to being adjusted from big to small.If by Show that the maximum of the page number is greater than or equal to last page and identifies corresponding page number after adjustment, then by the display in current page turning list The maximum of the page number is configured to the corresponding page number of last page mark and subtracts one, other page numbers of the display page number are according to presetting rule It is adjusted, and hides corresponding omit of the display page number in current page turning list and identify, avoid in batch page turning, page turning The page number exceeds the scope of page turning list.
For the embodiment of the present invention, if showing that the minimum value of the page number is small after the step 205b arranged side by side with step 205a, adjustment Corresponding page number is identified in or equal to homepage, then the minimum value of the display page number in current page turning list is configured to homepage mark Know corresponding page number and add one, other page numbers of the display page number are adjusted according to presetting rule, and hide current page turning Corresponding omit of the display page number in list identifies.
For example, the minimum value that the page number is shown after adjustment is 0, page number 1 corresponding less than homepage then will show the page number most Small value is configured to 2, other page numbers are " 1-2-3-4-5-6...15 " after adjustment according to being adjusted from small to large.If by adjusting The minimum value of the display page number is less than or equal to the corresponding page number of homepage mark after whole, then by the display page in current page turning list The minimum value of code is configured to homepage and identifies corresponding page number to add one, other page numbers of the display page number according to presetting rule into Row adjustment, and hide corresponding omit of the display page number in current page turning list and identify, it avoids in batch page turning, the page of page turning Code exceeds the scope of page turning list.
For the embodiment of the present invention, specific application scenarios can be as follows, but not limited to this, including:Set every page Show 10 datas, the list length of page turning list is 11, and when data total number is 258, paging number of pages is 26, is wrapped in list Containing homepage, last page, Page forward mark, the maximum display that page turning mark, 2 omission marks, page turning lists can be shown backward Page number length is 5, homepage and last page show that it is 2 to show the minimum value in the page number, maximum 6 to be fixed, when display is current When the page number is 1, hides Page forward mark and one is omitted mark, as shown in figure 5, when it is 6 that user, which triggers page number, then hold Row page turning backward, adjustment show the page number, and the display page number after adjustment is as shown in Figure 3.
Page number page turning method of the another kind based on paging provided in an embodiment of the present invention, obtain first paging page sum and Paging parameter information after initialization, the paging parameter information include every page of display item number, current accessed number of pages, to be configured turn over Show the minimum value for showing the page number in the maximum of the page number, page turning list to be configured in page list, in page turning list to be configured Display the page number page number length, the list length of page turning list to be configured, then according to the paging page sum and it is described Paging parameter information configures page turning list, in the page turning list comprising can batch page turning the display page number, when receiving use During the page-turning instruction at family, according to the page number trigger event carried in described instruction, the display in page turning list described in adjustment in batches The page number.Compared with existing paging component, the present invention according to paging page number sum and paging parameter configuration one by that can criticize The page turning list of page turning is measured, and automatic batch page turning is carried out according to the page-turning instruction of user, batch page turning is realized, simplifies page turning behaviour Make, so as to improve page turning efficiency.
Further, the specific implementation as method shown in Fig. 1, the embodiment of the present invention provide a kind of page number based on paging Leaf turner, as shown in fig. 6, described device can include:Acquiring unit 31, dispensing unit 32, adjustment unit 33.
Acquiring unit 31, for obtaining the paging parameter information after paging page sum and initialization, the paging parameter Information includes showing the maximum of the page number, page turning to be configured in every page of display item number, current accessed number of pages, page turning list to be configured The minimum value of the display page number in list, the page number length of the display page number in page turning list to be configured, page turning list to be configured List length.
Wherein, the paging page sum obtains for data total number divided by every page of display item number, after the initialization When paging parameter information browses webpage for configuring user, the page turning list of first page displaying, in the page turning list to be configured The display page number page number length and the list length of the page turning list to be configured can be according to different user demands or data Content is set, and the embodiment of the present invention is not specifically limited, and the maximum and minimum value of the display page number are the display page number In in addition to homepage and last page display the page number maximum and minimum value.
Dispensing unit 32, for according to the paging page is total and the paging parameter information, configuring page turning list, institute State in page turning list comprising can batch page turning the display page number.
Wherein, in the page turning list comprising can batch page turning the display page number, the display page number of the batch page turning Number be equal to page turning list to be configured in display the page number page number length, in the page turning list can include hide the page number And the display page number, the batch page turning are that the page number of 2 or 2 or more is carried out at the same time page turn over operation.
Adjustment unit 33, for when receiving the page-turning instruction of user, being triggered according to the page number carried in described instruction Event, the display page number in page turning list described in adjustment in batches.
Wherein, the page number trigger event can be Page forward event, backward page turning event, and the embodiment of the present invention is not done It is specific to limit.
It is total and first to obtain the paging page first for a kind of page number leaf turner based on paging provided in an embodiment of the present invention Paging parameter information after beginningization, the paging parameter information include every page of display item number, current accessed number of pages, page turning to be configured It is shown in list in the minimum value of the display page number in the maximum of the page number, page turning list to be configured, page turning list to be configured Page number length, the list length of page turning list to be configured of the page number are shown, then according to paging page sum and described point Page parameter information, configures page turning list, in the page turning list comprising can batch page turning the display page number, when receiving user Page-turning instruction when, according to the page number trigger event carried in described instruction, the display page in page turning list described in adjustment in batches Code.Compared with existing paging component, the present invention by according to the paging page number sum and paging parameter configuration one can batch The page turning list of page turning, and automatic batch page turning is carried out according to the page-turning instruction of user, it realizes batch page turning, simplifies page turning behaviour Make, so as to improve page turning efficiency.
The device embodiment is corresponding with preceding method embodiment, and for ease of reading, present apparatus embodiment is no longer to foregoing side Detail content in method embodiment is repeated one by one, it should be understood that the device in the present embodiment can correspond to realize it is foregoing Full content in embodiment of the method.
Further, the specific implementation as method shown in Fig. 4, the embodiment of the present invention provide another page based on paging Code leaf turner, as shown in fig. 7, described device can include:Acquiring unit 41, dispensing unit 42, adjustment unit 43.
Acquiring unit 41, for obtaining the paging parameter information after paging page sum and initialization, the paging parameter Information includes showing the maximum of the page number, page turning to be configured in every page of display item number, current accessed number of pages, page turning list to be configured The minimum value of the display page number in list, the page number length of the display page number in page turning list to be configured, page turning list to be configured List length;
Dispensing unit 42, for according to the paging page is total and the paging parameter information, configuring page turning list, institute State in page turning list comprising can batch page turning the display page number;
Adjustment unit 43, for when receiving the page-turning instruction of user, being triggered according to the page number carried in described instruction Event, the display page number in page turning list described in adjustment in batches.
The dispensing unit 42, if being more than the list of the page turning list to be configured specifically for paging page sum Length, then it is total and the paging parameter information configures page turning list according to the paging page, it is included in the page turning list The display page number in Page forward mark, backward page turning mark, homepage mark, last page mark, omission mark and page turning list.
Wherein, homepage mark and last page mark can be Chinese character " homepage ", " last page ", can also be page 1 with most The number of pages of the next page, the homepage mark is identified as constant mark with last page, is not involved in page turn over operation, described to turn over forward or backward Page mark can be "《" or "》", the embodiment of the present invention is not specifically limited, and the list length of the page turning list to be configured can To be configured according to web page contents, user demand etc., the embodiment of the present invention is not specifically limited.
The adjustment unit 43 triggers the corresponding trigger event of Page forward mark specifically for working as user, then will be current The display page number in page turning list carries out Page forward adjustment.
Wherein, the Page forward is adjusted to currently to show that the number batch of the page number is carried forward page turning adjustment, that is, works as Minimum value in the preceding display page number is the maximum shown after adjusting in the page number.
The adjustment unit 43 is specifically additionally operable to identify corresponding trigger event when user triggers page turning backward, then ought The display page number in preceding page turning list carries out page turning backward and adjusts.
Wherein, the page turning backward is adjusted to currently to show that the number batch of the page number carries out page turning adjustment backward, that is, works as Maximum in the preceding display page number is the minimum value shown after adjusting in the page number.
Further, the adjustment unit 43 includes:
Judgment module 4301, for judging that the page number that triggers is in page number trigger event that the page-turning instruction of user carries The maximum of the no display page number in current page turning list.
Wherein, the display page number in current page turning list is the display page in page turning list in addition to homepage and last page Code.
Module 4302 is adjusted, if judging the page number triggered in the page number trigger event for sentencing disconnected module 4301 for ought The maximum of the display page number in preceding page turning list, then be adjusted to described by the minimum value of the display page number in current page turning list The page number of triggering, other page numbers of the display page number are adjusted according to presetting rule, and in current page turning list It shows that page number configuration is corresponding and omits mark;
The judgment module 4301 is additionally operable to judge the page triggered in the page number trigger event that the page-turning instruction of user carries Yardage whether be in current page turning list display the page number minimum value.
Wherein, the display page number in the current page turning list is the display in page turning list in addition to homepage and last page The page number.
The adjustment module 4302, if being additionally operable to judgment module 4301 judges the page number triggered in the page number trigger event Number is the minimum value of the display page number in current page turning list, then adjusts the maximum of the display page number in current page turning list For the page number of the triggering, other page numbers of the display page number are adjusted according to presetting rule, and are arranged for current page turning Corresponding omit of display page number configuration in table identifies.
The adjustment unit 43, if being shown after being additionally operable to adjustment, the maximum of the page number is corresponding more than or equal to last page mark The maximum of the display page number in current page turning list is then configured to the corresponding page number of last page mark and subtracts one by page number, institute Other page numbers for stating the display page number are adjusted according to presetting rule, and the display page number hidden in current page turning list is corresponding Omit mark;
The adjustment unit 43, if being shown after being additionally operable to adjustment, the minimum value of the page number is corresponding less than or equal to homepage mark The minimum value of the display page number in current page turning list is then configured to the corresponding page number of homepage mark and adds one by page number, institute Other page numbers for stating the display page number are adjusted according to presetting rule, and the display page number hidden in current page turning list is corresponding Omit mark.
Page number leaf turner of the another kind based on paging provided in an embodiment of the present invention, obtain first paging page sum and Paging parameter information after initialization, the paging parameter information include every page of display item number, current accessed number of pages, to be configured turn over Show the minimum value for showing the page number in the maximum of the page number, page turning list to be configured in page list, in page turning list to be configured Display the page number page number length, the list length of page turning list to be configured, then according to the paging page sum and it is described Paging parameter information configures page turning list, in the page turning list comprising can batch page turning the display page number, when receiving use During the page-turning instruction at family, according to the page number trigger event carried in described instruction, the display in page turning list described in adjustment in batches The page number.Compared with existing paging component, the present invention according to paging page number sum and paging parameter configuration one by that can criticize The page turning list of page turning is measured, and automatic batch page turning is carried out according to the page-turning instruction of user, batch page turning is realized, simplifies page turning behaviour Make, so as to improve page turning efficiency.
The device embodiment is corresponding with preceding method embodiment, and for ease of reading, present apparatus embodiment is no longer to foregoing side Detail content in method embodiment is repeated one by one, it should be understood that the device in the present embodiment can correspond to realize it is foregoing Full content in embodiment of the method.
The page number leaf turner based on paging include processor and memory, above-mentioned acquiring unit, dispensing unit and Adjustment unit etc. in memory, above procedure list stored in memory is performed by processor as program unit storage Member realizes corresponding function.
Comprising kernel in processor, gone in memory to transfer corresponding program unit by kernel.Kernel can set one Or more, the page number can only be shown in sequence to solve existing paging component by adjusting kernel parameter, and written in code is more The problem of complexity, and can only realize page turning forward or backward one by one, page-turning effect is dumb, and page turn over operation is single.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes at least one deposit Store up chip.
It is first when being performed on data processing equipment, being adapted for carrying out present invention also provides a kind of computer program product The program code of beginningization there are as below methods step:Paging parameter information after obtaining paging page sum and initializing, described point Page parameter information includes showing the maximum of the page number in every page of display item number, current accessed number of pages, page turning list to be configured, waits to match somebody with somebody It puts the minimum value of the display page number in page turning list, the page number length of the display page number in page turning list to be configured, to be configured turn over The list length of page list;According to the paging page is total and the paging parameter information, page turning list, the page turning are configured In list comprising can batch page turning the display page number;When receiving the page-turning instruction of user, carried according in described instruction Page number trigger event, the display page number in page turning list described in adjustment in batches.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware can be used in the application Apply the form of example.Moreover, the computer for wherein including computer usable program code in one or more can be used in the application The computer program production that usable storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The application is with reference to the flow according to the method for the embodiment of the present application, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only memory (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.It defines, calculates according to herein Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It these are only embodiments herein, be not limited to the application.To those skilled in the art, The application can have various modifications and variations.All any modifications made within spirit herein and principle, equivalent substitution, Improve etc., it should be included within the scope of claims hereof.

Claims (10)

1. a kind of page number page turning method based on paging, which is characterized in that including:
The paging parameter information after paging page sum and initialization is obtained, the paging parameter information includes every page of display item The display page number in the maximum of the page number, page turning list to be configured is shown in number, current accessed number of pages, page turning list to be configured Page number length, the list length of page turning list to be configured of the display page number in minimum value, page turning list to be configured;
According to the paging page is total and the paging parameter information, page turning list is configured, comprising can in the page turning list With the display page number of batch page turning;
When receiving the page-turning instruction of user, according to the page number trigger event carried in described instruction, turned over described in adjustment in batches The display page number in page list.
It is 2. according to the method described in claim 1, it is characterized in that, described total and the paging is joined according to the paging page Number information, configure page turning list, in the page turning list comprising can the display page number of batch page turning include:
If the paging page sum is more than the list length of the page turning list to be configured, according to paging page sum And the paging parameter information configuration page turning list, it is identified in the page turning list comprising Page forward, page turning identifies, is first backward The display page number in page mark, last page mark, omission mark and page turning list.
3. according to the method described in claim 2, it is characterized in that, described when receiving the page-turning instruction of user, according to institute The page number trigger event carried in instruction is stated, the display page number in page turning list described in adjustment in batches includes:
Corresponding trigger event is identified when user triggers Page forward, then is carried out the display page number in current page turning list forward Page turning adjusts;
Or;
When user's triggering, page turning identifies corresponding trigger event backward, then carries out the display page number in current page turning list backward Page turning adjusts.
4. according to the method described in claim 2, it is characterized in that, described when receiving the page-turning instruction of user, according to institute The page number trigger event carried in instruction is stated, the display page number in page turning list described in adjustment in batches further includes:
Whether the page number for judging to trigger in the page number trigger event that the page-turning instruction of user carries is in current page turning list Show the maximum of the page number;
If so, the minimum value of the display page number in current page turning list is adjusted to the page number of the triggering, the display Other page numbers of the page number are adjusted according to presetting rule, and configure corresponding omission for the display page number in current page turning list Mark;
Or;
Whether the page number for judging to trigger in the page number trigger event that the page-turning instruction of user carries is in current page turning list Show the minimum value of the page number;
If so, the maximum of the display page number in current page turning list is adjusted to the page number of the triggering, the display Other page numbers of the page number are adjusted according to presetting rule, and configure corresponding omission for the display page number in current page turning list Mark.
5. the method according to claim 3 or 4, which is characterized in that the method further includes:
If being shown after adjustment, the maximum of the page number is greater than or equal to last page and identifies corresponding page number, will be in current page turning list The maximum of the display page number be configured to last page and identify corresponding page number to subtract one, other page numbers of the display page number are according in advance It puts rule to be adjusted, and hides corresponding omit of the display page number in current page turning list and identify;
Or;
If being shown after adjustment, the minimum value of the page number is less than or equal to homepage and identifies corresponding page number, will be in current page turning list The minimum value of the display page number be configured to homepage and identify corresponding page number to add one, other page numbers of the display page number are according in advance It puts rule to be adjusted, and hides corresponding omit of the display page number in current page turning list and identify.
6. a kind of page number leaf turner based on paging, which is characterized in that including:
Acquiring unit, for obtaining the paging parameter information after paging page sum and initialization, the paging parameter information bag It includes in the maximum that the page number is shown in every page of display item number, current accessed number of pages, page turning list to be configured, page turning list to be configured The display minimum value of the page number, the page number length of the display page number in page turning list to be configured, the list of page turning list to be configured Length;
Dispensing unit, for according to the paging page is total and the paging parameter information, configuring page turning list, the page turning In list comprising can batch page turning the display page number;
Adjustment unit, for when receiving the page-turning instruction of user, according to the page number trigger event carried in described instruction, criticizing Amount adjusts the display page number in the page turning list.
7. device according to claim 6, which is characterized in that
The dispensing unit, if being more than the list length of the page turning list to be configured specifically for paging page sum, It is then total and the paging parameter information configures page turning list according to the paging page, comprising turning over forward in the page turning list The display page number in page mark, backward page turning mark, homepage mark, last page mark, omission mark and page turning list.
8. device according to claim 7, which is characterized in that
The adjustment unit triggers the corresponding trigger event of Page forward mark specifically for working as user, then arranges current page turning The display page number in table carries out Page forward adjustment;
Or;
The adjustment unit is specifically additionally operable to identify corresponding trigger event when user triggers page turning backward, then by current page turning The display page number in list carries out page turning backward and adjusts.
9. device according to claim 7, which is characterized in that the adjustment unit includes:
Judgment module, for judging whether the page number triggered in the page number trigger event of the page-turning instruction of user carrying is current The maximum of the display page number in page turning list;
Module is adjusted, if judging the page number triggered in the page number trigger event in current page turning list for sentencing disconnected module The display page number maximum, then the minimum value of the display page number in current page turning list is adjusted to the page number of the triggering Number, other page numbers of the display page number are adjusted according to presetting rule, and are matched somebody with somebody for the display page number in current page turning list Corresponding omit is put to identify;
Or;
Whether the judgment module is additionally operable to judge the page number triggered in the page number trigger event that the page-turning instruction of user carries For the minimum value of the display page number in current page turning list;
The adjustment module judges the page number triggered in the page number trigger event for current page turning if being additionally operable to judgment module The minimum value of the display page number in list, then be adjusted to the triggering by the maximum of the display page number in current page turning list Page number, other page numbers of the display page number are adjusted according to presetting rule, and are the display page in current page turning list Code configuration is corresponding to omit mark.
10. device according to claim 8 or claim 9, which is characterized in that
The adjustment unit, if being shown after being additionally operable to adjustment, the maximum of the page number is greater than or equal to last page and identifies the corresponding page number The maximum of the display page number in current page turning list is then configured to the corresponding page number of last page mark and subtracts one by number, described aobvious Show that other page numbers of the page number are adjusted according to presetting rule, and hide the corresponding omission of the display page number in current page turning list Mark;
Or;
The adjustment unit, if being shown after being additionally operable to adjustment, the minimum value of the page number is less than or equal to homepage and identifies the corresponding page number Number, then be configured to homepage by the minimum value of the display page number in current page turning list and identify corresponding page number to add one, described to show Show that other page numbers of the page number are adjusted according to presetting rule, and hide the corresponding omission of the display page number in current page turning list Mark.
CN201610980741.XA 2016-11-08 2016-11-08 Page turning method and device based on paging Active CN108062321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610980741.XA CN108062321B (en) 2016-11-08 2016-11-08 Page turning method and device based on paging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610980741.XA CN108062321B (en) 2016-11-08 2016-11-08 Page turning method and device based on paging

Publications (2)

Publication Number Publication Date
CN108062321A true CN108062321A (en) 2018-05-22
CN108062321B CN108062321B (en) 2022-01-18

Family

ID=62137690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610980741.XA Active CN108062321B (en) 2016-11-08 2016-11-08 Page turning method and device based on paging

Country Status (1)

Country Link
CN (1) CN108062321B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413278A (en) * 2019-06-27 2019-11-05 平安科技(深圳)有限公司 The method, apparatus and storage medium, computer equipment of paging display record number
CN110955813A (en) * 2018-09-27 2020-04-03 北京国双科技有限公司 Data crawling method and device
CN113268297A (en) * 2021-05-19 2021-08-17 北京达佳互联信息技术有限公司 Page display method and device, electronic equipment and storage medium
CN113536153A (en) * 2021-06-30 2021-10-22 北京达佳互联信息技术有限公司 Interest point acquisition method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194473B1 (en) * 2002-02-15 2007-03-20 Oracle International Corporation Application platform development environment
CN101668004A (en) * 2008-09-04 2010-03-10 阿里巴巴集团控股有限公司 Method, device and system for acquiring webpage
CN101833416A (en) * 2010-04-14 2010-09-15 鸿富锦精密工业(深圳)有限公司 Electronic reading device and page turning method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194473B1 (en) * 2002-02-15 2007-03-20 Oracle International Corporation Application platform development environment
CN101668004A (en) * 2008-09-04 2010-03-10 阿里巴巴集团控股有限公司 Method, device and system for acquiring webpage
CN101833416A (en) * 2010-04-14 2010-09-15 鸿富锦精密工业(深圳)有限公司 Electronic reading device and page turning method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张吃吃: "网页常见的几种翻页方式", 《HTTPS://WWW.JIANSHU.COM/P/7B58A4755E88》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955813A (en) * 2018-09-27 2020-04-03 北京国双科技有限公司 Data crawling method and device
CN110413278A (en) * 2019-06-27 2019-11-05 平安科技(深圳)有限公司 The method, apparatus and storage medium, computer equipment of paging display record number
CN113268297A (en) * 2021-05-19 2021-08-17 北京达佳互联信息技术有限公司 Page display method and device, electronic equipment and storage medium
CN113268297B (en) * 2021-05-19 2024-05-07 北京达佳互联信息技术有限公司 Page display method, device, electronic equipment and storage medium
CN113536153A (en) * 2021-06-30 2021-10-22 北京达佳互联信息技术有限公司 Interest point acquisition method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108062321B (en) 2022-01-18

Similar Documents

Publication Publication Date Title
CN106484383B (en) Page rendering method, device and equipment
US10699061B2 (en) Application page quick access
CN108062321A (en) Page number page turning method and device based on paging
CN106339226B (en) A kind of methods of exhibiting and page presentation device of Webpage
CN104360882B (en) Display methods and device are carried out to picture in webpage in a kind of browser
CN103677823B (en) Method and device for managing browser plug-ins
CN106886570A (en) page processing method and device
CN107463563B (en) Information service processing method and device of browser
CN109308337A (en) Page sharing method and device
CN107766106B (en) The method and apparatus for generating configuration file
CN107066596A (en) The method and apparatus for generating link information
WO2015031209A1 (en) Autobatching
CN107679022A (en) Uncommon word processing method and its system
CN106790276A (en) A kind of browser-cross data interactive method and device based on browser protocol
CN106775970A (en) The window operation synchronous method of striding course, device and electronic equipment
CN113382083A (en) Webpage screenshot method and device
CN109669678A (en) Template engine integration method, device, electronic equipment and storage medium
CN110084871A (en) image typesetting method and device and electronic terminal
CN104965813B (en) The treating method and apparatus of textual materials
CN106022010A (en) File display method and device
CN105528334B (en) Document operation processing method and terminal
WO2017092455A1 (en) Method for web browsing in mobile terminal, and mobile terminal
CN107451270B (en) Page display method, electronic equipment and computer storage media
CN107423051B (en) Data configuration method and device
CN106168955A (en) A kind of Webpage caching method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant