CN114237596A - Front-end page generation method and device, server and readable storage medium - Google Patents

Front-end page generation method and device, server and readable storage medium Download PDF

Info

Publication number
CN114237596A
CN114237596A CN202111400698.2A CN202111400698A CN114237596A CN 114237596 A CN114237596 A CN 114237596A CN 202111400698 A CN202111400698 A CN 202111400698A CN 114237596 A CN114237596 A CN 114237596A
Authority
CN
China
Prior art keywords
configuration information
configuration
item
end page
generating
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.)
Pending
Application number
CN202111400698.2A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111400698.2A priority Critical patent/CN114237596A/en
Publication of CN114237596A publication Critical patent/CN114237596A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a front-end page generation method, a front-end page generation device, a server and a readable storage medium. The method comprises the following steps: determining first configuration information of each function item of the front-end page based on an original interactive graph of the front-end page to be configured, calling a configuration file of each function item according to the first configuration information of each function item, and generating the front-end page according to the first configuration information and the configuration file of each function item. By adopting the method, the first configuration information of each functional item of the front-end page can be determined based on the prototype interactive graph of the front-end page to be configured, the configured configuration file is directly called according to the first configuration information of each functional item, and the process of compiling corresponding codes of each functional item is avoided, so that the time for compiling the configuration file is saved in the front-end page generating process, the front-end page generating time is shortened, the configured configuration file can be quickly called in specific time to generate the front-end page, and the front-end page generating efficiency is improved.

Description

