Invention content
In view of the above-mentioned problems, the purpose of the present invention is to provide a kind of patterned display methods of primary APP, device, ends
End and storage medium to primary APP in the case where not needing updating client, it can be achieved that realize dynamic, patterned display.
An embodiment of the present invention provides a kind of patterned display methods of primary APP, including:
According to Http interface requests, at least one key for identifying the display page is passed to background server;
Obtain and preserve the corresponding back-end data that the background server is returned based at least one key;Wherein, described
Back-end data includes the Dynamic Announce data and style identifications by configuring from the background;
To current display page, local rear number of units corresponding with key is stored according to the key of current display page acquisitions
According to;
The back-end data is handled according to Dynamic Announce self defined class of the addition in the current display page,
The Dynamic Announce data are shown with pattern corresponding with the style identifications.
Preferably, the Dynamic Announce self defined class is the RecyclerView classes for being packaged with demand pattern.
Preferably, further include:
According to product demand, the Dynamic Announce self defined class is placed into the specific display page or shows the page
Specified location;Wherein, the Dynamic Announce self defined class is reusable.
Preferably, the back-end data is to operate the data that backstage returns according to backstage configuration documentation by backstage personnel.
The embodiment of the present invention additionally provides a kind of patterned display device of primary APP, including:
Key is passed to unit, for according to Http interface requests, being passed to background server at least one for identifying display
The key of the page;
Back-end data storage unit, the phase returned based at least one key for obtaining and preserving the background server
The back-end data answered;Wherein, the back-end data includes the Dynamic Announce data and style identifications by configuring from the background;
Back-end data acquiring unit, for current display page, this to be stored according to the key of current display page acquisitions
The back-end data corresponding with key on ground;
Display unit is used for the Dynamic Announce self defined class according to addition in the current display page to the backstage
Data are handled, and the Dynamic Announce data are shown with pattern corresponding with the style identifications.
Preferably, the Dynamic Announce self defined class is the RecyclerView classes for being packaged with demand pattern.
Preferably, further include:
Placement unit, for according to product demand, the Dynamic Announce self defined class to be placed into the specific display page
Or the specified location of the display page;Wherein, the Dynamic Announce self defined class is reusable.
Preferably, the back-end data is to operate the data that backstage returns according to backstage configuration documentation by backstage personnel.
The embodiment of the present invention additionally provides a kind of patterned display terminal of primary APP, including processor, memory and
It is stored in the memory and is configured as the computer program executed by the processor, the processor executes the meter
The patterned display methods such as above-mentioned primary APP is realized when calculation machine program.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, and the computer readable storage medium includes
The computer program of storage, wherein control when the computer program is run and set where the computer readable storage medium
The standby patterned display methods executed such as above-mentioned primary APP.
In said one embodiment, by showing that setting is packaged with the Dynamic Announce of demand pattern certainly on the page accordingly
The back-end data with style identifications for defining class and being returned by receiving background server so that the Dynamic Announce is made by oneself
Adopted class can carry out dynamically display interface according to the pattern of backstage configuration, repeatable display, thus need not be to original
In the case that raw APP carries out edition upgrading or re-downloads installation, so that it may carry out Dynamic Announce, drop to primary APP to realize
Low development process and cost.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, first embodiment of the invention provides a kind of patterned display methods of primary APP, it can be by original
The patterned display terminal (hereinafter referred to as terminal) of APP is given birth to execute, and includes at least following steps:
S101 is passed at least one key for identifying the display page according to Http interface requests to background server.
In the present embodiment, the terminal can be smart mobile phone or Intelligent flat, and operating system can be IOS systems
Or Android system, the present invention are not specifically limited.
In embodiments of the present invention, primary APP (nativeapp) is installed, primary APP is one primary in the terminal
Program generally operates in machine operating system, there is very strong interaction.Its static resource is stored in greatly local, thus has
Browse easy to use, the high advantage of Experience Degree.Or in realization using Objecttive-c and cocoaTouch
Framework writes iOS programs or selection java+Android Framework write android application programs.
It is corresponding with primary APP to have hybridapp (such as by the mixing APP of H5 and primary combination) and webapp.
Hybridapp has forged the apk/ipa native programs of a browser, and address is write in the dust, and then the inside has run one
Webapp, the inside are WebView UI.But still operate in the operating system of machine, interaction is weaker, and resource is generally at this
Ground or network can, viewing experience degree takes second place.Webapp is the application survived in browser, so can only operate in clear
It lookes in device, host is browser, is no longer operating system, resource is generally all on network, and viewing experience degree is third.
In the present embodiment, user can establish the connection with background server, and pass through HTTP when operating primary APP
Interface requests are passed at least one key for identifying display interface to background server.Wherein, each key corresponds to one and shows
Show the page or shows a display area on the page.
S102 obtains and preserves the corresponding back-end data that the background server is returned based at least one key;Its
In, the back-end data includes the Dynamic Announce data and style identifications configured by background server.
In the present embodiment, the background server inquires the corresponding display page after receiving key according to key
Back-end data, and all back-end datas are sent to the terminal, the terminal by the key and corresponding back-end data into
After row association, it is stored in local (such as local SDCard).
S103 is stored in local corresponding with key current display page according to the key of current display page acquisitions
Back-end data.
S104 carries out the back-end data according to Dynamic Announce self defined class of the addition in the current display page
Processing, the Dynamic Announce data are shown with pattern corresponding with the style identifications.
In the present embodiment, as shown in Fig. 2, when developing the primary APP, product planning is first arranged with developer
The primary APP needs pattern and operation logic to be shown, and then developer returns according to agreement demand, setting background server
The format agreement (such as Json data) of data, and write backstage configuration documentation.It is aobvious that dynamic is carried out by primary APP development schemes again
Show that self defined class encapsulates, defines pattern to display and operation.Then, developer is according to product personnel demand, encapsulation
The RecyclerView classes of good demand pattern, the specified location being placed on the page or the page to display, and developing
It completes and issues the primary APP after test, so that user is downloaded and installs.
User can open the primary APP after mounting, and the page is shown so that browsing is related.It is shown to current display page
When showing, at least one key of the terminal inquiry current display page, then according at least one key of current display page
Acquisition is stored in local back-end data corresponding at least one key, and (back-end data is by backstage personnel according to backstage
Configuration documentation operates the data that background server generates).Then, the terminal further according to addition in the current display interface
Dynamic Announce self defined class the back-end data is handled, extract the style identifications in each back-end data, then adopt
Loaded and displayed is carried out to the Dynamic Announce data with the style identifications corresponding pattern.
In the present embodiment, the Dynamic Announce self defined class can be with the difference according to key and use position, in different positions
Set the different pages of display.Such as:For showing page A, using key A, display is exactly the corresponding back-end data configurations of key A
Dynamic Announce data and pattern;For showing page B, using key B, display is exactly that the corresponding back-end datas of key B are matched
The Dynamic Announce data and pattern set.
It should be noted that in embodiments of the present invention, the Dynamic Announce self defined class can be placed into different displays
At the different location of the page or the same display page, to realize the reuse of the Dynamic Announce self defined class, to
For the APP with a large amount of repeatability, the pattern demand of similitude, the development time can be greatly reduced, improve development efficiency.I.e. only
Pattern is pre-defined, when display, is configured according to backstage configuration documentation, then wants to show that how many kinds of pattern can
To show how many kinds of, want to show the how many patterns repeated can show how much the pattern repeated.
In conclusion in the present embodiment, by showing that the dynamic for being packaged with demand pattern is arranged on the page to be shown accordingly
The back-end data with style identifications shown self defined class and returned by receiving background server so that the Dynamic Announce
Self defined class can carry out dynamically display interface according to the pattern of backstage configuration, repeatable display, to not need
In the case of carrying out edition upgrading to primary APP or re-download installation, so that it may aobvious into Mobile state to primary APP to realize
Show, reduces development process and cost.
Referring to Fig. 3, second embodiment of the invention provides a kind of patterned display device of primary APP, including:
Key is passed to unit 10, for according to Http interface requests, being passed to background server at least one aobvious for identifying
Show the key of the page;
Back-end data storage unit 20 is returned based at least one key for obtaining and preserve the background server
Corresponding back-end data;Wherein, the back-end data includes the Dynamic Announce data and style identifications by configuring from the background;
Back-end data acquiring unit 30, for current display page, being stored according to the key of current display page acquisitions
Local back-end data corresponding with key;
Display unit 40, for according to Dynamic Announce self defined class of the addition in the current display page to after described
Number of units shows the Dynamic Announce data according to being handled, with pattern corresponding with the style identifications.
Preferably, the Dynamic Announce self defined class is RecyclerView classes;The Dynamic Announce self defined class according to
Demand is packaged at least two patterns layout.
Preferably, the Dynamic Announce self defined class is the RecyclerView classes for being packaged with demand pattern.
Preferably, further include:
Placement unit, for according to product demand, the Dynamic Announce self defined class to be placed into the specific display page
Or the specified location of the display page;Wherein, the Dynamic Announce self defined class is reusable.
Preferably, the back-end data is to operate the data that backstage returns according to backstage configuration documentation by backstage personnel.
Third embodiment of the invention additionally provides a kind of patterned display terminal of primary APP.The primary APP of the embodiment
Patterned display terminal include:It processor, memory and is stored in the memory and can transport on the processor
Capable computer program, for example, primary APP patterned display program.The processor is realized when executing the computer program
Step in the patterned display methods embodiment of above-mentioned each primary APP, such as step S101 shown in FIG. 1.Alternatively, described
Processor realizes the function of each module/unit in above-mentioned each device embodiment when executing the computer program.
Illustratively, the computer program can be divided into one or more module/units, one or more
A module/unit is stored in the memory, and is executed by the processor, to complete the present invention.It is one or more
A module/unit can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing institute
State implementation procedure of the computer program in the patterned display terminal of the primary APP.
The patterned display terminal of the primary APP can be desktop PC, notebook, palm PC and high in the clouds clothes
The computing devices such as business device.The patterned display terminal of the primary APP may include, but be not limited only to, processor, memory.This
Field technology personnel are appreciated that above-mentioned component is only the example of the patterned display terminal of primary APP, do not constitute to original
The restriction of the patterned display terminal of raw APP, may include than above-mentioned more or fewer components, or the certain components of combination,
Or different components, such as the patterned display terminal of the primary APP can also include input-output equipment, network insertion
Equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng the processor is the control centre of the patterned display terminal of the primary APP, whole using various interfaces and connection
The various pieces of the patterned display terminal of a primary APP.
The memory can be used for storing the computer program and/or module, and the processor is by running or executing
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of the patterned display terminal of primary APP.The memory can include mainly storing program area and storage data field,
Wherein, storing program area can storage program area, application program (such as sound-playing function, figure needed at least one function
As playing function etc.) etc.;Storage data field can be stored uses created data (such as audio data, phone according to mobile phone
This etc.) etc..In addition, memory may include high-speed random access memory, can also include nonvolatile memory, such as firmly
Disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital,
SD) block, flash card (Flash Card), at least one disk memory, flush memory device or other volatile solid-states
Part.
Wherein, if the integrated module/unit of the patterned display terminal of the primary APP is with the shape of SFU software functional unit
Formula is realized and when sold or used as an independent product, can be stored in a computer read/write memory medium.It is based on
Such understanding, the present invention realize above-described embodiment method in all or part of flow, can also by computer program come
Relevant hardware is instructed to complete, the computer program can be stored in a computer readable storage medium, the computer
Program is when being executed by processor, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes meter
Calculation machine program code, the computer program code can be source code form, object identification code form, executable file or certain
Intermediate form etc..The computer-readable medium may include:Can carry the computer program code any entity or
Device, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD, computer storage, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software
Distribution medium etc..It should be noted that the content that the computer-readable medium includes can be according to making laws in jurisdiction
Requirement with patent practice carries out increase and decrease appropriate, such as in certain jurisdictions, according to legislation and patent practice, computer
Readable medium does not include electric carrier signal and telecommunication signal.
It should be noted that the apparatus embodiments described above are merely exemplary, wherein described be used as separating component
The unit of explanation may or may not be physically separated, and the component shown as unit can be or can also
It is not physical unit, you can be located at a place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of module therein is selected to achieve the purpose of the solution of this embodiment.In addition, device provided by the invention
In embodiment attached drawing, the connection relation between module indicates there is communication connection between them, specifically can be implemented as one or
A plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, you can to understand
And implement.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as
Protection scope of the present invention.