Webpage page style display method, device, equipment, system and medium
By providing error feedback through user clients, developers write and update style code. The landing page file is deployed to the server, which periodically retrieves and overwrites the error code. This resolves the webpage style display issue, improves processing efficiency, and avoids the need for a redeployment process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
- Filing Date
- 2022-03-14
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies have low efficiency in handling web page style display issues, requiring code repair and re-deployment, resulting in long processing times, especially in complex systems.
Error messages are fed back to the developer's client via the user's client. The developer writes style code, and the landing page file is deployed to the server to periodically retrieve and update the style code, generating the correct page style file that directly overwrites the erroneous code, thus avoiding the need for a redeployment process.
It enables rapid resolution of webpage display issues, improves processing efficiency, and adapts to the rapid repair needs of complex systems.
Smart Images

Figure CN116796098B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more particularly to a method, apparatus, device, system, and medium for displaying web page styles. Background Technology
[0002] With the development of computer and internet technology, front-end web development is also constantly evolving. However, in front-end web development, insufficient test scenarios or incomplete test cases can lead to problems with the display style of the webpage after the front-end webpage code is deployed. For example, the styles of borders, color values, or text sizes may not match the actual requirements, or the style of the webpage may be displayed incorrectly in certain special scenarios.
[0003] In existing technologies, to avoid display style issues on web pages after the front-end code is deployed, the code is typically fixed and then redeployed. Users can then refresh the page to see the correct style. However, this method requires local code modification and redeployment, a process that often takes considerable time, especially the redeployment time, which increases with the complexity of the website system. This reduces the efficiency of handling web page issues.
[0004] In summary, existing solutions for resolving webpage style display issues suffer from low processing efficiency. Summary of the Invention
[0005] This application provides a method, apparatus, device, system, and medium for displaying web page styles, which addresses the problem of low efficiency in handling web page style display issues in existing solutions.
[0006] In a first aspect, embodiments of this application provide a method for displaying a webpage style, applied to a user client. The method includes: responding to a user's page access operation, displaying a first page style based on a first landing page file of a target website; if the first page style is displayed incorrectly, feeding back error information of the first page style to a developer client; receiving a second landing page file sent by a landing page file deployment server, and displaying a second page style based on the second landing page file, wherein the second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on style code, and the style code is code written by a developer on the developer client based on the error information.
[0007] In one specific implementation, the method further includes: if the second page style is displayed correctly, sending an indication message to the developer client, wherein the indication message is used to indicate to the developer client that the second page style is displayed correctly.
[0008] In one specific implementation, in response to a user's page access operation, displaying a first page style based on the obtained first landing page file of the target website includes: in response to the user's page access operation, sending a page access request to a landing page file deployment server, wherein the page access request includes an identifier of the target website; receiving the first landing page file returned by the landing page file deployment server; and rendering the page based on the first landing page file to display the first page style.
[0009] Secondly, embodiments of this application provide a method for displaying webpage styles, applied to a developer's client. The method includes: obtaining error information sent by a user client, wherein the error information is used to indicate that the first page style corresponding to the first landing page file of the target website is displayed incorrectly; obtaining style code written by the developer based on the error information, wherein the style code is used to update the first landing page file; and sending the style code and the error information to the landing page file deployment server.
[0010] In one specific implementation, the method further includes: receiving an instruction message sent by a user client and deleting style code, wherein the instruction message is used to prompt the developer client that the second page style is displayed correctly, the second page style is a page style rendered according to the second landing page file, and the second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on the style code.
[0011] Thirdly, embodiments of this application provide a method for displaying webpage styles, applied to a landing page file deployment server. The method includes: obtaining a first landing page file of a target website based on a received page access request from a user client, wherein the page access request includes an identifier of the target website, and the first landing page file includes first static style code obtained from a style file deployment server; sending the first landing page file to the user client; receiving an error message sent by a developer client, wherein the error message indicates an error in the display of a first page style corresponding to the first landing page file; obtaining style code from the developer client based on the error message and a preset time interval, wherein the style code is used to update the first landing page file, and the style code has a higher priority than the first static style code; updating the first static style code in the first landing page file based on the style code to obtain a second landing page file; and sending the second landing page file to the user client.
[0012] In one specific implementation, updating the first static style code in the first landing page file based on style code to obtain the second landing page file includes: determining the error code in the first static style code according to error information, wherein the error code is the code that causes an error in the first page style corresponding to the first landing page file; replacing the error code in the first static style code with style code to obtain the second static style code; and replacing the first static style code in the first landing page file with the second static style code to obtain the second landing page file.
[0013] Fourthly, embodiments of this application provide a method for displaying webpage styles, applied to a style file deployment server. The method includes: obtaining first static style code of a target website based on a page access request received from a user client, wherein the page access request includes an identifier of the target website; and sending the first static style code to the landing page file deployment server.
[0014] Fifthly, embodiments of this application provide a webpage style display device, comprising: a first display module, configured to display a first page style according to a first landing page file of a target website in response to a user's page access operation; a feedback module, configured to feed back error information of the first page style to a developer client if the first page style is displayed incorrectly; and a second display module, configured to receive a second landing page file sent by a landing page file deployment server and display a second page style according to the second landing page file, wherein the second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on style code, and the style code is code written by the developer on the developer client based on the error information.
[0015] Sixthly, embodiments of this application provide a webpage style display device, comprising: a first acquisition module, configured to acquire error information sent by a user client, wherein the error information is used to indicate that the first page style corresponding to the first landing page file of the target website is displayed incorrectly; a second acquisition module, configured to acquire style code written by developers based on the error information, wherein the style code is used to update the first landing page file; and a first sending module, configured to send the style code and the error information to the landing page file deployment server.
[0016] In a seventh aspect, embodiments of this application provide a webpage style display device, comprising: a third acquisition module, configured to acquire a first landing page file of a target website based on a page access request received from a user client, wherein the page access request includes an identifier of the target website, and the first landing page file includes first static style code acquired from a style file deployment server; a second sending module, configured to send the first landing page file to the user client; a receiving module, configured to receive error information sent by a developer client, wherein the error information indicates an error in the display of the first page style corresponding to the first landing page file; a fourth acquisition module, configured to acquire style code from the developer client based on the error information and a preset time interval, wherein the style code is used to update the first landing page file, and the style code has a higher priority than the first static style code; an update module, configured to update the first static style code in the first landing page file based on the style code to obtain a second landing page file; and a third sending module, configured to send the second landing page file to the user client.
[0017] Eighthly, embodiments of this application provide a webpage style display device, comprising: a fifth acquisition module, configured to acquire first static style code of a target website based on a page access request received from a user client, wherein the page access request includes an identifier of the target website; and a fourth sending module, configured to send the first static style code to a landing page file deployment server.
[0018] Ninthly, embodiments of this application provide a terminal device, including: a processor, a memory, a display, and a communication interface; the memory is used to store executable instructions of the processor; wherein the processor is configured to execute a method for displaying a web page style of the first or second aspect by executing the executable instructions.
[0019] In a tenth aspect, embodiments of this application provide a server, including: a processor, a memory, and a communication interface; the memory is used to store executable instructions of the processor; wherein the processor is configured to execute a method for displaying a web page style according to a third or fourth aspect by executing the executable instructions.
[0020] Eleventhly, embodiments of this application provide a readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements a method for displaying a webpage style according to any one of the first to fourth aspects.
[0021] In a twelfth aspect, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, is used to implement a method for displaying a webpage style according to any one of the first to fourth aspects.
[0022] The webpage display method, apparatus, device, system, and medium provided in this application embodiment, when the first page style corresponding to the first landing page file is displayed incorrectly, feeds back the error information to the developer client through the user client. The developer on the developer client writes the corresponding style code based on the error information. After determining that the first page style is displayed incorrectly, the landing page file deployment server retrieves the style code from the developer client at regular intervals, and then updates the first landing page file with the style code to obtain a second landing page file. The landing page file deployment server sends the second landing page file to the user client, and the user client displays the second page style based on the second landing page file. This second page style is the correctly displayed page style after the first page style with the display error has been changed. In this way, the problematic code in the first landing page file can be directly overwritten with style code, realizing a quick solution to the webpage style display problem without the need for the modified code to be re-deployed, thereby improving the efficiency of handling webpage style display problems. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 An application scenario diagram illustrating the method for displaying webpage styles provided in this application;
[0025] Figure 2 A flowchart illustrating an embodiment of the method for displaying webpage styles provided in this application;
[0026] Figure 3 A flowchart illustrating Embodiment Two of the method for displaying the webpage style provided in this application;
[0027] Figure 4 A flowchart illustrating Embodiment 3 of the method for displaying the webpage style provided in this application;
[0028] Figure 5 A flowchart illustrating Embodiment 4 of the method for displaying webpage styles provided in this application;
[0029] Figure 6 A schematic diagram of the structure of the webpage style display device provided in this application, according to Embodiment 1;
[0030] Figure 7A schematic diagram of the structure of the webpage style display device according to Embodiment 2 provided in this application;
[0031] Figure 8 A schematic diagram of the structure of the webpage style display device according to Embodiment 3 provided in this application;
[0032] Figure 9 A schematic diagram of the structure of the webpage style display device according to Embodiment 4 provided in this application;
[0033] Figure 10 A schematic diagram of the structure of a terminal device provided in this application;
[0034] Figure 11 This is a schematic diagram of the structure of a server provided in this application. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.
[0036] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0037] In front-end web development, insufficient test scenarios or incomplete test cases can lead to display issues on the webpage after the code is deployed. While fixing the deployed code and redeploying it can restore the page's appearance after a user refreshes, this method still has some drawbacks:
[0038] When fixing the deployed code, developers need to modify the problematic code locally on their client machines and then redeploy the modified code. Since the time required for code redeployment often depends on the complexity of the website system, the more complex the website system, the longer the code redeployment will take. This reduces the efficiency of handling webpage problems when fixing the code of a more complex website system.
[0039] To address the problems existing in the prior art, this application provides a method for displaying web page styles. Upon discovering a problem with the page style, corresponding style code is written based on the issue. This style code is then obtained from a landing page file deployment server, and the landing page file is updated using the style code on the server. This allows the correct page style to be displayed based on the updated landing page file, thus resolving the web page style display problem. Since this solution renders the web page on the server side, it avoids the need to redeploy modified code. Even with complex network systems, it can quickly resolve web page style display problems, thereby improving the efficiency of handling such issues.
[0040] During the testing of web page development, the applicant discovered that by overwriting the problematic code with correct code on the server side to obtain a modified landing page file, and then using this modified landing page file to render the web page, the process of redeploying the code could be avoided. This directly corrected the incorrect display of the web page style, thus greatly improving the efficiency of handling style display issues on web pages. Based on the above concept, the web page style display method described in this application was designed.
[0041] Figure 1 An application scenario diagram of the webpage style display method provided in this application, such as... Figure 1 As shown, in this scenario, the landing page file is deployed to the landing page file deployment server, and the static style file is deployed to the style file deployment server. Then, the first static style code from the static style file is imported into the landing page file on the landing page file deployment server, so that the first static style code is added to the landing page file on the landing page file deployment server, resulting in the first landing page file. Then, the first landing page file is sent to the user client through the landing page file deployment server. After the user client responds to the user's page access operation, the first page style is displayed according to the first landing page file. This first page style is the original page style.
[0042] When a user discovers an error in the first landing page's style, they report the error to the developer's client via their own client. The developer on the developer's client then writes style code to update the first landing page file based on the error message. This style code, along with the error message, is sent to the landing page file deployment server. Upon receiving the error message, the deployment server uses a scheduled task to retrieve the style code from the developer's client at predetermined time intervals. It then replaces the erroneous code in the first static style code with the new style code, resulting in a second static style code. This second static style code is then added to the first landing page file, creating a second landing page file. The deployment server then sends the second landing page file to the user's client, which displays the second page style, which is the correct page style.
[0043] If the second page style is displayed correctly, the user client sends an instruction message to the developer client to indicate that the second page style is displayed correctly. At this time, the developer client can delete the style code to save storage space.
[0044] Combination Figure 1 The following describes in detail the technical solution of the webpage style display method provided in this application through several specific embodiments, illustrating the scenario shown.
[0045] Figure 2 A flowchart illustrating an embodiment of the method for displaying webpage styles provided in this application is shown below. Figure 2 As shown, the method for displaying this webpage style on the user client includes the following steps:
[0046] S201: In response to the user's page access operation, display the first page style based on the first landing page file of the target website obtained.
[0047] In this step, the first landing page file of the target website received by the user client is sent by the landing page file deployment server. The first landing page file includes the first static style code, which is used to make the first landing page file display the first page style, which is the original web page display style.
[0048] S202: If the style of the first page is displayed incorrectly, the error information of the first page style will be sent back to the developer's client.
[0049] In this step, if a user finds an error in the first page style when accessing a webpage, such as incorrect borders, color values, or text sizes, or a disordered display of the webpage style, the user can report the error information to the developer's client through the user's client, and the developer's client staff will handle it.
[0050] In the above scheme, users accessing the webpage can be ordinary users or website testers. When a user is an ordinary user, if the first page style is displayed incorrectly, the user can provide feedback to the developer client through the information feedback bar on the website, or by phone, or through other means. When a user is a tester, after discovering an error in the first page style, the tester can directly provide feedback to the developer. There are various ways for users to provide error information to the developer client through the user client, as long as the error information can be sent to the developer client; there are no restrictions here.
[0051] S203: Receive the second landing page file sent by the landing page file deployment server, and display the second page style according to the second landing page file.
[0052] In this step, the second landing page file is the file obtained by the landing page file deployment server updating the first landing page file based on the style code. The style code is the code written by the developers on the developer client based on the error information.
[0053] After the error message is fed back to the developer client, the developer on the developer client can write style code based on the error message. Then, the landing page file deployment server updates the first landing page file based on the style code to obtain the second landing page file, and sends the second landing page file to the user client. The user client displays the correct second page style based on the second landing page file.
[0054] The webpage style display method provided in this embodiment, when the first page style corresponding to the first landing page file is displayed incorrectly, feeds back the error information to the developer's client through the user client. The developer on the developer's client writes the corresponding style code based on the error information. The landing page file deployment server obtains the style code in the developer's client, and then updates the first landing page file with the style code to obtain the second landing page file. The landing page file deployment server sends the second landing page file to the user client, and the user client displays the second page style according to the second landing page file. In this way, the problematic code in the first landing page file can be directly overwritten by the style code, realizing a quick solution to the webpage style display problem without the need for the modified code to be re-deployed, thereby improving the efficiency of handling webpage style display problems.
[0055] In one specific implementation, the method further includes: if the second page style is displayed correctly, sending an indication message to the developer client, wherein the indication message is used to indicate to the developer client that the second page style is displayed correctly.
[0056] In this solution, after updating the first landing page file using style code, if the second page style corresponding to the second landing page file is displayed correctly, it means that the display problem of the first page style has been successfully fixed. At this time, an indication message can be sent to the developer client to indicate that the second page style is displayed successfully. This allows the developer client to delete the style code written by the developer from the developer client, thereby saving storage space.
[0057] In one specific implementation, in response to a user's page access operation, displaying a first page style based on the obtained first landing page file of the target website includes: in response to the user's page access operation, sending a page access request to the landing page file deployment server, wherein the page access request includes the identifier of the target website; receiving the first landing page file returned by the landing page file deployment server; and rendering the page based on the first landing page file to display the first page style.
[0058] In this scheme, there is information exchange between the user client and the landing page file deployment server. When a user accesses a page, the user client responds to the user's page access operation by sending a page access request to the landing page file deployment server. This page access request includes the identifier of the target website, such as the target website's URL. In this way, the landing page file deployment server can determine which website the user has accessed, and thus the landing page file deployment server sends the corresponding first landing page file of the target website to the user client. The user client then renders the page based on the first landing page file to display the first page style.
[0059] Figure 3 A flowchart illustrating Embodiment Two of the method for displaying the webpage style provided in this application is shown below. Figure 3 As shown, the method for displaying this webpage style in the developer's client includes the following steps:
[0060] S301: Get error information sent by the user client.
[0061] In this step, the error message is used to indicate that the first page style of the first landing page file of the target website is displayed incorrectly. After the user client determines that the first page style is displayed incorrectly, it will send an error message to the developer client so that the developer on the developer client can handle the display problem of the first page style.
[0062] S302: Obtain the style code written by the developer based on the error message.
[0063] In this step, after the developer client receives the error information, the developer needs to write the corresponding style code based on the error information to solve the problem of the first page style display error. This style code can be used to update the first landing page file.
[0064] In the above solution, when updating the first landing page file using the style code written by the developers, the erroneous code in the first static style code of the first landing page file is replaced. Therefore, the style code is only used to fix the part of the code in the first page style that has display problems, while the display of other pages in the first page style still needs to use the code in the first static style code that does not have problems.
[0065] S303: Send the style code and error message to the landing page file deployment server.
[0066] In this step, when the landing page file deployment server updates the first landing page file using style code, it needs to first determine that the first page style is displayed incorrectly. Therefore, when the developer client sends the style code to the landing page file deployment server, it needs to send the error information at the same time. This way, when the landing page file deployment server determines that the first page style is displayed incorrectly, it will obtain the style code from the developer client so as to update the first landing page file.
[0067] The webpage style display method provided in this application embodiment, when the first page style corresponding to the first landing page file is displayed incorrectly, feeds back the error information to the developer's client through the user client. The developer on the developer's client writes the corresponding style code according to the error information and sends the style code and error information to the landing page file deployment server. The landing page file deployment server retrieves the style code from the developer's client according to the error information, and then updates the first landing page file with the style code to obtain a second landing page file. The second page style corresponding to the second landing page file is the correctly displayed page style after the first page style with the display error is changed. In this way, the problematic code in the first landing page file can be directly overwritten by the style code, realizing a quick solution to the webpage style display problem without the need for the modified code to be re-deployed, thereby improving the efficiency of handling webpage style display problems.
[0068] In one specific implementation, the method further includes: receiving an instruction message sent by a user client and deleting style code, wherein the instruction message is used to prompt the developer client that the second page style is displayed correctly, the second page style is the page style rendered according to the second landing page file, and the second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on the style code.
[0069] In this solution, if the second page style corresponding to the second landing page file is displayed correctly, it means that the display problem of the first page style has been successfully fixed. At this time, an instruction message can be sent from the user client to the developer client to indicate that the second page style is displayed correctly. After receiving the instruction message, the developer client confirms that the display problem of the first page style has been successfully fixed. Therefore, in order to save storage space, the style code can be deleted.
[0070] Figure 4 The flowchart of Embodiment 3 of the method for displaying the webpage style provided in this application is shown below. Figure 4 As shown, this method for displaying webpage styles is applied to the landing page file deployment server and includes the following steps:
[0071] S401: Based on the received page access request from the user client, obtain the first landing page file of the target website, wherein the first landing page file includes the first static style code obtained from the style file deployment server.
[0072] In this step, when a user accesses a page, the user's client responds to the user's page access operation by sending a page access request to the landing page file deployment server. This page access request includes the identifier of the target website, so that the landing page file deployment server can determine which website the user is accessing based on the identifier. This allows the landing page file deployment server to obtain the first landing page file of the corresponding target website. The first landing page file includes the first static style code obtained from the style file deployment server.
[0073] In the above scheme, the first static style code is used to make the first landing page file display the corresponding first page style. Before adding the first static style code obtained from the style file deployment server to the first landing page file, the first landing page file and the first static style code are deployed on different servers. The first landing page file is deployed on the landing page file deployment server, and the first static style code is deployed on the style file deployment server. In this way, when there is a display problem with the first page style of the first landing page file, the display problem can be fixed by directly modifying the first static style code on the landing page file deployment server, without having to redeploy the modified code, thereby improving the efficiency of handling web page style display problems.
[0074] S402: Send the first landing page file to the user's client.
[0075] In this step, after the landing page file deployment server obtains the first landing page file, since the server cannot display the page style, the landing page file deployment server needs to send the obtained first landing page file to the user client, so that the user client can display the corresponding first page style based on the first landing page file.
[0076] S403: An error message was received from the developer's client.
[0077] In this step, if the first page style is displayed incorrectly, the user client needs to send the error message to the developer client. After the developer writes the style code based on the error message, the developer client sends the style code and the error message together to the landing page file deployment server, so as to indicate to the landing page file deployment server that the first page style of the first landing page file is displayed incorrectly.
[0078] S404: Retrieve style code from the developer client based on the error message and a preset time interval.
[0079] In this step, a scheduled task is added to the landing page file deployment server. This scheduled task only runs after the landing page file deployment server receives an error message. When the landing page file deployment server receives an error message, the scheduled task will retrieve the style code from the developer's client at regular intervals. For example, the scheduled task will retrieve the style code from the developer's client every minute until the style of the second page corresponding to the updated second landing page file is displayed correctly. This avoids the problem of reduced efficiency in handling web page style display issues if the style of the second page is still displayed incorrectly after the second landing page file is updated.
[0080] In the above scheme, the style code is used to update the first landing page file, and the style code has a higher priority than the first static style code. Because the style code has a higher priority, after the second landing page file is obtained by updating the first landing page file with the style code, the style code in the second landing page file will run first. As a result, the page style affected by the style code will be displayed first in the second page style corresponding to the second landing page file, and the page style affected by the error code in the first static style code will not be displayed. In this way, the style code can be used to solve the display problems that occur in the first page style, such as the display problems of borders, color values, text, etc., or the display problems of page style disorder.
[0081] Optionally, the above time interval can be changed according to actual needs. The shorter the time interval, the faster the new style takes effect and the faster it can be displayed. To ensure that users can resolve page style display issues more quickly, the method in this application can be used. Once the urgent problem is resolved, the static style code can be comprehensively modified and improved before going live, thus ensuring a rapid resolution of user problems.
[0082] S405: Update the first static style code in the first landing page file based on the style code to obtain the second landing page file.
[0083] In this step, the first landing page file in the landing page file deployment server includes the first static style code obtained from the style file deployment server. Since the first page style is displayed incorrectly, it indicates that there is a problem with some code in the first static style code. Therefore, after obtaining the style code, the landing page file deployment server can use the style code to update the first static style code, thereby obtaining the second landing page file.
[0084] S406: Send the second landing page file to the user's client.
[0085] In this step, the second landing page file is obtained by updating the first static style code in the first landing page file based on the style code. Therefore, the code in the second landing page file is correct, so the landing page file deployment server can send the second landing page file to the user client. The user client then displays the second page style based on the second landing page file, which is the page style that displays correctly.
[0086] For example, the pseudocode for displaying color values in the first static style code is: `#demo{color:blue;}`. However, the correct color value is `red`. Therefore, the style problem on the first page is a color value display issue. In this case, the user client sends an error message to the developer client. The developer on the developer client writes style code based on the error message, which is represented by the pseudocode: `#demo{color:red!important;}`. By updating the first static style code with this style code, `#demo{color:red!important;}` can replace `#demo{color:blue;}`. Because the style code `#demo{color:red!important;}` has an `important` priority, it will prioritize displaying the color value red. This ensures that the color value displayed in the first page style is red, thus resolving the color value display problem on the first page style.
[0087] Alternatively, a server-side architecture similar to Java can be used to update the landing page file using style code.
[0088] The webpage style display method provided in this application embodiment, when the first page style corresponding to the first landing page file is displayed incorrectly, feeds back the error information to the developer client through the user client. The developer on the developer client writes the corresponding style code based on the error information. After determining that the first page style is displayed incorrectly, the landing page file deployment server retrieves the style code from the developer client at regular intervals, and then updates the first landing page file with the style code to obtain a second landing page file. The landing page file deployment server sends the second landing page file to the user client, and the user client displays the second page style based on the second landing page file. This second page style is the correctly displayed page style after the first page style with the display error has been changed. In this way, the problematic code in the first landing page file can be directly overwritten with style code, realizing a quick solution to the webpage style display problem without the need for the modified code to be re-deployed, thereby improving the efficiency of handling webpage style display problems.
[0089] In one specific implementation, updating the first static style code in the first landing page file based on style code to obtain the second landing page file includes: determining the error code in the first static style code according to the error information, wherein the error code is the code that causes an error in the first page style corresponding to the first landing page file; replacing the error code in the first static style code with style code to obtain the second static style code; and replacing the first static style code in the first landing page file with the second static style code to obtain the second landing page file.
[0090] In this solution, if the first page style displays incorrectly, it indicates an error in the first static style code of the first landing page file. This error code causes the first page style corresponding to the first landing page file to display incorrectly. After receiving the error information, the landing page file deployment server can identify the error code in the first static style code based on the error information. Then, it replaces the error code in the first static style code with the style code written by the developers that corresponds to the error information. The resulting second static style code is the correct code, ensuring the page displays correctly and preventing display errors. After obtaining the second static style code, the first static style code in the first landing page file is replaced with the second static style code. The resulting second landing page file is then sent to the user's client through the landing page file deployment server, and the user's client will display the second page style according to the second landing page file.
[0091] Figure 5 The flowchart of Embodiment 4 of the method for displaying the webpage style provided in this application is shown below. Figure 5As shown, this method for displaying webpage styles is applied to a style file deployment server and includes the following steps:
[0092] S501: Based on the received page access request from the user client, obtain the first static style code of the target website.
[0093] In this step, when a user accesses a page, the user's client responds to the user's page access operation by sending a page access request to the landing page file deployment server. This page access request includes the identifier of the target website, so that the landing page file deployment server can determine which website the user is accessing based on the identifier. This allows the landing page file deployment server to obtain the first static style code of the corresponding target website. The first static style code is the code that makes the first landing page file display the corresponding first page style. If there is an error in part of the first static style code, the first page style will display incorrectly.
[0094] S502: Send the first static style code to the landing page file deployment server.
[0095] In this step, the first landing page file and the first static style code are deployed on different servers. The first landing page file is deployed on the landing page file deployment server, and the first static style code is deployed on the style file deployment server. When a user sends a page access request to the landing page file deployment server and the style file deployment server, the style file deployment server retrieves the first static style code of the target website, waits for the landing page file deployment server to retrieve the first static style code from the style file deployment server according to the page access request, adds it to the first landing page file, and then the landing page file deployment server sends the first landing page file to the user's client. In this way, the first page style seen by the user is the page rendering and display based on the first landing page file including the first static style code.
[0096] The webpage style display method provided in this application deploys static style code on a style file deployment server. After a user client sends a page access request to both the landing page file deployment server and the style file deployment server, the landing page file deployment server retrieves the static style code from the style file deployment server and adds it to the landing page file. Thus, the page style seen by the user is rendered based on the landing page file with the added static style code. When a problem with the static style code causes an error in the page style display, simply updating the static style code resolves the error. Therefore, it allows for quick resolution of webpage style display issues without requiring the modified code to be redeployed, thereby improving the efficiency of handling webpage style display problems.
[0097] In general, the technical solution provided in this application is a technical implementation method that can ensure the efficiency of handling web page style display issues.
[0098] Figure 6 A schematic diagram of the structure of the webpage style display device provided in this application, as shown in Embodiment 1. Figure 6 As shown, the webpage style display device 60 includes:
[0099] The first display module 61 is used to respond to the user's page access operation and display the first page style according to the first landing page file of the target website obtained;
[0100] Feedback module 62 is used to send error information about the first page style to the developer's client if the first page style is displayed incorrectly.
[0101] The second display module 63 is used to receive the second landing page file sent by the landing page file deployment server, and display the second page style according to the second landing page file. The second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on the style code. The style code is code written by the developers of the developer client based on error information.
[0102] Optionally, the webpage style display device 60 is further configured to send an instruction message to the developer client if the second page style is displayed correctly, wherein the instruction message is used to prompt the developer client that the second page style is displayed correctly.
[0103] Optionally, the first display module 61 is further configured to respond to a user's page access operation by sending a page access request to the landing page file deployment server, wherein the page access request includes the identifier of the target website; receiving the first landing page file returned by the landing page file deployment server; and rendering the page according to the first landing page file to display the first page style.
[0104] The webpage style display device provided in this embodiment is used to execute the technical solution of the user client in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0105] Figure 7 A schematic diagram of the structure of the webpage style display device according to Embodiment 2 provided in this application is shown below. Figure 7 As shown, the webpage style display device 70 includes:
[0106] The first acquisition module 71 is used to acquire error information sent by the user client, wherein the error information is used to indicate that the first page style corresponding to the first landing page file of the target website is displayed incorrectly;
[0107] The second acquisition module 72 is used to acquire the style code written by the developer based on the error information. The style code is used to update the first landing page file.
[0108] The first sending module 73 is used to send style codes and error messages to the landing page file deployment server.
[0109] Optionally, the style display device 70 of the webpage is also used to receive instruction information sent by the user client and delete style code. The instruction information is used to prompt the developer client that the second page style is displayed correctly. The second page style is the page style rendered according to the second landing page file. The second landing page file is the file obtained by the landing page file deployment server updating the first landing page file based on the style code.
[0110] The webpage style display device provided in this embodiment is used to execute the technical solution of the developer client in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0111] Figure 8 A schematic diagram of the structure of Embodiment 3 of the webpage style display device provided in this application is shown below. Figure 8 As shown, the webpage style display device 80 includes:
[0112] The third acquisition module 81 is used to acquire the first landing page file of the target website according to the page access request received from the user client, wherein the page access request includes the identifier of the target website, and the first landing page file includes the first static style code acquired from the style file deployment server;
[0113] The second sending module 82 is used to send the first landing page file to the user client;
[0114] The receiving module 83 is used to receive error information sent by the developer client, wherein the error information is used to indicate that the first page style corresponding to the first landing page file is displayed incorrectly;
[0115] The fourth acquisition module 84 is used to acquire style code from the developer client according to the error message and the preset time interval. The style code is used to update the first landing page file. The priority of the style code is higher than that of the first static style code.
[0116] Update module 85 is used to update the first static style code in the first landing page file based on the style code, so as to obtain the second landing page file;
[0117] The third sending module 86 is used to send the second landing page file to the user client.
[0118] Optionally, the update module 85 is further configured to determine the error code in the first static style code based on the error information, wherein the error code is the code that causes the first page style corresponding to the first landing page file to have an error; replace the error code in the first static style code with a style code to obtain the second static style code; and replace the first static style code in the first landing page file with the second static style code to obtain the second landing page file.
[0119] The webpage style display device provided in this embodiment is used to execute the landing page file deployment server technical solution in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0120] Figure 9 A schematic diagram of the structure of Embodiment 4 of the webpage style display device provided in this application is shown below. Figure 9 As shown, the webpage style display device 90 includes:
[0121] The fifth acquisition module 91 is used to acquire the first static style code of the target website based on the page access request received from the user client, wherein the page access request includes the identifier of the target website;
[0122] The fourth sending module 92 is used to send the first static style code to the landing page file deployment server.
[0123] The webpage style display device provided in this embodiment is used to execute the technical solution of the style file deployment server in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0124] Figure 10 This is a structural schematic diagram of a terminal device provided in this application. Figure 10 As shown, the terminal device 1000 includes:
[0125] Processor 1011, memory 1012, display 1013 and communication interface 1014;
[0126] Memory 1012 is used to store executable instructions of the processor;
[0127] The processor 1011 is configured to execute the technical solution of the user client or developer client in the web page style display method provided in any of the foregoing embodiments by executing executable instructions.
[0128] Optionally, the memory 1012 can be either standalone or integrated with the processor 1011.
[0129] Optionally, when the memory 1012 is a device independent of the processor 1011, the terminal device 1000 may further include:
[0130] A bus is used to connect the aforementioned devices.
[0131] The terminal device is used to execute the technical solutions of the user client or developer client in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0132] Figure 11 This is a schematic diagram of the structure of a server provided in this application. Figure 11 As shown, the server 1100 includes:
[0133] Processor 1111, memory 1112, and communication interface 1113;
[0134] The memory 1112 is used to store the executable instructions of the processor 1111;
[0135] The processor 1111 is configured to execute the landing page file deployment server or style file deployment server in any of the foregoing method embodiments by executing executable instructions.
[0136] Optionally, the memory 1112 can be either standalone or integrated with the processor 1111.
[0137] Optionally, when the memory 1112 is a device independent of the processor 1111, the server 1100 may further include:
[0138] A bus is used to connect the aforementioned devices.
[0139] This server is used to execute the technical solutions of landing page file deployment server or style file deployment server in any of the aforementioned method embodiments. The implementation principle and technical effect are similar, and will not be described again here.
[0140] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for displaying web page styles provided in any of the foregoing embodiments.
[0141] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for displaying web page styles provided in any of the foregoing method embodiments.
[0142] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for displaying a webpage style, characterized in that, Applied to a user client, the method includes: In response to the user's page access operation, display the first page style based on the first landing page file of the target website; If the style of the first page is displayed incorrectly, the error information of the first page style will be sent back to the developer's client. The system receives a second landing page file sent by the landing page file deployment server and displays a second page style based on the second landing page file. The second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on style code. The style code is code written by the developers on the developer client based on the error information.
2. The method according to claim 1, characterized in that, The method further includes: If the second page style is displayed correctly, an instruction message is sent to the developer client, wherein the instruction message is used to indicate to the developer client that the second page style is displayed correctly.
3. The method according to claim 1 or 2, characterized in that, The step of responding to a user's page access operation and displaying a first page style based on the obtained first landing page file of the target website includes: In response to a user's page access operation, a page access request is sent to the landing page file deployment server, wherein the page access request includes the identifier of the target website; Receive the first landing page file returned by the landing page file deployment server; The page is rendered based on the first landing page file, and the first page style is displayed.
4. A method for displaying a webpage style, characterized in that, Applied to a developer client, the method includes: Obtain error information sent by the user client, wherein the error information is used to indicate that the first page style corresponding to the first landing page file of the target website is displayed incorrectly, and the error information is the user client responding to the user's page access operation, displaying the first page style according to the obtained first landing page file of the target website, and feeding back the error information of the first page style to the developer client when the first page style is displayed incorrectly; Obtain the style code written by the developer based on the error information, wherein the style code is used to update the first landing page file; The style code and the error message are sent to the landing page file deployment server, so that the landing page file deployment server updates the first landing page file based on the style code to obtain a second landing page file, and sends the second landing page file to the user client, and the user client displays the second page style according to the second landing page file.
5. The method according to claim 4, characterized in that, The method further includes: The system receives an instruction message sent by the user client and deletes the style code. The instruction message is used to indicate to the developer client that the second page style is displayed correctly. The second page style is a page style rendered based on the second landing page file. The second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on the style code.
6. A method for displaying a webpage style, characterized in that, Applied to a landing page file deployment server, the method includes: Based on the received page access request from the user client, the first landing page file of the target website is obtained, wherein the page access request includes the identifier of the target website, and the first landing page file includes the first static style code obtained from the style file deployment server; Send the first landing page file to the user client; The system receives an error message from the developer client, wherein the error message indicates that the first page style corresponding to the first landing page file is displaying incorrectly. Based on the error message and a preset time interval, style code is obtained from the developer client, wherein the style code is used to update the first landing page file, and the style code has a higher priority than the first static style code; The first static style code in the first landing page file is updated based on the style code to obtain the second landing page file; The second landing page file is sent to the user's client.
7. The method according to claim 6, characterized in that, The step of updating the first static style code in the first landing page file based on the style code to obtain the second landing page file includes: The error code in the first static style code is determined based on the error information, wherein the error code is the code that causes an error in the first page style corresponding to the first landing page file; The error code in the first static style code is replaced with the style code to obtain the second static style code; The second static style code is used to replace the first static style code in the first landing page file to obtain the second landing page file.
8. A method for displaying a webpage style, characterized in that, Applied to a style file deployment server, the method includes: Based on the received page access request from the user client, obtain the first static style code of the target website, wherein the page access request includes the identifier of the target website; The first static style code is sent to the landing page file deployment server, so that the landing page file deployment server generates a first landing page file based on the first static style code. The first landing page file is then sent to the user client. After receiving an error message from the developer client, style code is retrieved from the developer client according to the error message and a preset time interval. The first static style code in the first landing page file is updated based on the style code to obtain a second landing page file. The second landing page file is then sent to the user client. The error message indicates that the first page style corresponding to the first landing page file is displaying incorrectly. The style code is used to update the first landing page file, and the style code has a higher priority than the first static style code.
9. A display device for webpage styles, characterized in that, include: The first display module is used to respond to the user's page access operation and display the first page style according to the first landing page file of the target website obtained; The feedback module is used to send error information about the first page style to the developer's client if the first page style is displayed incorrectly. The second display module is used to receive a second landing page file sent by the landing page file deployment server, and display a second page style according to the second landing page file. The second landing page file is a file obtained by the landing page file deployment server updating the first landing page file based on style code. The style code is code written by the developers of the developer client based on the error information.
10. A webpage style display device, characterized in that, include: The first acquisition module is used to acquire error information sent by the user client. The error information is used to indicate that the first page style corresponding to the first landing page file of the target website is displayed incorrectly. The error information is the user client responding to the user's page access operation and displaying the first page style according to the acquired first landing page file of the target website. When the first page style is displayed incorrectly, the error information of the first page style is fed back to the developer client. The second acquisition module is used to acquire style code written by the developer based on the error information, and the style code is used to update the first landing page file; The first sending module is used to send the style code and the error information to the landing page file deployment server, so that the landing page file deployment server updates the first landing page file based on the style code to obtain a second landing page file, and sends the second landing page file to the user client, and the user client displays the second page style according to the second landing page file.
11. A webpage style display device, characterized in that, include: The third acquisition module is used to acquire the first landing page file of the target website based on the page access request received from the user client, wherein the page access request includes the identifier of the target website, and the first landing page file includes the first static style code acquired from the style file deployment server; The second sending module is used to send the first landing page file to the user client; The receiving module is used to receive error information sent by the developer's client, wherein the error information is used to indicate that the first page style corresponding to the first landing page file is displaying an error; The fourth acquisition module is used to acquire style code from the developer client according to the error information and a preset time interval, wherein the style code is used to update the first landing page file, and the style code has a higher priority than the first static style code. The update module is used to update the first static style code in the first landing page file based on the style code to obtain the second landing page file; The third sending module is used to send the second landing page file to the user client.
12. A webpage style display device, characterized in that, include: The fifth acquisition module is used to acquire the first static style code of the target website based on the page access request received from the user client, wherein the page access request includes the identifier of the target website; The fourth sending module is used to send the first static style code to the landing page file deployment server, so that the landing page file deployment server generates a first landing page file based on the first static style code, sends the first landing page file to the user client, and after receiving an error message sent by the developer client, retrieves style code from the developer client according to the error message and a preset time interval, updates the first static style code in the first landing page file based on the style code to obtain a second landing page file, and sends the second landing page file to the user client. The error message indicates an error in the display of the first page style corresponding to the first landing page file, the style code is used to update the first landing page file, and the style code has a higher priority than the first static style code.
13. A terminal device, characterized in that, include: Processor, memory, display, and communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the method for displaying the web page style according to any one of claims 1 to 3 or 4 to 5 by executing the executable instructions.
14. A server, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the method for displaying the web page style of any one of claims 6 to 7 or 8 by executing the executable instructions.
15. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for displaying the web page style as described in any one of claims 1 to 8.
16. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, is used to implement the method for displaying the web page style as described in any one of claims 1 to 8.