Front-end page generation method and device, server and readable storage medium
Technical Field
The present application relates to the field of mobile internet technologies, and in particular, to a front-end page generation method, apparatus, server, and readable storage medium.
Background
In the development process of the middle and background systems, front-end page development is an important component. The front-end page is developed, generally, a product outputs a requirement document, a designer designs a prototype interactive drawing on a user interface according to the requirement document, and finally, the front-end page is developed based on the prototype interactive drawing.
In the prior art, a coding link is entered based on a prototype interactive graph, and the design of a front-end page is completed by writing setting codes of each function item in the prototype interactive graph, but the development efficiency of the front-end page is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a front-end page generating method, device, server and readable storage medium.
A front-end page generation method, the method comprising:
determining first configuration information of each function item of a front-end page to be configured based on an original interactive graph of the front-end page to be configured;
calling a configuration file of each function item according to the first configuration information of each function item;
and generating the front-end page according to the first configuration information of each function item and the configuration file.
In one embodiment, the generating the front-end page according to the first configuration information of each of the function items and the configuration file includes:
judging whether the first configuration information is consistent with second configuration information in the configuration file or not to obtain a judgment result;
and generating the front-end page according to the judgment result.
In one embodiment, the generating the front-end page according to the determination result includes:
and if the judgment result is that the first configuration information is consistent with the second configuration information, generating the front-end page through the second configuration information.
In one embodiment, the generating the front-end page according to the determination result further includes:
if the judgment result is that the first configuration information is inconsistent with the second configuration information, modifying the second configuration information according to the first configuration information to obtain modified second configuration information;
and generating the front-end page through the modified second configuration information.
In one embodiment, the modifying the second configuration information according to the first configuration information to obtain modified second configuration information includes:
and modifying the parameter value of each second configuration item in the second configuration information according to the parameter value of each first configuration item in the first configuration information, and adding an additional item and the parameter value of the additional item in the second configuration information according to the first configuration information to obtain the modified second configuration information.
In one embodiment, the determining whether the first configuration information is consistent with the second configuration information in the configuration file to obtain a determination result includes:
comparing a first configuration item in the first configuration information and a parameter value of the first configuration item with a corresponding second configuration item in the second configuration information and a parameter value of the second configuration item;
if the first configuration item of the first configuration information is the same as the corresponding second configuration item in the second configuration information, and the parameter value of the first configuration item of the first configuration information is the same as the parameter value of the corresponding second configuration item in the second configuration information, determining that the judgment result is that the first configuration information is consistent with the second configuration information in the configuration file;
if at least one first configuration item of the first configuration information is different from a corresponding second configuration item in the second configuration information, and/or a parameter value of at least one first configuration item of the first configuration information is different from a parameter value of a corresponding second configuration item in the second configuration information, determining that the first configuration information is inconsistent with the second configuration information in the configuration file according to the judgment result.
In one embodiment, the first configuration information includes a field name of the function item; the calling the configuration file of each function item according to the first configuration information of each function item includes:
searching an identification value corresponding to the field name from a mapping relation table through the field name;
and acquiring the configuration file of the corresponding function item according to the identification value.
A front end page generating apparatus, the apparatus comprising:
the configuration information determining module is used for determining first configuration information of each function item of the front-end page based on an original interactive graph of the front-end page to be configured;
the configuration file calling module is used for calling the configuration files of the function items according to the first configuration information of the function items;
and the front-end page generating module is used for generating the front-end page according to the first configuration information of each functional item and the configuration file.
A server comprising a memory and a processor, the memory storing a computer program that when executed by the processor performs the steps of:
determining first configuration information of each function item of a front-end page to be configured based on an original interactive graph of the front-end page to be configured;
calling a configuration file of each function item according to the first configuration information of each function item;
and generating the front-end page according to the first configuration information of each function item and the configuration file.
A readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
determining first configuration information of each function item of a front-end page to be configured based on an original interactive graph of the front-end page to be configured;
calling a configuration file of each function item according to the first configuration information of each function item;
and generating the front-end page according to the first configuration information of each function item and the configuration file.
The front-end page generating method, the front-end page generating device, the server and the readable storage medium are characterized in that the server determines first configuration information of each function item of the front-end page based on an original interactive graph of the front-end page to be configured, calls a configuration file of each function item according to the first configuration information of each function item, and generates the front-end page according to the first configuration information and the configuration file of each function item; the method can determine the first configuration information of each function item of the front-end page based on the prototype interactive graph of the front-end page to be configured, then directly call the configured configuration file according to the first configuration information of each function item, and does not need to write the corresponding code of each function item according to the first configuration information to generate the front-end page.
Drawings
FIG. 1 is a diagram of an application environment of a front-end page generation method according to a first embodiment;
FIG. 2 is a flowchart illustrating a front-end page generating method according to a second embodiment;
FIG. 3 is a flowchart illustrating a method for generating a front-end page according to a third embodiment;
FIG. 4 is a flowchart illustrating a method for generating a front-end page according to a fourth embodiment;
FIG. 5 is a flowchart illustrating a method for obtaining a determination result according to a sixth embodiment;
FIG. 6 is a flowchart illustrating a method for invoking configuration files of function items according to a seventh embodiment;
fig. 7 is a block diagram of a front-end page generating apparatus corresponding to the method in the second embodiment;
fig. 8 is an internal configuration diagram of a server in the first to seventh embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The front-end page generation method provided by the application can be applied to the application environment shown in fig. 1, namely, a front-end page generation system. The system comprises a client and a server, and the server can be a back-end server. The server and the client can be in communication connection, and the communication mode can be Wi-Fi, a mobile network or Bluetooth connection and the like. The execution subject of the following method embodiments is described by taking a server as an example.
In one embodiment, as shown in fig. 2, a front-end page generating method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s100, determining first configuration information of each function item of the front-end page based on the prototype interactive graph of the front-end page to be configured.
Specifically, the server may receive a front-end page generation request sent by the client, where the front-end page generation request may be used to request the server to send a front-end page to be displayed, and the server obtains an original interaction diagram corresponding to the front-end page to be displayed, that is, an original interaction diagram of the front-end page to be configured, based on the front-end page generation request, and then generates the front-end page based on the original interaction diagram of the front-end page to be configured. The server may determine first configuration information of each function item of the front-end page to be configured in the prototype interactive drawing first based on the prototype interactive drawing of the front-end page to be configured. The number of the function items contained in the front page can be more than or equal to 1, and different function items in the front page can realize different functions and can be displayed in the front page in different styles. The first configuration information may include at least one first configuration item and parameter values of the configuration item.
It can be understood that the server may pre-design a plurality of prototype interaction graphs of different front-end pages to be configured through the user interface according to specific requirements, store the plurality of prototype interaction graphs, and assign an identifier to each prototype interaction graph during storage. The front-end page generation request sent by the client to the server can carry an identifier of a front-end page to be configured, and the server can compare the identifier with the identifier of each prototype interactive graph according to the identifier to obtain the prototype interactive graph of the front-end page corresponding to the identifier. Optionally, the first configuration information of the function item may be understood as layout information of the function item in the front page. The first configuration information of the function item may include a style of the function item displayed in the front page, and may further include position information of the function item displayed in the front page, and the like. The styles can be output forms of the function items displayed in the front page, font sizes, colors, border forms, and the like.
S200, calling the configuration files of the function items according to the first configuration information of the function items.
Specifically, different function items correspond to different configuration files, and the second configuration information in the configuration files may include different second configuration items of the function items and parameter values of the second configuration items. In this embodiment, each function item has a corresponding configuration file, and the second configuration information included in the configuration file may be the same as or different from the first configuration information, or a part of the second configuration items included in the second configuration information may be the same as a part of the first configuration items in the first configuration information, and parameter values of the part of the second configuration items may be the same as parameter values of the part of the first configuration items. The first configuration item may include a name of the function item displayed in the front page, display structure information, an identification value of the function item, layout position information, and the like. The layout position information may be specific layout coordinates of the function item in the front page.
It is understood that the server may call the configuration file of each function item stored in the configuration file library according to any one or more first configuration items in the first configuration information of each function item or parameter values of the first configuration items. The function items can also be called components, the profile library can comprise gjj-attribute information of the cumstom-table component, and the gjj-attribute information of the cumstom-table component can be called a set of configuration items of each function item. The configuration items of the above function items may include component information of an input box, a drop-down box, a date selector, a radio box, and the like.
And S300, generating a front-end page according to the first configuration information and the configuration file of each function item.
Specifically, the server may combine the second configuration information in the configuration file with the first configuration information of each function item, obtain the configuration information corresponding to the union of the second configuration information in the configuration file and the first configuration information of each function item, and generate the front-end page according to the configuration information corresponding to the union, or the server may combine the second configuration information in the configuration file with the first configuration information of each function item, obtain the configuration information corresponding to the intersection of the second configuration information in the configuration file and the first configuration information of each function item, and generate the front-end page according to the configuration information corresponding to the intersection, or of course, the server may perform a series of processing on the second configuration information in the configuration file and the first configuration information of each function item, obtain the processed configuration information, and generate the front-end page according to the processed configuration information, the method of generating the front page in this step is not limited to these. The series of processes described above may include a configuration information conversion process, a configuration information comparison process, a configuration information digitization process, a configuration information normalization process, and the like.
In addition, after the server generates the front-end page, the front-end page can be sent to the client, so that the client renders and displays the generated front-end page. The final display form of each function item in the front-end page can be a visual display form of the first configuration information of each function item.
The front-end page generation method can determine the first configuration information of each function item of the front-end page based on the prototype interactive map of the front-end page to be configured, then directly calls the configured configuration file according to the first configuration information of each function item, and does not need to write the corresponding code of each function item according to the first configuration information to generate the front-end page.
As an embodiment, as shown in fig. 3, the step of generating the front page according to the first configuration information and the configuration file of each function item in S300 may be implemented by the following steps:
s310, judging whether the first configuration information is consistent with the second configuration information in the configuration file or not, and obtaining a judgment result.
Specifically, the server may determine whether the first configuration information is consistent with the second configuration information in the configuration file through a first configuration item in the first configuration information and a second configuration item in the second configuration information in the configuration file, so as to obtain a determination result. The configuration item can be information such as function item name, keyword, field name, etc. of the function item. The judgment result may include that the first configuration information is consistent with the second configuration information in the configuration file, and that the first configuration information is inconsistent with the second configuration information in the configuration file.
And S320, generating a front-end page according to the judgment result.
Specifically, the server may determine to generate the front-end page through the second configuration information and/or the first configuration information according to the determination result. The server can directly generate the front-end page through the second configuration information and/or the first configuration information, can also perform information processing on the second configuration information and/or the first configuration information to obtain the configuration information after the information processing, and then generates the front-end page according to the configuration information after the information processing. The information processing may be at least one of comparison processing, modification processing, and addition processing.
The front-end page generation method can judge whether the first configuration information is consistent with the second configuration information in the configuration file to obtain a judgment result, and generate the front-end page according to the judgment result, and the method does not need to compile corresponding codes of all function items according to the first configuration information to generate the front-end page, so that the time for compiling the configuration file is saved in the front-end page generation process, the generation time of the front-end page is further shortened, meanwhile, the method can quickly call the configured configuration file to generate the front-end page within specific time, the generation efficiency of the front-end page is improved, human resources can be saved, the development burden of front-end developers is reduced, and the development cost of the front-end page is reduced.
As an embodiment, the step of generating the front page according to the determination result in S320 may include: and if the judgment result is that the first configuration information is consistent with the second configuration information, generating a front-end page through the second configuration information.
Specifically, if the judgment result obtained by the server is that the first configuration information is consistent with the second configuration information in the configuration file, it indicates that the second configuration item in the second configuration information and the parameter value of the second configuration item are the target configuration result to be configured for each function item in the front-end page to be configured, and at this time, the server may directly generate the front-end page through the second configuration information in the configuration file. The second configuration information in the configuration file may be a program code corresponding to each function item in the front-end page to be configured, where the program code may be a C language, a C + + language, a Java language, a JavaScript language, an html language, a css style sheet language, and the like, and may also be other programming languages. In the embodiment, each function item in the front-end page can be generated together by the html language and the css style sheet.
Meanwhile, as shown in fig. 4, the step of generating the front page according to the determination result in S320 may further include:
s321, if the first configuration information is inconsistent with the second configuration information according to the judgment result, modifying the second configuration information according to the first configuration information to obtain modified second configuration information.
Specifically, if the determination result obtained by the server is that the first configuration information is inconsistent with the second configuration information in the configuration file, it indicates that the second configuration item in the second configuration information and/or the parameter value of the second configuration item is different from the target configuration result to be configured for each function item in the front-end page to be configured, at this time, the server may modify the parameter value of each second configuration item of the second configuration information in the configuration file according to the parameter value of each first configuration item of the first configuration information to obtain the modified second configuration information, may also modify the parameter value of each second configuration item of the second configuration information in the configuration file according to the parameter value of each first configuration item of the first configuration information, and add the parameter values of the additional item and the additional item in the second configuration information to obtain the modified second configuration information, and of course, may also add the parameter values of the additional item and the additional item in the second configuration information, and taking each second configuration item, the parameter value of the additional item and the parameter value of the additional item in the second configuration information as modified second configuration information. The parameter value may include, among other things, name information and value information of the configuration item. The configuration information includes various configuration items that can be set by parameter values.
Illustratively, the first configuration item in the first configuration information includes a function item name of the function item, and if the function item name set in the first configuration item is an advance payment amount, and correspondingly, the function item name set in the second configuration item in the second configuration information is an advance payment time, the server may modify the function item name set in the second configuration item to be the advance payment amount; if the function item name set in the first configuration item is not modifiable, and correspondingly, the function item name set in the second configuration item is modifiable, the server can modify the function item name set in the second configuration item to be non-modifiable. The function item name is modifiable or the function item name is not modifiable, which can be represented by parameter values 0 or 1, also by false or true, of course also by other parameter values. The modified second configuration information may be the same as the first configuration information, that is, the first configuration item in the first configuration information is the same as the second configuration item in the modified second configuration information, and/or the parameter value of the first configuration item in the first configuration information is the same as the parameter value of the second configuration item in the modified second configuration information.
And S322, generating a front-end page through the modified second configuration information.
Specifically, the server may directly generate the front-end page through the modified second configuration information in the configuration file. The server may execute the whole program code to generate the front-end page, where the whole program code includes the program code of the whole peripheral frame of the front-end page, in addition to the program code corresponding to the modified second configuration information. The front-end page is generated by executing the entire program code so that the function items are laid out within the peripheral frame of the function items. When the whole program code is executed, the program code corresponding to the peripheral frame of each function item can be executed through a v-for loop, and the execution of the program code of the configuration information of each function item is controlled through a v-if. In this embodiment, the server may also call the configuration file through the API interface, and process the second configuration information in the configuration file to generate the front-end page.
According to the embodiment, the configuration file can be acquired, then the second configuration information in the configuration file is simply modified to obtain the modified second configuration information, the front-end page can be generated through the modified second configuration information, and the configuration codes of all the functional items do not need to be written to generate the front-end page, so that the development burden of front-end developers is reduced, the generation time of the front-end page is shortened, meanwhile, the configured configuration file can be quickly called within a specific time, the configuration information in the configuration file is subjected to micro-modification to generate the front-end page, and the generation efficiency of the front-end page is improved.
The front-end page generation method can directly call the second configuration information in the configuration file to generate the front-end page when the judgment result is that the first configuration information is consistent with the second configuration information, and does not need to compile corresponding codes of all function items according to the first configuration information to generate the front-end page, so that the time for compiling the configuration file is saved in the front-end page generation process, the generation time of the front-end page is further shortened, meanwhile, the method can quickly call the configured configuration file to generate the front-end page in specific time, the generation efficiency of the front-end page is improved, human resources can be saved, the development cost of the front-end page is reduced, meanwhile, the development burden of front-end developers can be reduced, and front-end page development engineers can realize front-end page development without excessive research and development experience.
As an embodiment, the step of modifying the second configuration information according to the first configuration information in S321 to obtain the modified second configuration information includes: and modifying the parameter value of each second configuration item in the second configuration information according to the parameter value of each first configuration item in the first configuration information, and adding an additional item and the parameter value of the additional item in the second configuration information according to the first configuration information to obtain the modified second configuration information.
Specifically, if the first configuration information includes other additional information besides the second configuration information, at this time, the server may modify the parameter values of the configuration items of the second configuration information in the configuration file according to the parameter values of the configuration items of the first configuration information, and add the additional item and the parameter values of the additional item in the second configuration information according to the first configuration information to obtain the modified second configuration information in the configuration file. The additional item and the parameter value of the additional item are added in the second configuration information, so that the function item can be added with other additional display effects corresponding to the additional item.
Illustratively, if an example includes 5 function items, in this embodiment, the program code of the modified second configuration information corresponding to the 5 function items can be executed through v-if control, in the program code, a plurality of field information such as repaymentList _ part, title, selectFlag, inputFlag, important, options, pool, name, value, and blurFun, etc. may be included, the repaymentList _ part represents an example object, title represents a function item name, selectFlag represents whether or not to use a drop-down box (yes, no false), inputFlag represents whether or not to use an input box, important represents whether or not to use the current function item as a necessary item, options represents a drop-down box option (including multiple attribute information) of the function item, bone represents whether or not the function item can be modified, name is a field name of the function item, value represents an identification value corresponding to the function item, and blurFun represents a function name (additional information of the function item is added through the function) for the current function item to be processed independently.
The front-end page generating method can modify the second configuration information into the corresponding first configuration information, add the additional information and the configuration parameters of the additional information to obtain the modified second configuration information, and further directly generate the front-end page through the modified second configuration information, the method can generate the front-end page only by modifying the configuration information which is inconsistent with the first configuration information in the second configuration information, and does not need to write all codes of each functional item according to the first configuration information to generate the front-end page, the time for writing the configuration file is saved in the front-end page generating process, the generating time of the front-end page is further shortened, meanwhile, the method can quickly call the configured configuration file within specific time to generate the front-end page, the generating efficiency of the front-end page is improved, human resources can be saved, and the development burden of front-end developers is reduced, the development cost of the front-end page is reduced.
As an embodiment, as shown in fig. 5, the step of determining whether the first configuration information is consistent with the second configuration information in the configuration file in S310 to obtain the determination result may specifically include the following steps:
s311, comparing the first configuration item in the first configuration information and the parameter value of the first configuration item with the corresponding second configuration item in the second configuration information and the parameter value of the second configuration item.
Specifically, the server may compare each first configuration item in each first configuration information corresponding to each function item with a corresponding second configuration item in each second configuration information, and simultaneously compare a parameter value of each first configuration item with a parameter value corresponding to each second configuration item. The comparison of the configuration items can be understood as whether names of the comparison configuration items are the same or not, and the comparison of the parameter values of the configuration items can be understood as whether the parameter values of the comparison configuration items are the same or not.
S312, if the first configuration item of the first configuration information is the same as the corresponding second configuration item in the second configuration information, and the parameter value of the first configuration item of the first configuration information is the same as the parameter value of the corresponding second configuration item in the second configuration information, determining that the determination result is that the first configuration information is consistent with the second configuration information in the configuration file.
S313, if at least one first configuration item in the first configuration information is not the same as a corresponding second configuration item in the second configuration information, and/or a parameter value of at least one first configuration item of the first configuration information is not the same as a parameter value of a corresponding second configuration item in the second configuration information, determining that the determination result is that the first configuration information is inconsistent with the second configuration information in the configuration file.
It can be understood that, if the server obtains the comparison result that 1) at least one first configuration item of the first configuration information is not identical to the corresponding second configuration item in the second configuration information, and the parameter value of at least one first configuration item of the first configuration information is not identical to the parameter value of the corresponding second configuration item in the second configuration information, 2) at least one first configuration item of the first configuration information is not identical to the corresponding second configuration item in the second configuration information, and the parameter value of at least one first configuration item of the first configuration information is identical to the parameter value of the corresponding second configuration item in the second configuration information, 3) at least one first configuration item of the first configuration information is identical to the corresponding second configuration item in the second configuration information, and the parameter value of at least one first configuration item of the first configuration information is not identical to the parameter value of the corresponding second configuration item in the second configuration information, in any of the three cases, it may be determined that the first configuration information is inconsistent with the second configuration information in the configuration file as a result of the determination.
The front-end page generation method can compare the first configuration item in the first configuration information and the parameter value of the first configuration item with the corresponding second configuration item in the second configuration information and the parameter value of the second configuration item, obtain the judgment result according to the comparison result, and further generate the front-end page according to the judgment result.
As one embodiment thereof, the first configuration information includes a field name of the function item; as shown in fig. 6, the step of invoking the configuration file of each function item according to the first configuration information of each function item in S200 may specifically include the following steps:
s210, searching an identification value corresponding to the field name from the mapping relation table through the field name.
Specifically, the server may receive field names of the function items sent by the client, and then look up the identification values of the function items corresponding to the field names from the mapping relationship table. The mapping relationship table may include a correspondence between field names of the function items and corresponding identification values. The field names may be represented by words, and the identification values may be represented by parameter values.
And S220, acquiring a configuration file of the corresponding function item according to the identification value.
It can be understood that the server may search the configuration file of the function item corresponding to the identification value from the configuration file library, and further generate a front-end page according to the searched configuration file.
The front-end page generating method can obtain the configuration file of each function item in the front-end page to be configured and further generate the front-end page according to the configuration file, the method does not need to compile corresponding codes of each function item according to first configuration information to generate the front-end page, time for compiling the configuration file is saved in the front-end page generating process, the generation time of the front-end page is further shortened, meanwhile, the configured configuration file can be quickly called to generate the front-end page within specific time, the generation efficiency of the front-end page is improved, human resources can be saved, the development burden of front-end developers is reduced, and the development cost of the front-end page is reduced.
In order to facilitate understanding of those skilled in the art, the method for generating a front-end page provided by the present application is described by taking an execution subject as a server as an example, and specifically, the method includes:
(1) and determining first configuration information of each function item of the front-end page based on the prototype interactive graph of the front-end page to be configured.
(2) And searching an identification value corresponding to the field name from the mapping relation table through the field name in the first configuration information.
(3) And acquiring the configuration file of the corresponding function item according to the identification value.
(4) And comparing the first configuration item in the first configuration information and the parameter value of the first configuration item with the corresponding second configuration item in the second configuration information and the parameter value of the second configuration item.
(5) And if the first configuration item of the first configuration information is the same as the corresponding second configuration item in the second configuration information, and the parameter value of the first configuration item of the first configuration information is the same as the parameter value of the corresponding second configuration item in the second configuration information, determining that the judgment result is that the first configuration information is consistent with the second configuration information in the configuration file.
(6) And if at least one first configuration item of the first configuration information is different from a corresponding second configuration item in the second configuration information, and/or a parameter value of at least one first configuration item of the first configuration information is different from a parameter value of a corresponding second configuration item in the second configuration information, determining that the first configuration information is inconsistent with the second configuration information in the configuration file.
(7) And if the judgment result is that the first configuration information is consistent with the second configuration information, generating a front-end page through the second configuration information.
(8) And if the judgment result is that the first configuration information is inconsistent with the second configuration information, modifying the parameter value of each second configuration item in the second configuration information according to the parameter value of each first configuration item in the first configuration information, and adding an additional item and the parameter value of the additional item in the second configuration information according to the first configuration information to obtain the modified second configuration information.
(9) And generating a front-end page through the modified second configuration information.
For the implementation processes of (1) to (9), reference may be specifically made to the description of the above embodiments, and the implementation principles and technical effects thereof are similar and will not be described herein again.
It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 7, there is provided a front end page generating apparatus including: a configuration information determining module 11, a configuration file calling module 12 and a front-end page generating module 13, wherein:
the configuration information determining module 11 is configured to determine first configuration information of each function item of the front-end page based on an prototype interactive graph of the front-end page to be configured;
the configuration file calling module 12 is configured to call the configuration file of each function item according to the first configuration information of each function item;
and a front-end page generating module 13, configured to generate a front-end page according to the first configuration information and the configuration file of each function item.
The front-end page generating device provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, the front-end page generating module 13 includes: a judging unit and a generating unit, wherein:
the judging unit is used for judging whether the first configuration information is consistent with the second configuration information in the configuration file or not to obtain a judging result;
and the generating unit is used for generating a front-end page according to the judgment result.
The front-end page generating device provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, the generating unit includes: a first generating subunit, wherein:
and the first generation subunit is used for generating a front-end page through the second configuration information when the judgment result of the judgment unit is that the first configuration information is consistent with the second configuration information.
The front-end page generating device provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, the generating unit includes: a judging subunit and a second generating subunit, wherein:
the judging subunit is used for modifying the second configuration information according to the first configuration information when the judging result of the judging unit is that the first configuration information is inconsistent with the second configuration information, so as to obtain modified second configuration information;
and the second generation subunit is used for generating the front-end page through the modified second configuration information.
The front-end page generating device provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, the determining subunit is specifically configured to modify a parameter value of each second configuration item in the second configuration information according to a parameter value of each first configuration item in the first configuration information, and add an additional item and the parameter value of the additional item in the second configuration information according to the first configuration information to obtain the modified second configuration information.
The front-end page generating device provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, the determining unit includes: a comparison subunit, a first determination subunit, and a second determination subunit, wherein:
the comparison subunit is used for comparing the first configuration item in the first configuration information and the parameter value of the first configuration item with the corresponding second configuration item in the second configuration information and the parameter value of the second configuration item;
the first determining subunit is used for determining that the judgment result is that the first configuration information is consistent with the second configuration information in the configuration file when the comparison result of the comparing subunit is that the first configuration item of the first configuration information is the same as the corresponding second configuration item in the second configuration information, and the parameter value of the first configuration item of the first configuration information is the same as the parameter value of the corresponding second configuration item in the second configuration information;
and the second determining subunit is configured to determine that the determination result is that the first configuration information is inconsistent with the second configuration information in the configuration file when the comparison result of the comparing subunit is that at least one first configuration item of the first configuration information is different from a corresponding second configuration item in the second configuration information, and/or a parameter value of at least one first configuration item of the first configuration information is different from a parameter value of a corresponding second configuration item in the second configuration information.
The front-end page generating device provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, the profile calling module 12 includes: an identification value search unit and a configuration file acquisition unit, wherein:
the identification value searching unit is used for searching the identification value corresponding to the field name from the mapping relation table through the field name;
and the configuration file acquisition unit is used for acquiring the configuration file of the corresponding function item according to the identification value.
The front-end page generating device provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
For specific limitations of the front-end page generation apparatus, reference may be made to the above limitations of the front-end page generation method, which is not described herein again. The respective modules in the front-end page generating apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the server, and can also be stored in a memory in the server in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a server is provided, and the internal structure of the server may be as shown in fig. 8. The server comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the server is configured to provide computing and control capabilities. The memory of the server comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the server is used for storing the prototype interactive drawing and the configuration file of the front-end page to be configured. The network interface of the server is used for communicating with an external terminal through network connection. The computer program is executed by a processor to implement a front-end page generation method.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the servers to which the subject application applies, as a particular server may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a server comprising a memory and a processor, the memory having a computer program stored therein, the processor when executing the computer program implementing the steps of:
determining first configuration information of each function item of a front-end page based on an original interactive graph of the front-end page to be configured;
calling the configuration files of the function items according to the first configuration information of the function items;
and generating a front-end page according to the first configuration information and the configuration file of each function item.
In one embodiment, a readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
determining first configuration information of each function item of a front-end page based on an original interactive graph of the front-end page to be configured;
calling the configuration files of the function items according to the first configuration information of the function items;
and generating a front-end page according to the first configuration information and the configuration file of each function item.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A front-end page generation method, the method comprising:
determining first configuration information of each function item of a front-end page to be configured based on an original interactive graph of the front-end page to be configured;
calling a configuration file of each function item according to the first configuration information of each function item;
and generating the front-end page according to the first configuration information of each function item and the configuration file.
2. The method according to claim 1, wherein the generating the front-end page according to the first configuration information of each of the function items and the configuration file comprises:
judging whether the first configuration information is consistent with second configuration information in the configuration file or not to obtain a judgment result;
and generating the front-end page according to the judgment result.
3. The method according to claim 2, wherein the generating the front-end page according to the determination result comprises:
and if the judgment result is that the first configuration information is consistent with the second configuration information, generating the front-end page through the second configuration information.
4. The method according to claim 2, wherein the generating the front-end page according to the determination result further comprises:
if the judgment result is that the first configuration information is inconsistent with the second configuration information, modifying the second configuration information according to the first configuration information to obtain modified second configuration information;
and generating the front-end page through the modified second configuration information.
5. The method of claim 4, wherein modifying the second configuration information according to the first configuration information to obtain modified second configuration information comprises:
and modifying the parameter value of each second configuration item in the second configuration information according to the parameter value of each first configuration item in the first configuration information, and adding an additional item and the parameter value of the additional item in the second configuration information according to the first configuration information to obtain the modified second configuration information.
6. The method according to claim 2, wherein the determining whether the first configuration information is consistent with the second configuration information in the configuration file to obtain a determination result comprises:
comparing a first configuration item in the first configuration information and a parameter value of the first configuration item with a corresponding second configuration item in the second configuration information and a parameter value of the second configuration item;
if the first configuration item of the first configuration information is the same as the corresponding second configuration item in the second configuration information, and the parameter value of the first configuration item of the first configuration information is the same as the parameter value of the corresponding second configuration item in the second configuration information, determining that the judgment result is that the first configuration information is consistent with the second configuration information in the configuration file;
if at least one first configuration item of the first configuration information is different from a corresponding second configuration item in the second configuration information, and/or a parameter value of at least one first configuration item of the first configuration information is different from a parameter value of a corresponding second configuration item in the second configuration information, determining that the first configuration information is inconsistent with the second configuration information in the configuration file according to the judgment result.
7. The method of any of claims 1-6, wherein the first configuration information comprises a field name of the function item; the calling the configuration file of each function item according to the first configuration information of each function item includes:
searching an identification value corresponding to the field name from a mapping relation table through the field name;
and acquiring the configuration file of the corresponding function item according to the identification value.
8. A front end page generating apparatus, the apparatus comprising:
the configuration information determining module is used for determining first configuration information of each function item of the front-end page based on an original interactive graph of the front-end page to be configured;
the configuration file calling module is used for calling the configuration files of the function items according to the first configuration information of the function items;
and the front-end page generating module is used for generating the front-end page according to the first configuration information of each functional item and the configuration file.
9. The apparatus of claim 8, wherein the front-end page generation module comprises: a judging unit and a generating unit, wherein:
the judging unit is used for judging whether the first configuration information is consistent with the second configuration information in the configuration file or not to obtain a judging result;
and the generating unit is used for generating the front-end page according to the judgment result.
10. The apparatus of claim 9, wherein the generating unit comprises: a first generating subunit, wherein:
the first generating subunit is configured to generate the front-end page according to the second configuration information when the determination result of the determining unit is that the first configuration information is consistent with the second configuration information.
11. The apparatus of claim 9, wherein the generating unit comprises: a judging subunit and a second generating subunit, wherein:
the judging subunit is configured to, when the judgment result of the judging unit is that the first configuration information is inconsistent with the second configuration information, modify the second configuration information according to the first configuration information to obtain modified second configuration information;
and the second generating subunit is configured to generate the front-end page according to the modified second configuration information.
12. The apparatus according to claim 11, wherein the determining subunit is specifically configured to modify a parameter value of each second configuration item in the second configuration information according to a parameter value of each first configuration item in the first configuration information, and add an additional item and the parameter value of the additional item in the second configuration information according to the first configuration information, so as to obtain the modified second configuration information.
13. The apparatus according to claim 9, wherein the judging unit includes: a comparison subunit, a first determination subunit, and a second determination subunit, wherein:
the comparing subunit is configured to compare a first configuration item in the first configuration information and a parameter value of the first configuration item with a corresponding second configuration item in the second configuration information and a parameter value of the second configuration item;
the first determining subunit is configured to determine, as a result of the comparison by the comparing subunit, that a first configuration item of the first configuration information is the same as a corresponding second configuration item in the second configuration information, and a parameter value of the first configuration item of the first configuration information is the same as a parameter value of the corresponding second configuration item in the second configuration information, that the first configuration information is consistent with the second configuration information in the configuration file;
the second determining subunit is configured to determine that the determination result is that the first configuration information is inconsistent with the second configuration information in the configuration file when a comparison result of the comparing subunit is that at least one first configuration item of the first configuration information is different from a corresponding second configuration item in the second configuration information, and/or a parameter value of at least one first configuration item of the first configuration information is different from a parameter value of a corresponding second configuration item in the second configuration information.
14. The apparatus of any of claims 8-13, wherein the profile invocation module comprises: an identification value search unit and a configuration file acquisition unit, wherein:
the identification value searching unit is used for searching an identification value corresponding to the field name from a mapping relation table through the field name;
and the configuration file acquisition unit is used for acquiring the configuration file of the corresponding function item according to the identification value.
15. A server comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method according to any of claims 1-7.
16. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202111400698.2A 2021-11-19 2021-11-19 Front-end page generation method and device, server and readable storage medium Pending CN114237596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111400698.2A CN114237596A (en) 2021-11-19 2021-11-19 Front-end page generation method and device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111400698.2A CN114237596A (en) 2021-11-19 2021-11-19 Front-end page generation method and device, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN114237596A true CN114237596A (en) 2022-03-25

