Webpage processing method, device and equipment
By receiving the page element operation request and calling the base control model in the model library, the problem of low -end webpage development efficiency is solved, and the reuse and development efficiency of the base control model are realized.
Patent Information
- Application Number
- CN202411907234.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, front-end web page development requires a lot of modification work, resulting in low development efficiency and ineffective development of pages that cannot effectively meet the various front-end needs.
By receiving the page element operating request input, the base control model in the model library is called, and the target view is determined according to the business logic of the base control model, and the target view map is finally rendered on the current web interface.
It realizes the reuse of base class control models in different projects and scenarios, reduces repeated development work and improves development efficiency.
Smart Images

Figure CN119336330A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer information processing, and in particular to a method, device and equipment for processing web pages. Background Art
[0002] The development of front-end web pages such as website management platforms, website portals, single-page applications, and promotion landing pages often requires a lot of modification work in the process of development based on existing development frameworks, components, and website templates. These works are implemented on the basis of the development framework supporting component development. In the current development platform, if you want to meet the development of various front-end demand pages, you need to pay more front-end development resources, which greatly reduces development efficiency. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a web page processing method, device and equipment to improve the web page development efficiency.
[0004] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0005] A first aspect of the present invention provides a method for processing a web page, comprising:
[0006] Receive page element operation requests input by users;
[0007] According to the page element operation request, calling the base class control model in the model library;
[0008] Determine the target view according to the business logic corresponding to the base class control model;
[0009] The target view is rendered and displayed on the current web page interface.
[0010] Optionally, receiving a page element operation request input by a user, including:
[0011] Receive at least one of a page element list operation, a query operation, a tag operation, a navigation operation, a login operation, and a logout operation input by a user.
[0012] Optionally, when the page element operation request is a page element list operation, calling the base class control model in the model library according to the page element operation request includes:
[0013] According to the page element operation request, a base class list control model is called from a model library, wherein the base class list control model includes at least one of the following:
[0014] List attributes, including: current page number, number of data items displayed per page, total number of data items, total number of filtered data items, parameter for returning the number of data items, and array for storing data items;
[0015] List constructor;
[0016] List method, the list method includes: obtaining the data item array of the current page, obtaining the data item array according to the obtained data parameters, converting a data object into a data item array, an asynchronous method for loading data, obtaining the data item array of the corresponding page according to the provided page number, triggering an event listener when data loading is completed, and resetting the data list method.
[0017] Optionally, when the page element operation request is a query operation, calling a base class control model in a model library according to the page element operation request includes:
[0018] According to the page element operation request, a base class query control model is called from a model library, wherein the base class query control model includes at least one of the following:
[0019] Query attributes, including: query keywords, query types, metadata arrays, query modes, and tag arrays;
[0020] Query constructor;
[0021] The query method includes: a tag array, a metadata array, a data array related to the query type, executing a query operation and returning a query result array, and returning a record containing query parameters.
[0022] Optionally, when the page element operation request is a navigation operation, calling a base class control model in a model library according to the page element operation request includes:
[0023] According to the page element operation request, a base class navigation control model is called from a model library, wherein the base class navigation control model includes at least one of the following:
[0024] Navigation properties, the navigation properties including: a Boolean value for indicating whether navigation is disabled; an array for storing navigation items;
[0025] Constructor, used to receive a configuration object;
[0026] The navigation method includes: obtaining navigation item data according to the provided data, and returning an array.
[0027] Optionally, determining the target view according to the business logic corresponding to the base class control model includes:
[0028] Determine the page element type according to the business logic corresponding to the base class control model;
[0029] Retrieving the corresponding page element according to the page element type;
[0030] A target view is determined according to the page element.
[0031] Optionally, rendering the target view on the current web page interface to display the target view includes:
[0032] Determining page element information and page attribute information according to the target view;
[0033] The page element information and the page attribute information are inserted into the node tree of the current web page interface for rendering to display the target view.
[0034] A second aspect of the present invention provides a web page processing device, comprising:
[0035] The acquisition module is used to receive the page element operation request input by the user;
[0036] The processing module is used to call the base class control model in the model library according to the page element operation request; determine the target view according to the business logic corresponding to the base class control model; and render the target view on the current web page interface to display the target view.
[0037] According to a third aspect of the present invention, a computing device is provided, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to the first aspect is executed.
[0038] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions, which, when executed on a computer, causes the computer to execute the method described in the first aspect.
[0039] The above solution of the present invention includes at least the following beneficial effects:
[0040] The above-mentioned scheme of the present invention receives the page element operation request input by the user, calls the base class control model in the model library according to the page element operation request, and then determines the target view according to the business logic corresponding to the base class control model, and finally renders the target view on the current web page interface to display the target view, thereby realizing the reuse of the base class control model in different projects and scenarios, reducing repeated development work and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flowchart of a method for processing a web page in an embodiment of the present invention;
[0042] Figure 2 is a schematic diagram of a base class query control model in a web page processing method in an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of the structure of a web page processing device in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0045] like Figure 1 As shown, an embodiment of the present invention provides a method for processing a web page, comprising the following steps:
[0046] Step 101, receiving a page element operation request input by a user;
[0047] Step 102, calling the base class control model in the model library according to the page element operation request;
[0048] Step 103, determining the target view according to the business logic corresponding to the base class control model;
[0049] Step 104: Render the target view on the current web page interface to display the target view.
[0050] The web page processing method of the embodiment of the present invention receives a page element operation request input by a user, calls a base class control model in a model library according to the page element operation request, determines a target view according to the business logic corresponding to the base class control model, and finally renders the target view on the current web page interface to display the target view, thereby realizing the reuse of the base class control model in different projects and scenarios, reducing repeated development work, and improving the efficiency of web page development.
[0051] In an optional embodiment of the present invention, step 101 includes:
[0052] Receive at least one of a page element list operation, a query operation, a tag operation, a navigation operation, a login operation, and a logout operation input by a user.
[0053] Specifically, the page element operation request input by the user is at least one of the above, and the corresponding base class control model is called according to these requests, and then the target view is determined and rendered, so as to realize the reuse of the base class control model in different projects and scenarios, reduce repeated development work and improve development efficiency. It should be noted that in addition to the page element operation requests listed above, other types of page element operation requests can also be received according to specific scenarios or actual conditions.
[0054] In an optional embodiment of the present invention, when the page element operation request is a page element list operation, step 102 includes:
[0055] According to the page element operation request, a base class list control model is called from a model library, wherein the base class list control model includes at least one of the following:
[0056] List attributes, including: current page number, number of data items displayed per page, total number of data items, total number of filtered data items, parameter for returning the number of data items, and array for storing data items;
[0057] List constructor;
[0058] List method, the list method includes: obtaining the data item array of the current page, obtaining the data item array according to the obtained data parameters, converting a data object into a data item array, an asynchronous method for loading data, obtaining the data item array of the corresponding page according to the provided page number, triggering an event listener when data loading is completed, and resetting the data list method.
[0059] Specifically, the total number of filtered data can be used to recalculate paging after the data is filtered. The list constructor receives a configuration object, which can contain the initial value of any attribute in the list attribute. Get the data item array according to the obtained data parameter is to get the data item array according to the provided data parameter. The data parameter here can be used to specify the source or method of data acquisition.
[0060] In an optional embodiment of the present invention, when the page element operation request is a query operation, step 102 includes:
[0061] According to the page element operation request, a base class query control model is called from a model library, wherein the base class query control model includes at least one of the following:
[0062] Query attributes, including: query keywords (or words), query type, metadata array, query mode and tag array;
[0063] Query constructor;
[0064] The query method includes: a tag array, a metadata array, a data array related to the query type, executing a query operation and returning a query result array, and returning a record containing query parameters.
[0065] Specifically, the query type may be an enumeration; the metadata array is a metadata array related to the query; the query mode includes an advanced query; and the tag array is a tag array related to the query.
[0066] In an optional embodiment of the present invention, when the page element operation request is a navigation operation, step 102 includes:
[0067] According to the page element operation request, a base class navigation control model is called from a model library, wherein the base class navigation control model includes at least one of the following:
[0068] Navigation properties, the navigation properties including: a Boolean value for indicating whether navigation is disabled; an array for storing navigation items;
[0069] Constructor, used to receive a configuration object;
[0070] The navigation method includes: obtaining navigation item data according to the provided data, and returning an array.
[0071] Specifically, a navigation item may include attributes such as the navigation title, link, and whether it is activated.
[0072] In an optional embodiment of the present invention, when the page element operation request is a page tag list operation, step 102 includes:
[0073] According to the page element operation request, a base class label control model is called from a model library, and the base class label control model includes:
[0074] Tag attributes, including: current page number, number of data items displayed per page, total number of data items (can be used to calculate total number of pages), total number of filtered data items (can be used to recalculate paging after data is filtered), parameters for limiting the number of returned data items, and arrays storing data items;
[0075] The constructor receives a configuration object that contains the initial values of the above tag attributes;
[0076] The tag method includes: obtaining the data item array of the current page, obtaining the data item array according to the provided parameters, converting a data model object into a data item array, an asynchronous method for loading data, obtaining the data item array of the corresponding page according to the provided page number, registering an event listener, which is triggered when the data loading is completed, and a method for resetting the data list.
[0077] In an optional embodiment of the present invention, when the page element operation request is a page login list operation, step 102 includes:
[0078] According to the page element operation request, a base class login control model is called from a model library, wherein the base class login control model includes at least one of the following:
[0079] Login attributes, including: user login name, user password, verification code (such as SMS verification code, graphic verification code, etc.);
[0080] Constructor;
[0081] The login method includes: verifying the validity of the user name (including checking whether the user name is empty, whether the length is compliant, whether it already exists in the system, etc.), verifying the validity of the password (including checking whether the password is empty, whether the length is compliant, whether it contains necessary character types, etc.), verifying the validity of the verification code (including checking whether the verification code is empty, whether it matches the verification code sent by the server, etc.), and performing the login operation.
[0082] In an optional embodiment of the present invention, when the page element operation request is a page logout list operation, step 102 includes:
[0083] According to the page element operation request, a base class logout control model is called from a model library, wherein the base class logout control model includes at least one of the following:
[0084] Logout attributes, the logout attributes including: a Boolean value indicating whether the identifier is in a disabled state; the type of the identifier; a unique identifier of the identifier;
[0085] Constructor;
[0086] A logout method, the logout method comprising: obtaining identification data from a source (which may be a server or local storage).
[0087] In an optional embodiment of the present invention, step 103 includes:
[0088] Step 1031, determining the page element type according to the business logic corresponding to the base class control model;
[0089] Specifically, the business logic corresponding to the base class control model includes its purpose (such as displaying information, collecting user input, triggering operations or other functions), how users interact with it (how users interact with the control by clicking, inputting, dragging, etc.), and its role in the entire business process (the position of the base class control model in the business flow, and how it works with other base class control models or system components); then the abstract business logic needs to be converted into user-visible and operable interface elements, including visual elements such as view layout, color, font, and icon, as well as interactive logic for interacting with users. Page element types can include visual elements such as layout, color, font, and icon, as well as the interaction logic between users and base class control models, including operations such as clicking, inputting, and dragging.
[0090] Step 1032, retrieve the corresponding page element according to the page element type;
[0091] Specifically, the corresponding page element is retrieved according to the page element type, so as to form a target view according to the corresponding page element later.
[0092] Step 1033: determine the target view according to the page element.
[0093] Specifically, you can determine the layout structure based on the importance of page elements and user habits, select appropriate colors, fonts, icons and other visual elements to fill in the target view to improve the user experience, and implement the interaction logic between users and controls, including the processing and feedback of clicks, inputs, drags and other operations. Finally, you can verify whether the functions and performance of the target view meet expectations through unit testing, integration testing and user testing.
[0094] In an optional embodiment of the present invention, step 104 includes:
[0095] Step 1041, determining page element information and page attribute information according to the target view;
[0096] Specifically, hypertext markup language can be used to determine page element information and page attribute information according to the target view, wherein the page element information may include div (block-level element, used to create or divide areas in the page), span (inline element, used to wrap text content and apply styles), ul (indicates an unordered list, and its child elements can only be list items), li (list item), etc., and the page attribute information may include id (indicates a specified unique identifier), class (used to add one or more class names to an element), etc., to facilitate subsequent rendering.
[0097] Step 1042: insert the page element information and the page attribute information into the node tree of the current web page interface for rendering to display the target view.
[0098] Specifically, the node tree of the current web page interface can be integrated with the page element information and the page attribute information to generate a rendering tree, and the accurate position and size (such as width, height, inner and outer margins, positioning method, etc.) of the page element information and the page attribute information on the screen are calculated based on the rendering tree. The page element information and the page attribute information are drawn onto the screen according to the calculated position and size to display the target view.
[0099] A specific embodiment of the method for processing a web page provided in an embodiment of the present invention includes:
[0100] Step 111, receiving a page element operation request;
[0101] The page element operation request includes at least one of a page element list operation, a query operation, a tag operation, a navigation operation, a login operation, and a logout operation.
[0102] Step 112 calls the base class control model in the model library;
[0103] like Figure 2 As shown, taking the page element operation request including the query operation as an example, according to the query operation request, the base class query control model is called from the model library, and the base class query control model includes:
[0104] Query attributes, including: query keywords, query types, metadata arrays, query modes, and tag arrays;
[0105] Query constructor;
[0106] The query method includes: a tag array, a metadata array, a data array related to the query type, executing a query operation and returning a query result array, and returning a record containing query parameters.
[0107] The base class control model is the basis for implementing a web page component. Web page elements render data, and controls output data. By determining the element logical structure of the base class control model, defining element attributes to control element behavior, defining element types, binding controls, listening to control events and modifying control states, and defining the data rendered by child elements, all data comes from the data model fields; a consistent data model is provided for each base class control model. When the API interface (application programming interface) request parameters and response parameters do not meet the component data results, an adapter or attribute mapping relationship table is provided for the base class control model to provide the basis for the request parameter and response data conversion for the base class control model. For the base class control model that needs to be extended, the input and output data models should be kept consistent, the base class control model type should be defined (the control type should be as unique as possible), the known control class should be extended, the data model should be kept unchanged and only the data should be updated to meet the user's real-time data modification needs, parameters should be intercepted before requesting the data interface, and the original data should be intercepted after requesting the interface data, and customized operations should be performed; all base class control models inherit the EventEmitter (event dispatcher) class to implement event binding and event triggering functions. When implementing web page elements, the control event updates the data and triggers the base class control model data operation event to update the control state; the configuration parameters of the base class control model can be dynamically modified after instantiation, so that the base class control model can adjust its behavior according to needs and enhance the system's adaptability. The output parameters and output data should be consistent with the base class control model, the control type should be defined, the data interface should be requested, and data operations (query, add, delete, and update) should be implemented; data interception capabilities should be provided to modify input and output data as needed; data conversion capabilities should be provided to keep the interface data parsing normal when the user changes the data interface.
[0108] The above example is implemented based on Vuejs (a framework for building user interfaces), which is not the only way to implement web page elements. HTML (Hypertext Markup Language), React (a front-end framework), Angularjs (a front-end framework for building user interfaces), etc. can also be implemented, but they must be consistent with the base class control model.
[0109] Step 113, determining the target view;
[0110] According to the business logic corresponding to the base class control model, such as purpose, interaction method and role, determine the type of page elements, such as layout, color, font, icon, click, input, drag, etc.; then call the corresponding page elements to determine the target view.
[0111] Step 114: display the target view on the current web page interface.
[0112] According to the page element information and page attribute information corresponding to the target view, the page element information and page attribute information are inserted into the node tree of the current web page interface for rendering, and the target view is displayed.
[0113] Among them, page element information and page attribute information are separated from data. The implementation technology is not concerned, but only the attributes of the data model that conforms to the base class control model and the definition of sub-element declarations are concerned; output parameters and output data are implemented in accordance with the data model, control types are defined, data interfaces are requested, and data operations (query, add, delete, and update) are implemented; data interception capabilities are provided to modify input and output data as needed; data conversion capabilities are provided to keep interface data parsing normal when users change data interfaces.
[0114] The processing method of the web page of the embodiment of the present invention effectively isolates the business logic and the display logic. A model can provide data and methods for multiple display interfaces, thereby significantly improving the reusability and maintainability of the code. The method of this embodiment pays more attention to the model data part, and the interface part is only paid more attention to when the project is personalized or customized. By realizing the front-end componentization, this embodiment can reduce the secondary development coding in the implementation of the front-end project, reduce the difficulty of front-end page writing, and provide high delivery efficiency; separate the web page elements from the controls, the web page elements display data that conforms to the data model, and the controls provide data that conforms to the data model. The web page elements do not care about the source of the data, but only care about the UI and user experience. There is no restriction on the implementation method, and Element-UI (component library), HTML (hypertext markup language) or other UI (user interface) frameworks can be used. The controls only care about the data, format the data into a data model and output it, and do not care who renders the data; the web page elements and controls have limited free matching. It can be understood that web page elements and controls are freely matched many-to-many in similar business implementations, and can be correctly rendered to the browser; each industry business line needs to implement its own combination of web page elements and controls.
[0115] The web page processing method of the embodiment of the present invention realizes the reuse of components in different projects and scenarios through data models and adapters, reduces repeated development work, and improves code reusability; business logic, data models and web page elements are separated, which is convenient for their independent maintenance and update, and enhances the maintainability of the system; standard front-end website products are realized for the industry, and product prefabricated components are used to flexibly meet the personalized needs of different customers on the basis of the stability and consistency of standard products by extending controls, modifying web page element styles, configuring parameters and data interception; reducing the amount of project implementation coding, modifying the control request interface address to achieve data replacement, modifying the controls bound to the web page elements to achieve different data rendering, modifying the configuration parameters to update the web page status, etc. When the standard product cannot meet the control and web page element requirements, expand or write new controls. It greatly reduces the difficulty of implementation and greatly improves the delivery efficiency. At the same time, it also reduces the complexity of data interaction with the back end, making development more friendly.
[0116] like Figure 3As shown, an embodiment of the present invention provides a web page processing device 200, comprising:
[0117] The acquisition module 201 is used to receive a page element operation request input by a user;
[0118] The processing module 202 is used to call the base class control model in the model library according to the page element operation request; determine the target view according to the business logic corresponding to the base class control model; and render the target view on the current web page interface to display the target view.
[0119] Optionally, receiving a page element operation request input by a user, including:
[0120] Receive at least one of a page element list operation, a query operation, a tag operation, a navigation operation, a login operation, and a logout operation input by a user.
[0121] Optionally, when the page element operation request is a page element list operation, calling the base class control model in the model library according to the page element operation request includes:
[0122] According to the page element operation request, a base class list control model is called from a model library, wherein the base class list control model includes at least one of the following:
[0123] List attributes, including: current page number, number of data items displayed per page, total number of data items, total number of filtered data items, parameter for returning the number of data items, and array for storing data items;
[0124] List constructor;
[0125] List methods, including: obtaining a data item array of the current page, obtaining a data item array according to obtained data parameters, converting a data object into a data item array, an asynchronous method for loading data, obtaining a data item array of a corresponding page according to a provided page number, triggering an event listener when data loading is completed, and a method for resetting the data list;
[0126] Optionally, when the page element operation request is a query operation, calling a base class control model in a model library according to the page element operation request includes:
[0127] According to the page element operation request, a base class query control model is called from a model library, wherein the base class query control model includes at least one of the following:
[0128] Query attributes, including: query keywords, query types, metadata arrays, query modes, and tag arrays;
[0129] Query constructor;
[0130] The query method includes: a tag array, a metadata array, a data array related to the query type, executing a query operation and returning a query result array, and returning a record containing query parameters.
[0131] Optionally, when the page element operation request is a navigation operation, calling a base class control model in a model library according to the page element operation request includes:
[0132] According to the page element operation request, a base class navigation control model is called from a model library, wherein the base class navigation control model includes at least one of the following:
[0133] Navigation properties, the navigation properties including: a Boolean value for indicating whether navigation is disabled; an array for storing navigation items;
[0134] Constructor, used to receive a configuration object;
[0135] The navigation method includes: obtaining navigation item data according to the provided data, and returning an array.
[0136] Optionally, determining the target view according to the business logic corresponding to the base class control model includes:
[0137] Determine the page element type according to the business logic corresponding to the base class control model;
[0138] Retrieving the corresponding page element according to the page element type;
[0139] A target view is determined according to the page element.
[0140] Optionally, rendering the target view on the current web page interface to display the target view includes:
[0141] Determining page element information and page attribute information according to the target view;
[0142] The page element information and the page attribute information are inserted into the node tree of the current web page interface for rendering to display the target view.
[0143] The processing device for a web page in an embodiment of the present invention receives a page element operation request input by a user, calls a base class control model in a model library according to the page element operation request, determines a target view according to the business logic corresponding to the base class control model, and finally renders the target view on the current web page interface to display the target view, thereby realizing the reuse of the base class control model in different projects and scenarios, reducing repeated development work, and improving development efficiency.
[0144] It should be noted that the device is a device corresponding to the above method, and all implementations in the above method embodiment are applicable to the embodiment of the device and can achieve the same technical effect. This embodiment will not be repeated.
[0145] The embodiment of the present invention further provides a computing device, comprising: a processor, and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described in any one of the above embodiments is executed. All implementations in the above method embodiments are applicable to the embodiments of the device, and can achieve the same technical effects. They will not be described in detail in this embodiment.
[0146] The embodiment of the present invention further provides a computer-readable storage medium on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the above embodiments. All implementations in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects. They will not be described in detail in this embodiment.
[0147] It should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present invention. In addition, the steps of performing the above series of processes can naturally be performed in chronological order according to the order of description, but do not necessarily need to be performed in chronological order. Some steps can be performed in parallel, crosswise or independently of each other.
[0148] It should be noted that, in the above-mentioned embodiments, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the implementation of the above-mentioned embodiments is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0149] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing a web page, characterized in that: include: Receive page element operation requests input by users; According to the page element operation request, calling the base class control model in the model library; Determine the target view according to the business logic corresponding to the base class control model; The target view is rendered and displayed on the current web page interface.
2. The method for processing a web page according to claim 1, characterized in that: Receive page element operation requests input by users, including: Receive at least one of a page element list operation, a query operation, a tag operation, a navigation operation, a login operation, and a logout operation input by a user.
3. The method for processing a web page according to claim 2, characterized in that: When the page element operation request is a page element list operation, the base class control model in the model library is called according to the page element operation request, including: According to the page element operation request, a base class list control model is called from a model library, wherein the base class list control model includes at least one of the following: List attributes, including: current page number, number of data items displayed per page, total number of data items, total number of filtered data items, parameter for returning the number of data items, and array for storing data items; List constructor; list method, the list method includes: obtaining the data item array of the current page, obtaining the data item array according to the obtained data parameters, converting a data object into a data item array, an asynchronous method for loading data, obtaining the data item array of the corresponding page according to the provided page number, triggering an event listener when data loading is completed, and resetting the data list.
4. The method for processing a web page according to claim 2, characterized in that: When the page element operation request is a query operation, the base class control model in the model library is called according to the page element operation request, including: According to the page element operation request, a base class query control model is called from a model library, wherein the base class query control model includes at least one of the following: Query attributes, including: query keywords, query types, metadata arrays, query modes, and tag arrays; Query constructor; The query method includes: a tag array, a metadata array, a data array related to the query type, executing a query operation and returning a query result array, and returning a record containing query parameters.
5. The method for processing a web page according to claim 2, characterized in that: When the page element operation request is a navigation operation, the base class control model in the model library is called according to the page element operation request, including: According to the page element operation request, a base class navigation control model is called from a model library, wherein the base class navigation control model includes at least one of the following: Navigation properties, the navigation properties including: a Boolean value for indicating whether navigation is disabled; an array for storing navigation items; Constructor, used to receive a configuration object; The navigation method includes: obtaining navigation item data according to the provided data, and returning an array.
6. The method for processing a web page according to claim 1, characterized in that: Determining the target view according to the business logic corresponding to the base class control model includes: Determine the page element type according to the business logic corresponding to the base class control model; Retrieving the corresponding page element according to the page element type; A target view is determined according to the page element.
7. The method for processing a web page according to claim 1, characterized in that: Rendering the target view on the current web page interface to display the target view includes: Determining page element information and page attribute information according to the target view; The page element information and the page attribute information are inserted into the node tree of the current web page interface for rendering to display the target view.
8. A web page processing device, characterized in that: include: The acquisition module is used to receive the page element operation request input by the user; A processing module, used to call a base class control model in a model library according to the page element operation request; and determine a target view according to the business logic corresponding to the base class control model; The target view is rendered and displayed on the current web page interface.
9. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is performed.
10. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Rapid development platform based on engine mode front-end and rear-end separation and using method thereof
CN112328212A
Page configuration method and device, computer equipment and computer readable storage medium
CN116450202A
Page rendering method and device, equipment, storage medium and computer program product
CN117762407A
Page rendering method and device, electronic equipment and readable storage medium
CN118171007A
Target page rendering method and device, medium and equipment
CN118819712A