CN117055883A - Page generation method, device, equipment and storage medium - Google Patents
Page generation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN117055883A CN117055883A CN202310917672.8A CN202310917672A CN117055883A CN 117055883 A CN117055883 A CN 117055883A CN 202310917672 A CN202310917672 A CN 202310917672A CN 117055883 A CN117055883 A CN 117055883A
- Authority
- CN
- China
- Prior art keywords
- component
- page
- generating
- scene
- template
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000005540 biological transmission Effects 0.000 claims description 42
- 238000012795 verification Methods 0.000 claims description 27
- 238000010276 construction Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 14
- 238000005516 engineering process Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 230000008676 import Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000007726 management method Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000009877 rendering Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000013523 data management Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version 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)
- Human Computer Interaction (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a page, where the method includes: when a page generation instruction is received, determining a scene to be applied according to the page generation instruction; selecting a target component from a preset component library based on a scene to be applied, and constructing a universal template based on the target component; and inputting the obtained data to be input into the universal template, and generating a target page according to the input universal template. Because the invention can select the corresponding target components from the preset component library according to the application scene, construct the universal template through the target components, input the data to be input into the universal template, and generate the target page based on the input universal template, compared with the prior art that related components are arranged one by one, the invention can directly select from the preset component library, saves development time and improves development efficiency.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a page.
Background
At present, along with the continuous expansion of living scenes of mobile banking, the types of business data related to each scene are different, and the display mode relates to various page components such as pictures, texts, pictures with links, texts with links, time selectors, drop-down lists and the like, so that huge and complex data management and operation requirements are formed.
When the page is developed for each scene, related components are required to be set for development, and as the partial components of partial pages can be similar, a great amount of development labor is required for setting the related components for each page one by one, and the development efficiency is lower.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a page generation method, device, equipment and storage medium, and aims to solve the technical problem of low development efficiency caused by one-to-one setting of related components when developing pages in the prior art.
In order to achieve the above object, the present invention provides a page generation method, which includes the following steps:
when a page generation instruction is received, determining a scene to be applied according to the page generation instruction;
selecting a target component from a preset component library based on the scene to be applied, and constructing a universal template based on the target component;
and inputting the obtained data to be input into the universal template, and generating a target page according to the input universal template.
Optionally, the step of selecting a target component from a preset component library based on the to-be-applied scene and constructing a universal template based on the target component includes:
selecting a target component from a preset component library based on the scene to be applied, and generating a personalized field based on the target component;
and acquiring a basic field, and constructing a universal template according to the basic field and the personalized field.
Optionally, before the step of selecting the target component from the preset component library based on the to-be-applied scene and constructing the universal template based on the target component, the method further includes:
acquiring a field type and an initial field value corresponding to each initial component, and serializing the initial field value of each initial component to obtain an initial transmission value;
generating a component to be selected according to the field type and the initial transmission value, and constructing a preset component library according to the component to be selected;
correspondingly, the step of selecting a target component from a preset component library based on the to-be-applied scene and constructing a universal template based on the target component comprises the following steps:
and selecting a target component from the components to be selected based on the scene to be applied, and constructing a universal template based on the target component.
Optionally, the step of generating a component to be selected according to the field type and the initial transmission value, and constructing a preset component library according to the component to be selected includes:
generating a component to be selected according to the field type and the initial transmission value, and carrying out uniqueness verification on the component to be selected;
and when the uniqueness verification is passed, constructing a preset component library according to the components to be selected.
Optionally, before the step of generating the component to be selected according to the field type and the initial transmission value and performing the uniqueness verification on the component to be selected, the method further includes:
acquiring a parameter value to be modified, and modifying the initial transmission value according to the parameter value to be modified;
correspondingly, the step of generating a component to be selected according to the field type and the initial transmission value and carrying out uniqueness verification on the component to be selected comprises the following steps:
and generating a component to be selected according to the field type and the modified initial transmission value, and carrying out uniqueness verification on the component to be selected.
Optionally, after the step of generating the component to be selected according to the field type and the modified initial transmission value and performing the uniqueness verification on the component to be selected, the method further includes:
performing deserialization on the modified initial transmission value, and binding the deserialized initial transmission value and the corresponding component to be selected;
and displaying the component to be selected according to the binding result.
Optionally, before the step of inputting the obtained data to be input into the universal template and generating the target page according to the input universal template, the method further includes:
obtaining a corresponding scene identifier based on the scene to be applied, and determining corresponding template data and business data based on the scene identifier;
and generating data to be input according to the template data and the service data.
In addition, in order to achieve the above object, the present invention also proposes a page generating apparatus, including:
the scene determining module is used for determining a scene to be applied according to the page generating instruction when the page generating instruction is received;
the template construction module is used for selecting a target component from a preset component library based on the scene to be applied and constructing a universal template based on the target component;
the page generation module is used for inputting the obtained data to be input into the universal template and generating a target page according to the input universal template.
In addition, to achieve the above object, the present invention also proposes a page generating apparatus including: a memory, a processor, and a page generation program stored on the memory and executable on the processor, the page generation program configured to implement the steps of the page generation method as described above.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a page generation program which, when executed by a processor, implements the steps of the page generation method as described above.
When a page generation instruction is received, determining a scene to be applied according to the page generation instruction; selecting a target component from a preset component library based on the scene to be applied, and constructing a universal template based on the target component; and inputting the obtained data to be input into the universal template, and generating a target page according to the input universal template. Because the invention can select the corresponding target components from the preset component library according to the application scene, construct the universal template through the target components, input the data to be input into the universal template, and generate the target page based on the input universal template, compared with the prior art that related components are arranged one by one, the invention can directly select from the preset component library, saves development time and improves development efficiency.
Drawings
FIG. 1 is a schematic diagram of a page generating device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a first embodiment of a page generation method according to the present invention;
FIG. 3 is a flowchart of a second embodiment of the page generating method of the present invention;
FIG. 4 is a flowchart of a third embodiment of a page generating method according to the present invention;
fig. 5 is a block diagram showing the structure of a first embodiment of the page generating apparatus of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a page generating device in a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the page generating apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the structure shown in fig. 1 does not constitute a limitation of the page generating apparatus, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a page generation program may be included in the memory 1005 as one type of storage medium.
In the page generating apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the page generating apparatus of the present invention may be provided in a page generating apparatus that calls a page generating program stored in the memory 1005 through the processor 1001 and executes the page generating method provided by the embodiment of the present invention.
An embodiment of the present invention provides a page generating method, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the page generating method of the present invention.
In this embodiment, the page generation method includes the following steps:
step S10: and when a page generation instruction is received, determining a scene to be applied according to the page generation instruction.
It should be noted that, the method of the embodiment may be applied in a scenario of developing a page in a bank, or in other scenarios where developing a page is required. The execution subject of the present embodiment may be a page generating device having data processing, network communication, and program running functions, such as a computer, or other devices capable of achieving the same or similar functions. Here, the above-described page generating apparatus (hereinafter referred to as apparatus) will be specifically described for the present embodiment and each embodiment described below.
It may be understood that the page generation instruction may be an instruction received by the device when the user has a page generation requirement, where the page generation instruction may carry the to-be-applied scene, where the to-be-applied scene may be a usage scene of a page to be developed, and since there may be differences between pages used in different scenes, the page generation instruction may carry a scene corresponding to the required page, and this embodiment of the present invention is not limited.
In a specific implementation, when a user has a requirement for generating a page, the device can receive a page generation instruction and determine a scene to be applied required by the user according to the page generation instruction.
Step S20: and selecting a target component from a preset component library based on the scene to be applied, and constructing a universal template based on the target component.
It should be understood that various components required for developing the page can be stored in the preset component library, and the preset component library can be constructed by adopting a vue+iview technical framework at the front end, and a generalized preset component library is constructed by adopting the vue+iview technical framework, so that the data can be configured.
It should be further noted that the target component may be a component required by a page of a scene to be applied, where the target component may include a navigation bar, a search box, a carousel chart, a table, a button, and the like, and different components have corresponding attributes and may be customized and configured according to a user requirement, and meanwhile, the components may be combined and nested to form a general template.
It can be understood that the general template may be a template required for generating a page, the device may create an initial template in advance, and then add a component to the initial template to generate the general template, where the initial template may be an operation type data template or a third party external data template, data in the operation type data template is generally operation type data, a data source may be input from an operation center station, a batch import operation may be supported, a data source in the third party external data template is generally an external data source, and the data cannot be newly added and may only be modified based on the external data source.
Further, in order to construct the generic template according to the target component, in this embodiment, the step S20 includes:
step S21: selecting a target component from a preset component library based on the scene to be applied, and generating a personalized field based on the target component;
step S22: and acquiring a basic field, and constructing a universal template according to the basic field and the personalized field.
It should be understood that the above general templates may include a basic field and a personalized field, where the basic field may be a field that each general template has, for example, in a scenario where an application scenario is about store management, when a corresponding general template is constructed, the basic field may be a field corresponding to an effective time and a field corresponding to an expiration time of the template, because all general templates may relate to the effective time and the expiration time, and of course, the basic field may also include fields that each general template has, which is not limited in this embodiment;
the personalized field may be a field related to store management, for example, may include a store name, a region, a price per person, a menu, and the like, and the universal template may be constructed by a combination of the personalized field and the basic field.
It will be appreciated that the above examples are continued and described with reference to table 1 below;
TABLE 1
As shown in table 1, five personalized fields are exemplified, namely an ID field, a store name field, a region field, a price per person field and a menu field, wherein the personalized fields contain field information corresponding to each field and can respectively comprise a field name, display information, a field type, whether filling is needed, whether editing is unavailable, whether uniqueness is achieved and whether searching is supported; the field name may be a name corresponding to the personalized field, the display information may be information displayed in the universal template, the field type may be a type corresponding to the target component, whether filling is necessary when the universal template is constructed, whether non-editable may be edited when the universal template is constructed, list display may be whether display by a list mode is allowed when the universal template is constructed, whether the only option is the only option when the universal template is constructed, and whether searching is supported or not is allowed when the universal template is constructed.
As further shown in table 1, the field names corresponding to the ID field, the store name field, the region field, the average price field, and the menu field may be: id. name, city, price and food; the corresponding display information may be: ID. Store name, region, price per capita, and cuisine; the corresponding field types may be: label text, text box, configuration region selection, text box, and text box; whether the corresponding padding is necessary or not may be: yes, no; whether the corresponding is not editable may be: no, no; the corresponding list presentation may be: yes, no; whether the corresponding is unique or not can be: yes, no; whether the corresponding search is supported may be: yes, no and no.
It should be emphasized that the above personalized fields may further include: the maximum length, default value, optional value, regular name, prompt message and other relevant fields can be specifically set according to practical situations, and the embodiment is not limited to this.
In a specific implementation, the device can firstly determine the required personalized field based on the application scene, then select the corresponding target component from the preset component library based on the personalized field, generate the personalized field according to the target component, and simultaneously determine the required basic field according to the application scene, and construct the universal template according to the basic field and the personalized field.
It is further emphasized that after the universal templates are generated according to different scenes to be applied, the universal templates can be stored, different columns can be dynamically displayed on the data list page in a configuration mode, dynamic combined search can be realized on the data list page in the configuration mode, input items can be verified in a regular expression mode during input, and efficiency and accuracy are improved.
Step S30: and inputting the obtained data to be input into the universal template, and generating a target page according to the input universal template.
It should be understood that the data to be recorded may be data required when the universal template constructs the target page, and may be set by itself according to the application scenario, for example, the data to be recorded may include data of a field corresponding to an effective time and data of a field corresponding to an expiration time in the basic field, if the effective time is 2023, 5, 4, 11 points, 40, 57 seconds, the data to be recorded 2023/05/0411, 40, 57 may be recorded into a field corresponding to the effective time in the universal template, and if the expiration time is 2023, 6, 4, 11, 40, 57 seconds, the data to be recorded 2023/06, 11, 40, 57 may be recorded into a field corresponding to the expiration time in the universal template, where the example is only convenient for understanding, and does not limit the actual data to be recorded.
It should be emphasized that after the universal template is constructed, relevant function information of the template can be set according to the scene to be applied, such as whether to display a batch import function, whether to display an import picture function, whether to display an associated data function, whether to modify the effective time period, whether to display a batch export function, whether to display a batch copy function, and the like.
Further, in order to accurately obtain the data to be recorded corresponding to the scene to be applied, before the step S30, the method further includes:
step S301: obtaining a corresponding scene identifier based on the scene to be applied, and determining corresponding template data and business data based on the scene identifier;
step S302: and generating data to be input according to the template data and the service data.
It should be noted that, the above-mentioned scene identifier may be an identifier for distinguishing a scene to be applied, and may be configured by user in a customized manner, and the specific embodiment is not limited thereto, and the above-mentioned template data may be data for rendering a page template, and may include static or partially static content in a page, for example, layout, structure, style, and the like of the page may be preset before rendering the page; the business data may refer to dynamic data related to a specific business, and may be used to populate dynamic parts in a template to implement personalized content and interactions, such as personal information of a user, a product list, an order, and the like.
It can be appreciated that when setting the template data and the business data, the operator can manually set, acquire the template data and the business data from an elastic computing service (Elastic Compute Service, ECS) or pull the template data from a third party platform, perform test operation verification on the data after the setting is completed, and perform auditing by an auditing person after the verification is passed, and input the data after the auditing is completed.
When the user inputs the data to be input, the device can dynamically generate an input interface of the user-friendly interface according to the customized universal template, ensure that the data is input according to the regular data format during the input, automatically check the data format after the data is input, effectively avoid the data input error and improve the accuracy.
It should be noted that, when the data is recorded, the device can control the recording content, that is, can provide limited options for selective recording, and can verify the uniqueness of the data.
It can be understood that, the embodiment can also set flexible configurable data query capability, batch deletion capability, batch text data import, batch picture import, batch data export and other capabilities based on different universal templates, so as to meet different requirements, and meanwhile, the expiration data can be timely prompted to re-operate the expiration data through various query modes, so that the data maintenance cost is greatly reduced.
In a specific implementation, the device can obtain a corresponding scene identifier based on the scene to be applied, determine corresponding template data and service data based on the scene identifier, generate data to be input according to the template data and the service data, input the data to be input into a universal template, and generate a target page according to the universal template after input.
In this embodiment, when a user needs to generate a page, the device may receive a page generation instruction, and determine a scenario to be applied required by the user according to the page generation instruction; firstly determining required personalized fields based on application scenes, then selecting corresponding target components from a preset component library based on the personalized fields, generating personalized fields according to the target components, determining required basic fields according to the application scenes, and constructing a general template according to the basic fields and the personalized fields; and obtaining a corresponding scene identifier based on the scene to be applied, determining corresponding template data and business data based on the scene identifier, generating data to be input according to the template data and the business data, inputting the data to be input into a universal template, and generating a target page according to the inputted universal template. According to the embodiment, the personalized general template can be built through the preset component library according to the requirements of the scene to be applied, so that the personalized target page required by operation is dynamically generated, the development time is shortened, and the development efficiency is improved; meanwhile, in the embodiment, dynamic combined search is realized on the data list page in a configuration mode, and different columns are dynamically displayed on the data list page, so that developers do not need to repeatedly develop the same logic, and the development efficiency is further improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the page generating method according to the present invention.
In order to save the states of the components in the preset component library or transfer data between different components, as shown in fig. 3, in this embodiment, before the step S20, the method further includes:
step S201: and acquiring a field type and an initial field value corresponding to each initial component, and serializing the initial field value of each initial component to obtain an initial transmission value.
It should be noted that, the initial component may be a component in an initial state, the field types may be field types corresponding to each target component in the first embodiment, the preset component library may be distinguished by different field types, and the addition of the field types may be modified by configuration.
It can be understood that the initial field value may be an initial value corresponding to a different target component, for example, whether the initial field value needs to be filled, is not editable, is unique, and supports searching in the first embodiment, and the device may serialize the initial field value that needs to be transferred, convert the initial field value into the initial transfer value in a byte stream or a character string format, so as to facilitate whether the subsequent listening value changes, where a common serialization manner may be JSON, XML, and the like, and the embodiment is not limited.
Step S202: generating a component to be selected according to the field type and the initial transmission value, and constructing a preset component library according to the component to be selected.
It should be understood that after the initial field values are serialized, the components to be selected may be generated according to the obtained initial transmission values and the field types, and each component to be selected may be summarized to construct a preset component library.
Further, in order to prevent repeated generation of components to be selected with consistent data, in this embodiment, the step S202 includes: generating a component to be selected according to the field type and the initial transmission value, and carrying out uniqueness verification on the component to be selected; and when the uniqueness verification is passed, constructing a preset component library according to the components to be selected.
It should be noted that, the device may perform the unique verification on the generated component to be selected, for example, may perform the unique verification on the ID of the component to be selected, or may perform the unique verification on other data, which is not limited in this embodiment.
Accordingly, the step S20 includes:
step S203: and selecting a target component from the components to be selected based on the scene to be applied, and constructing a universal template based on the target component.
According to the method, the device and the system, the field types corresponding to the initial components and the relevant initial field values can be obtained, the initial field values are serialized, follow-up monitoring and storage are facilitated, the components to be selected are generated according to the field types and the obtained initial transmission values, uniqueness verification is conducted on the components to be selected, when verification is passed, a preset component library is built according to the components to be selected, and when selection is conducted, the device can select target components from the components to be selected according to an application scene to conduct page generation.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of a page generating method according to the present invention.
In order to facilitate subsequent modification of the value of the component to be selected, as shown in fig. 4, in this embodiment, before the step of generating the component to be selected according to the field type and the initial transmission value and performing uniqueness verification on the component to be selected, the method further includes:
step S2021: acquiring a parameter value to be modified, and modifying the initial transmission value according to the parameter value to be modified;
correspondingly, the step of generating a component to be selected according to the field type and the initial transmission value and carrying out uniqueness verification on the component to be selected comprises the following steps:
step S2022: and generating a component to be selected according to the field type and the modified initial transmission value, and carrying out uniqueness verification on the component to be selected.
It should be noted that, the parameter value to be modified may be a value for modifying an initial transmission value in the component to be selected, and may be set according to actual requirements.
Further, in this embodiment, after step S2022, it further includes: performing deserialization on the modified initial transmission value, and binding the deserialized initial transmission value and the corresponding component to be selected; and displaying the component to be selected according to the binding result.
It can be understood that the device may use a proper reverse serialization method to restore the initial transmission value reverse serialization format to a data format corresponding to the initial field value, bind the initial transmission value after reverse serialization with the component to be selected, transfer the initial transmission value after reverse serialization as a parameter to the component to be selected according to a specific programming framework or library requirement, or set the initial transmission value as an attribute or state of the component to be selected, and perform data playback through a corresponding interface rendering operation according to the binding result.
It should be emphasized that, in this embodiment, for the form page on which the component to be selected is placed, a set of general custom form verification is provided, and regular input verification, whether to be filling, whether to be in a correct format, and the like can be performed through the custom form, so that accuracy of data can be improved, good user experience is achieved, and specific verification content can be set automatically according to actual conditions.
When the device is modified, the device can acquire the parameter value to be modified, modify the initial transmission value according to the parameter value to be modified, generate the component to be selected according to the modified initial transmission value, deserialize the modified initial transmission value, bind the modified initial transmission value with the component to be selected, and display the data back, so that the device is convenient for user management.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores a page generation program, and the page generation program realizes the steps of the page generation method when being executed by a processor.
In addition, referring to fig. 5, fig. 5 is a block diagram of a first embodiment of a page generating apparatus according to the present invention, and the embodiment of the present invention further provides a page generating apparatus, where the page generating apparatus includes:
the scene determining module 501 is configured to determine a scene to be applied according to a page generating instruction when the page generating instruction is received;
the template construction module 502 is configured to select a target component from a preset component library based on the scene to be applied, and construct a universal template based on the target component;
the page generating module 503 is configured to input the obtained data to be input into the universal template, and generate a target page according to the input universal template.
In this embodiment, when a user needs to generate a page, the device may receive a page generation instruction, and determine a scenario to be applied required by the user according to the page generation instruction; firstly determining required personalized fields based on application scenes, then selecting corresponding target components from a preset component library based on the personalized fields, generating personalized fields according to the target components, determining required basic fields according to the application scenes, and constructing a general template according to the basic fields and the personalized fields; and obtaining a corresponding scene identifier based on the scene to be applied, determining corresponding template data and business data based on the scene identifier, generating data to be input according to the template data and the business data, inputting the data to be input into a universal template, and generating a target page according to the inputted universal template. According to the embodiment, the personalized general template can be built through the preset component library according to the requirements of the scene to be applied, so that the personalized target page required by operation is dynamically generated, the development time is shortened, and the development efficiency is improved; meanwhile, in the embodiment, dynamic combined search is realized on the data list page in a configuration mode, and different columns are dynamically displayed on the data list page, so that developers do not need to repeatedly develop the same logic, and the development efficiency is further improved.
Other embodiments or specific implementation manners of the page generating apparatus of the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read-only memory/random-access memory, magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. A page generation method, characterized in that the page generation method comprises the following steps:
when a page generation instruction is received, determining a scene to be applied according to the page generation instruction;
selecting a target component from a preset component library based on the scene to be applied, and constructing a universal template based on the target component;
and inputting the obtained data to be input into the universal template, and generating a target page according to the input universal template.
2. The page generating method as claimed in claim 1, wherein the step of selecting a target component from a preset component library based on the to-be-applied scene and constructing a generic template based on the target component comprises:
selecting a target component from a preset component library based on the scene to be applied, and generating a personalized field based on the target component;
and acquiring a basic field, and constructing a universal template according to the basic field and the personalized field.
3. The method for generating a page according to claim 1 or 2, wherein before the step of selecting a target component from a preset component library based on the to-be-applied scene and constructing a generic template based on the target component, the method further comprises:
acquiring a field type and an initial field value corresponding to each initial component, and serializing the initial field value of each initial component to obtain an initial transmission value;
generating a component to be selected according to the field type and the initial transmission value, and constructing a preset component library according to the component to be selected;
correspondingly, the step of selecting a target component from a preset component library based on the to-be-applied scene and constructing a universal template based on the target component comprises the following steps:
and selecting a target component from the components to be selected based on the scene to be applied, and constructing a universal template based on the target component.
4. The page generation method of claim 3, wherein the step of generating a component to be selected according to the field type and the initial transmission value, and constructing a preset component library according to the component to be selected comprises:
generating a component to be selected according to the field type and the initial transmission value, and carrying out uniqueness verification on the component to be selected;
and when the uniqueness verification is passed, constructing a preset component library according to the components to be selected.
5. The page generation method of claim 4, wherein before the step of generating a component to be selected according to the field type and the initial transmission value and performing uniqueness verification on the component to be selected, further comprises:
acquiring a parameter value to be modified, and modifying the initial transmission value according to the parameter value to be modified;
correspondingly, the step of generating a component to be selected according to the field type and the initial transmission value and carrying out uniqueness verification on the component to be selected comprises the following steps:
and generating a component to be selected according to the field type and the modified initial transmission value, and carrying out uniqueness verification on the component to be selected.
6. The page generation method of claim 5, wherein after the step of generating a component to be selected according to the field type and the modified initial transmission value and performing uniqueness verification on the component to be selected, further comprises:
performing deserialization on the modified initial transmission value, and binding the deserialized initial transmission value and the corresponding component to be selected;
and displaying the component to be selected according to the binding result.
7. The page generation method as recited in claim 1, wherein before the step of inputting the obtained data to be input into the generic template and generating the target page according to the input generic template, the method further comprises:
obtaining a corresponding scene identifier based on the scene to be applied, and determining corresponding template data and business data based on the scene identifier;
and generating data to be input according to the template data and the service data.
8. A page generating apparatus, the apparatus comprising:
the scene determining module is used for determining a scene to be applied according to the page generating instruction when the page generating instruction is received;
the template construction module is used for selecting a target component from a preset component library based on the scene to be applied and constructing a universal template based on the target component;
the page generation module is used for inputting the obtained data to be input into the universal template and generating a target page according to the input universal template.
9. A page generating apparatus, the apparatus comprising: memory, a processor and a page generation program stored on the memory and executable on the processor, the page generation program being configured to implement the steps of the page generation method of any of claims 1 to 7.
10. A storage medium having stored thereon a page generation program which, when executed by a processor, implements the steps of the page generation method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310917672.8A CN117055883A (en) | 2023-07-24 | 2023-07-24 | Page generation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310917672.8A CN117055883A (en) | 2023-07-24 | 2023-07-24 | Page generation method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117055883A true CN117055883A (en) | 2023-11-14 |
Family
ID=88659949
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310917672.8A Pending CN117055883A (en) | 2023-07-24 | 2023-07-24 | Page generation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117055883A (en) |
-
2023
- 2023-07-24 CN CN202310917672.8A patent/CN117055883A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109614568B (en) | Page generation method and device | |
CN112800370B (en) | Processing method and device of business document, computer equipment and storage medium | |
US11321669B2 (en) | Creating a customized email that includes an action link generated based on form data | |
US8930824B2 (en) | Facilitating propagation of user interface patterns or themes | |
CN109901834A (en) | Document file page generation method, device, computer equipment and storage medium | |
CN109978629B (en) | Advertisement putting method and device, electronic equipment and storage medium | |
CA3040568A1 (en) | System and method for generating websites from predefined templates | |
CN111522552A (en) | Sub-application generation method and device, computer equipment and storage medium | |
CN113741898B (en) | Form generation method, device and equipment | |
CN113110829B (en) | Multi-UI component library data processing method and device | |
CN113283228A (en) | Document generation method and device, electronic equipment and storage medium | |
CN111367514A (en) | Page card development method and device, computing device and storage medium | |
CN113239310A (en) | Page loading method and related device | |
CN113342330A (en) | Front-end engineering generation method and device | |
US11126410B2 (en) | Method and apparatus for building pages, apparatus and non-volatile computer storage medium | |
WO2018058612A1 (en) | Configuration method and system | |
CN117032666A (en) | Page editing method and device based on editor, terminal equipment and storage medium | |
CN117055883A (en) | Page generation method, device, equipment and storage medium | |
CN116110065A (en) | Method, device, computer equipment and storage medium for generating question card data | |
KR101991297B1 (en) | Web-based document editing support apparatus for customizing document editing interface and operating method thereof | |
CN111596906B (en) | MVPVM-based Android application development method, device, equipment and medium | |
KR102300444B1 (en) | Document editing device to check whether the font applied to the document is a supported font and operating method thereof | |
CN113885841A (en) | Script generation method and device, electronic equipment and readable medium | |
CN112631587A (en) | Interface prototype design method, interface prototype operation method and storage medium | |
CN113190509A (en) | Animation processing method and device, electronic equipment and computer readable storage medium |
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 |