Family

ID=80750769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111400698.2A Pending CN114237596A (en) 2021-11-19 2021-11-19 Front-end page generation method and device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN114237596A (en)

Similar Documents

Publication Publication Date Title
CN109976761B (en) Software development kit generation method and device and terminal equipment
CN111045655A (en) Page rendering method and device, rendering server and storage medium
CN111563220A (en) Business website project construction method and device, computer equipment and storage medium
CN110309461B (en) Page display method and device
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN110941779A (en) Page loading method and device, storage medium and electronic equipment
CN107766528B (en) Data loading method and terminal for waterfall flow page and computer readable storage medium
CN111596911A (en) Method and device for generating control, computer equipment and storage medium
CN111367518A (en) Page layout method and device, computing equipment and computer storage medium
CN112306486B (en) Interface generation method and device, server and storage medium
CN111739136A (en) Rendering method, computer device, and storage medium
CN110263932B (en) Multi-agent simulation system graphical combination construction method and device
CN112613275A (en) Receipt generation method and device, computer equipment and storage medium
CN112783660A (en) Resource processing method and device in virtual scene and electronic equipment
CN112035113A (en) Navigation bar loading method, device, equipment and medium of H5 page
CN111142990A (en) WeChat applet page display method and device and storage medium
CN114237596A (en) Front-end page generation method and device, server and readable storage medium
CN115993971A (en) Active page generation method, computing device and computer storage medium
CN114489619A (en) Interface view display method, terminal equipment and computer readable storage medium
CN112015378A (en) Skeleton screen page generation method and device, computer equipment and storage medium
CN112417020A (en) Method and device for realizing service expansion, computer equipment and storage medium
CN117591117B (en) Page generation method, system, equipment and storage medium
CN114661301B (en) Graphics processing unit compiling method, device, compiling acceleration library and storage medium
CN112800362B (en) Interface view time delay loading method and device
CN114461960B (en) Page generation method, page display method and page display device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination