CN117194839A - Mailbox theme skin switching method and device, electronic equipment and storage medium - Google Patents

Mailbox theme skin switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117194839A
CN117194839A CN202311473633.XA CN202311473633A CN117194839A CN 117194839 A CN117194839 A CN 117194839A CN 202311473633 A CN202311473633 A CN 202311473633A CN 117194839 A CN117194839 A CN 117194839A
Authority
CN
China
Prior art keywords
style sheet
cascading style
attribute value
placeholder
skin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311473633.XA
Other languages
Chinese (zh)
Inventor
周知
边疆
刘明明
吴旭珍
陈涛
王圣寅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unicom Online Information Technology Co Ltd
Original Assignee
China Unicom Online Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unicom Online Information Technology Co Ltd filed Critical China Unicom Online Information Technology Co Ltd
Priority to CN202311473633.XA priority Critical patent/CN117194839A/en
Publication of CN117194839A publication Critical patent/CN117194839A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a mailbox theme skin switching method, a mailbox theme skin switching device, electronic equipment and a storage medium, wherein the method comprises the following steps: and acquiring a first attribute value corresponding to the current default theme skin in the cascading style sheet attribute, wherein the first attribute value is the value of the default theme skin corresponding to the style in the cascading style sheet. And replacing the first attribute value with the placeholder to obtain variable data of the first cascading style sheet file and the default theme skin. And sending the first attribute value and a variable data set formed by the variable data to a server side to replace the placeholder and generate an executable second cascading style sheet file. And receiving a second cascading style sheet file from the server side to replace the first cascading style sheet file corresponding to the default theme skin. According to the method, the server side generates a new executable cascading style sheet file on the basis of the original variable data and returns the new executable cascading style sheet file to the user side, so that the compatibility is good, the workload of editing the style of the skin switching component is reduced, and the development cost is reduced.

Description

Mailbox theme skin switching method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for switching mailbox theme skins, an electronic device, and a storage medium.
Background
Along with the rigor of modern Web front-end standards, the continuous popularization and perfection of technologies and tools such as development frameworks and the like, the development mode of the Web front-end is greatly changed, and the service receiving capacity is greatly improved. The importance of the email system is continuously highlighted along with the continuous expansion of the use scene and the use depth due to the unique social and business properties of the email system. Along with the gradual enrichment and deepening of the functions of the electronic mailbox system, the technical complexity of the Web front-end site of the whole electronic mailbox is also increased increasingly. At the same time, the personalized demands of users are increasing, and the theme skin of the mailbox site is the most basic one. Meanwhile, because of certain hysteresis of the upgrading of the hardware of the user computer and the version of the browser, a large number of relatively old browsers are still used on the user side at the present stage, and certain inconvenience is brought to the switching of the theme skin of the Web front-end site of the electronic mailbox.
At present, two types of theme skin switching modes of the existing email Web front-end site exist, namely, a plurality of theme styles are respectively defined for all the Dom (Document Object Model ) elements and components used in the project through files such as CSS (Cascading Style Sheet, cascading style sheets), less (Leaner Style Sheets, CSS preprocessing language) and the like, corresponding CSS files are loaded according to a theme selected by a user, and then the currently effective CSS files are replaced to achieve the purpose of theme switching. However, the mode can only switch among preset topics, and multiple sets of color matching schemes need to be prepared in advance, so that the overall development cost is high, and the subsequent functions also need to provide corresponding multiple sets of topic color matching for the expanded functions. The other is to define key CSS variables and dynamically modify the CSS variables to realize the dynamic theme skin, and the CSS variables belong to newer technologies and are difficult to ensure compatibility although the dynamic theme skin can be realized when the website runs.
In summary, the existing method for switching the theme skin of the Web front-end site of the email box has higher development cost and is difficult to ensure compatibility.
Disclosure of Invention
Accordingly, in order to solve the above-mentioned problems, it is necessary to provide a mailbox theme skin switching method, device, electronic apparatus and storage medium that have low development cost and can ensure compatibility.
The invention provides a mailbox theme skin switching method, which is applied to a user side, and comprises the following steps:
acquiring a first attribute value corresponding to a current default theme skin in a cascading style sheet attribute, wherein the first attribute value is a value of a corresponding style of the default theme skin in the cascading style sheet;
replacing the first attribute value with a placeholder to obtain a first cascading style sheet file and variable data of default theme skin;
transmitting the first attribute value and a variable data set formed by the variable data to a server side to replace the placeholder and generate an executable second cascading style sheet file;
and receiving the second cascading style sheet file from the server side to replace the first cascading style sheet file corresponding to the default theme skin.
In one embodiment, the replacing the first attribute value with a placeholder to obtain variable data of the first cascading style sheet file and the default theme skin includes:
identifying the attribute of the cascading style sheet and the first attribute value corresponding to the attribute through a cascading style sheet preprocessing plug-in, wherein the first attribute value comprises the name of the placeholder and a second attribute value corresponding to the placeholder;
and based on the first attribute value, acquiring a mapping relation between the placeholder and the variable data so as to replace the first attribute value with the placeholder.
In one embodiment, the method further comprises:
judging whether the user side has a cached third layered style sheet file of the subject skin or not; if there is, then
Executing the third layered style sheet file; if not, then
And sending a first request to a server side to receive the second cascading style sheet file from the server side.
The invention also provides a mailbox theme skin switching method which is applied to the server side, and the method comprises the following steps:
receiving a first attribute value from a user side and a variable data set formed by variable data, wherein the first attribute value is a value of a corresponding style of a current default theme skin in a cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder;
replacing the placeholder with the first attribute value and variable dataset to generate an executable second cascading style sheet file;
and sending the second cascading style sheet file to a user side to replace the first cascading style sheet file corresponding to the default theme skin.
In one embodiment, the user side is provided with a cascading style sheet preprocessing plug-in, and the cascading style sheet preprocessing plug-in is used for identifying an attribute of the cascading style sheet and the first attribute value corresponding to the attribute, wherein the first attribute value comprises a name of the placeholder and a second attribute value corresponding to the placeholder;
the first attribute value is used for acquiring a mapping relation between the placeholder and the variable data, and replacing the first attribute value with the placeholder.
In one embodiment, the method further comprises:
when the third layered style sheet file of the subject skin which does not have the cache in the user side is received, a first request from the user side is received;
and sending the second cascading style sheet file to the user terminal based on the first request.
The invention also provides a mailbox theme skin switching device which is applied to the user side, and the device comprises:
the first acquisition module is used for acquiring a first attribute value corresponding to the current default theme skin in the cascading style sheet attribute, wherein the first attribute value is the value of a corresponding style of the default theme skin in the cascading style sheet;
the first replacing module is used for replacing the first attribute value with a placeholder to obtain a first cascading style sheet file and variable data of default theme skin;
the first sending module is used for sending the first attribute value and a variable data set formed by the variable data to a server side so as to replace the placeholder and generate an executable second cascading style sheet file;
the first receiving module is configured to receive the second cascading style sheet file from the server side, so as to replace the first cascading style sheet file corresponding to the default theme skin.
The invention also provides a mailbox theme skin switching device which is applied to the server side, and the device comprises:
the second receiving module is used for receiving a first attribute value from a user side and a variable data set formed by variable data, wherein the first attribute value is a value of a corresponding style of the current default theme skin in the cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder;
a second replacement module for replacing the placeholder with the first attribute value and variable dataset to generate an executable second cascading style sheet file;
and the second sending module is used for sending the second cascading style sheet file to a user side so as to replace the first cascading style sheet file corresponding to the default theme skin.
The invention also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the mailbox theme skin switching method according to any one of the above when executing the computer program.
The invention also provides a computer storage medium storing a computer program which when executed by a processor implements a mailbox topic skin switching method as described in any one of the above.
According to the mailbox theme skin switching method, the mailbox theme skin switching device, the electronic equipment and the storage medium, the user side obtains the variable data formed by the corresponding cascading style sheet file and the default theme skin together by obtaining the attribute value corresponding to the current default theme skin in the cascading style sheet attribute and replacing the attribute value with the corresponding placeholder. And then, the variable data set formed by the attribute values and the variable data is sent to the server side, and the executable cascading style sheet file is generated by replacing placeholders with the attribute values and the variable data set by the server side. And finally, the server side sends the generated executable cascading style sheet file back to the user side, so that the user side replaces the executable cascading style sheet file with the cascading style sheet file of the default theme skin, and the executable cascading style sheet file can be executed, and the switching of the theme skin of the front end of the mailbox Web is realized. According to the method, corresponding variable data are obtained through processing the original default theme skin cascading style sheet file, a new executable cascading style sheet file generated on the basis of the variable data is returned to the user side through the server side, good compatibility is achieved, the workload of editing the skin switching assembly style is reduced, and further development cost is reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a mailbox theme skin switching method provided by the invention;
FIG. 2 is a second schematic diagram of a mailbox theme skin switching method according to the present invention;
FIG. 3 is a third schematic flow chart of the mailbox theme skin switching method according to the present invention;
FIG. 4 is a schematic diagram of a mailbox theme skin switching method according to the present invention;
FIG. 5 is a schematic diagram of a mailbox theme skin switching method according to the present invention;
fig. 6 is a schematic diagram of a CSS file construction flow of a mailbox theme skin switching method in a specific embodiment provided by the present invention;
fig. 7 is a flowchart of a method for switching mailbox theme skin in an embodiment of the present invention;
fig. 8 is a schematic diagram of a mailbox theme skin switching device according to the present invention;
FIG. 9 is a schematic diagram of a mailbox theme skin switching device according to the second embodiment of the present invention;
fig. 10 is an internal structural diagram of a computer device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The mailbox theme skin switching method, the mailbox theme skin switching device, the electronic equipment and the storage medium of the invention are described below with reference to fig. 1 to 10.
As shown in fig. 1, in one embodiment, a mailbox theme skin switching method is applied to a user side, and includes the following steps:
step S110, a first attribute value corresponding to the current default theme skin in the cascading style sheet attribute is obtained, wherein the first attribute value is a value of a corresponding style of the default theme skin in the cascading style sheet.
Specifically, the user side obtains an attribute value corresponding to the current default theme skin in the cascading style sheet attribute, namely a first attribute value, wherein the first attribute value is the value of the corresponding style of the current default theme skin in the cascading style sheet.
And step S120, replacing the first attribute value with a placeholder to obtain variable data of the first cascading style sheet file and the default theme skin.
Specifically, the user side replaces the first attribute value obtained in step S110 with a corresponding placeholder to obtain variable data composed of the first cascading style sheet file and the default theme skin together.
It should be noted that, the first cascading style sheet file is a cascading style file constructed after the first attribute value in the cascading style file corresponding to the original default theme skin is replaced by the corresponding placeholder.
Step S130, the first attribute value and the variable data set formed by the variable data are sent to the server side to replace the placeholder and generate an executable second cascading style sheet file.
Specifically, the user side sends the obtained first attribute value and the variable data set formed by the variable data obtained in step S120 to the server side, and replaces the placeholder by the server side to generate an executable cascading style sheet file, namely a second cascading style sheet file.
It should be noted that, the server side replaces the first attribute value and the variable data set with the layered style sheet file in the server to generate a second layered style sheet file, and sends the generated second layered style sheet file to the user side.
Step S140, receiving a second cascading style sheet file from the server side to replace the first cascading style sheet file corresponding to the default theme skin.
Specifically, the user receives the executable second cascading style sheet file generated from the server side, replaces the first cascading style sheet file corresponding to the original default theme skin, and can realize the switching of the theme skin.
According to the mailbox theme skin switching method, the user side obtains the variable data formed by the corresponding cascading style sheet file and the default theme skin together by obtaining the attribute value corresponding to the current default theme skin in the cascading style sheet attribute and replacing the attribute value with the corresponding placeholder. And then, the variable data set formed by the attribute values and the variable data is sent to the server side, and the executable cascading style sheet file is generated by replacing placeholders with the attribute values and the variable data set by the server side. And finally, the server side sends the generated executable cascading style sheet file back to the user side, so that the user side replaces the executable cascading style sheet file with the cascading style sheet file of the default theme skin, and the executable cascading style sheet file can be executed, and the switching of the theme skin of the front end of the mailbox Web is realized. According to the method, corresponding variable data are obtained through processing the original default theme skin cascading style sheet file, a new executable cascading style sheet file generated on the basis of the variable data is returned to the user side through the server side, good compatibility is achieved, the workload of editing the skin switching assembly style is reduced, and further development cost is reduced.
As shown in fig. 2, in one embodiment, the mailbox theme skin switching method provided by the present invention replaces a first attribute value with a placeholder to obtain variable data of a first cascading style sheet file and a default theme skin, and specifically includes the following steps:
step S122, identifying the attribute of the cascading style sheet and the first attribute value corresponding to the attribute through the cascading style sheet preprocessing plug-in, wherein the first attribute value comprises the name of the placeholder and the second attribute value corresponding to the placeholder.
Specifically, in the process of replacing the first attribute value with the placeholder, the user side identifies the attribute of the cascading style sheet and the attribute value corresponding to the attribute, namely the first attribute value, through the cascading style sheet preprocessing plug-in, and the first attribute value comprises the name of the placeholder to be replaced and the attribute value corresponding to the placeholder, namely the second attribute value.
Step S124, based on the first attribute value, the mapping relation between the placeholder and the variable data is obtained, so as to replace the first attribute value with the placeholder.
Specifically, the user side obtains a mapping relation between the placeholder to be replaced and variable data based on the first attribute value, and prepares for replacing the placeholder.
As shown in fig. 3, in an embodiment, the mailbox theme skin switching method provided by the present invention further includes the following steps:
step S310, judging whether the user terminal has a cached third layered style sheet file of the subject skin.
Specifically, the user side judges whether the user side has the cascading style sheet file corresponding to the cached theme skin or not in the process of switching the theme skin, namely, the third cascading style sheet file.
In step S320, the third stacked style sheet file is executed.
Specifically, if the result of the determination in step S310 is that the user side has the third stacked style sheet file corresponding to the cached topic skin, the user side executes the third stacked style sheet file corresponding to the cached topic skin when switching the topic skin, so as to complete the switching of the topic skin.
Step S330, a first request is sent to the server side to receive the second cascading style sheet file from the server side.
Specifically, if the result of the determination in step S310 is that the user side does not have the third cascading style sheet file corresponding to the cached theme skin, the user side sends a first request to the server side, so that the server side responds to the first request, and further, the user side receives the second cascading style sheet file from the server side.
As shown in fig. 4, in one embodiment, a mailbox theme skin switching method is applied to a server side, and includes the following steps:
step S410, a first attribute value from a user side and a variable data set formed by variable data are received, wherein the first attribute value is a value of a corresponding style of the current default theme skin in the cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder.
Specifically, the server receives a first attribute value from the user side and a variable data set formed by variable data.
The variable data is a first cascading style sheet file and default theme skin obtained after the first attribute value is replaced by the placeholder.
Step S420, replacing the placeholder with the first attribute value and the variable dataset to generate an executable second cascading style sheet file.
Specifically, the server replaces the corresponding placeholder with the first attribute value and the variable data set received in step S410, to generate an executable second cascading style sheet file.
Step S430, the second cascading style sheet file is sent to the user side to replace the first cascading style sheet file corresponding to the default theme skin.
Specifically, the server side sends the executable second cascading style sheet file obtained in step S420 to the user side to replace the first cascading style sheet file corresponding to the default theme skin, so as to realize the switching of the theme skin of the user side.
It should be noted that, the user side is provided with a cascading style sheet preprocessing plug-in, and the cascading style sheet preprocessing plug-in is used for identifying the attribute of the cascading style sheet of the current default theme skin and the attribute value corresponding to the attribute, where the attribute value includes the name of the placeholder to be replaced and the attribute value corresponding to the placeholder. In addition, the placeholder to be replaced and the variable data have a mapping relation, and the mapping relation is used for realizing the replacement of the corresponding placeholder.
As shown in fig. 5, in an embodiment, the mailbox theme skin switching method provided by the present invention further includes the following steps:
in step S510, when the user side does not have the cached third layered style sheet file of the theme skin, a first request from the user side is received.
Specifically, when the user side does not have the pre-cached third layered style sheet file of the theme skin, the server side receives the theme skin switching request, i.e. the first request, from the user side.
Step S520, based on the first request, the second cascading style sheet file is sent to the user terminal.
Specifically, the server side sends the executable second cascading style sheet file to the user side in response to the theme skin switching request received in step S510.
Referring to fig. 6 and fig. 7, in a specific embodiment, the mailbox theme skin switching method provided by the present invention includes the following steps:
(1) A set of CSS (cascading style sheet) attributes and attribute values corresponding to the attributes in the default theme skin related to the system theme skin switch are predetermined, and the attributes correspond to variable names requested by the user side.
(2) In the development process, the CSS attribute in the step (1) is filled into the value of the default topic skin, and after the attribute, the information of the topic skin is annotated by CSS annotation. The method specifically comprises the following steps:
2.1 Characterizing the attribute as an associated style attribute for the theme switch function.
2.2 An interface variable name corresponding to the CSS attribute.
(3) In the construction process, the method specifically comprises the following steps:
3.1 A CSS preprocessing plug-in is arranged and acts on the last link of the CSS file construction.
3.2 Using a CSS preprocessing plug-in, identifying the CSS attribute and its corresponding default value for the subject skin switch determined in step (1) by the annotation in step (2).
3.3 The identified default value is saved for standby, wherein the default value comprises the corresponding placeholder name and the attribute value corresponding to the placeholder.
3.4 The value of the CSS attribute is replaced by a placeholder, wherein the placeholder has a mapping relation with the variable in the step (1).
3.5 Outputting placeholders to replace the processed CSS template file.
(4) When the user uses the default skin, the following procedure is adopted:
4.1 A user sends a request for theme switching, wherein the request comprises the variable mentioned in the step (1) and the corresponding attribute value.
4.2 The server receives the request of the user terminal, replaces the corresponding placeholder in the CSS template with the stored attribute value, generates a final CSS file, and returns the final CSS file to the user terminal.
(5) The user switches the theme skin and the theme skin is processed by the following procedures:
5.1 The user selects a new theme mode, and the Web front end obtains the variable data set and the attribute value corresponding to the variable data set in the step (1).
5.2 Generating new CSS file url (label) through a JavaScript method, creating a style sheet label, and generating url as an href (target label) attribute of the label, wherein the JavaScript method generates query parameters of the style sheet url after receiving a variable data set and serializing the variable and the value thereof.
5.3 After receiving the request of switching the theme skin of the user end, the server obtains the variable data set and the attribute value thereof determined in the step (1) by analyzing the query parameters of url, and replaces the variable data set with the corresponding placeholder in the CSS template file, so that the executable CSS file can be obtained, returned to the user end, and replaced with the CSS file which is currently effective, thereby completing the switching of the theme skin.
The mailbox topic skin switching device provided by the invention is described below, and the mailbox topic skin switching device described below and the mailbox topic skin switching method described above can be correspondingly referred to each other.
As shown in fig. 8, in one embodiment, a mailbox theme skin switching device, applied to a user side, includes a first obtaining module 810, a first replacing module 820, a first sending module 830 and a first receiving module 840.
The first obtaining module 810 is configured to obtain a first attribute value corresponding to a default theme skin in a cascading style sheet attribute, where the first attribute value is a value of a style corresponding to the default theme skin in the cascading style sheet.
The first replacing module 820 is configured to replace the first attribute value with a placeholder to obtain variable data of the first cascading style sheet file and the default theme skin.
The first sending module 830 is configured to send the first attribute value and a variable data set formed by the variable data to a server side, so as to replace a placeholder and generate an executable second cascading style sheet file.
The first receiving module 840 is configured to receive the second cascading style sheet file from the server side to replace the first cascading style sheet file corresponding to the default theme skin.
In this embodiment, the mailbox theme skin switching device provided by the present invention, the first replacing module is specifically configured to:
and identifying the attribute of the cascading style sheet and a first attribute value corresponding to the attribute through the cascading style sheet preprocessing plug-in, wherein the first attribute value comprises the name of the placeholder and a second attribute value corresponding to the placeholder.
Based on the first attribute value, a mapping relationship between the placeholder and the variable data is obtained to replace the first attribute value with the placeholder.
In this embodiment, the mailbox theme skin switching device provided by the present invention further includes a judging module, configured to:
and judging whether the user side has a cached third layered style sheet file of the subject skin. If there is, then
And executing the third layered style sheet file. If not, then
And sending the first request to the server side to receive the second cascading style sheet file from the server side.
As shown in fig. 9, in one embodiment, a mailbox theme skin switching device is applied to a server side and includes a second receiving module 910, a second replacing module 920 and a second sending module 930.
The second receiving module 910 is configured to receive a first attribute value from a user side and a variable data set formed by variable data, where the first attribute value is a value of a corresponding style of a current default theme skin in the cascading style sheet, and the variable data is a first cascading style sheet file and a default theme skin obtained after the first attribute value is replaced by a placeholder.
The second replacement module 920 is configured to replace the placeholder with the first attribute value and the variable dataset to generate an executable second cascading style sheet file.
The second sending module 930 is configured to send the second cascading style sheet file to the user side to replace the first cascading style sheet file corresponding to the default theme skin.
In this embodiment, the mailbox theme skin switching device provided by the invention has a cascading style sheet preprocessing plug-in the user side, and the cascading style sheet preprocessing plug-in is used for identifying the attribute of the cascading style sheet and the first attribute value corresponding to the attribute, wherein the first attribute value comprises the name of the placeholder and the second attribute value corresponding to the placeholder.
The first attribute value is used for acquiring a mapping relation between the placeholder and the variable data, and replacing the first attribute value with the placeholder.
In this embodiment, the mailbox theme skin switching device provided by the present invention further includes a third receiving module, configured to:
and when the third layered style sheet file of the subject skin which does not have the cache in the user side is received, a first request from the user side.
And sending the second cascading style sheet file to the user terminal based on the first request.
Fig. 10 illustrates a physical structure diagram of an electronic device, which may be an intelligent terminal, and an internal structure diagram thereof may be as shown in fig. 10. The electronic device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the electronic device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a mailbox topic skin switching method, the method comprising:
acquiring a first attribute value corresponding to the current default theme skin in the cascading style sheet attribute, wherein the first attribute value is the value of a corresponding style of the default theme skin in the cascading style sheet;
replacing the first attribute value with a placeholder to obtain variable data of the first cascading style sheet file and the default theme skin;
transmitting the first attribute value and a variable data set formed by variable data to a server side to replace placeholders and generate an executable second cascading style sheet file;
receiving a second cascading style sheet file from a server side to replace a first cascading style sheet file corresponding to the default theme skin; or (b)
Receiving a first attribute value from a user side and a variable data set formed by variable data, wherein the first attribute value is a value of a corresponding style of the current default theme skin in the cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder;
replacing the placeholder with the first attribute value and the variable dataset to generate an executable second cascading style sheet file;
and sending the second cascading style sheet file to the user side to replace the first cascading style sheet file corresponding to the default theme skin.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the electronic device to which the present inventive arrangements are applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In another aspect, the present invention also provides a computer storage medium storing a computer program, where the computer program when executed by a processor implements a mailbox theme skin switching method, the method including:
acquiring a first attribute value corresponding to the current default theme skin in the cascading style sheet attribute, wherein the first attribute value is the value of a corresponding style of the default theme skin in the cascading style sheet;
replacing the first attribute value with a placeholder to obtain variable data of the first cascading style sheet file and the default theme skin;
transmitting the first attribute value and a variable data set formed by variable data to a server side to replace placeholders and generate an executable second cascading style sheet file;
receiving a second cascading style sheet file from a server side to replace a first cascading style sheet file corresponding to the default theme skin; or (b)
Receiving a first attribute value from a user side and a variable data set formed by variable data, wherein the first attribute value is a value of a corresponding style of the current default theme skin in the cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder;
replacing the placeholder with the first attribute value and the variable dataset to generate an executable second cascading style sheet file;
and sending the second cascading style sheet file to the user side to replace the first cascading style sheet file corresponding to the default theme skin.
In yet another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. A processor of an electronic device reads the computer instructions from a computer readable storage medium, the processor executing the computer instructions to implement a mailbox topic skin switching method, the method comprising:
acquiring a first attribute value corresponding to the current default theme skin in the cascading style sheet attribute, wherein the first attribute value is the value of a corresponding style of the default theme skin in the cascading style sheet;
replacing the first attribute value with a placeholder to obtain variable data of the first cascading style sheet file and the default theme skin;
transmitting the first attribute value and a variable data set formed by variable data to a server side to replace placeholders and generate an executable second cascading style sheet file;
receiving a second cascading style sheet file from a server side to replace a first cascading style sheet file corresponding to the default theme skin; or (b)
Receiving a first attribute value from a user side and a variable data set formed by variable data, wherein the first attribute value is a value of a corresponding style of the current default theme skin in the cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder;
replacing the placeholder with the first attribute value and the variable dataset to generate an executable second cascading style sheet file;
and sending the second cascading style sheet file to the user side to replace the first cascading style sheet file corresponding to the default theme skin.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory.
By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (10)

1. The mailbox theme skin switching method is characterized by being applied to a user side, and comprises the following steps:
acquiring a first attribute value corresponding to a current default theme skin in a cascading style sheet attribute, wherein the first attribute value is a value of a corresponding style of the default theme skin in the cascading style sheet;
replacing the first attribute value with a placeholder to obtain a first cascading style sheet file and variable data of default theme skin;
transmitting the first attribute value and a variable data set formed by the variable data to a server side to replace the placeholder and generate an executable second cascading style sheet file;
and receiving the second cascading style sheet file from the server side to replace the first cascading style sheet file corresponding to the default theme skin.
2. The mailbox topic skin switching method according to claim 1, wherein said replacing the first attribute value with a placeholder to obtain variable data of a first cascading style sheet file and a default topic skin includes:
identifying the attribute of the cascading style sheet and the first attribute value corresponding to the attribute through a cascading style sheet preprocessing plug-in, wherein the first attribute value comprises the name of the placeholder and a second attribute value corresponding to the placeholder;
and based on the first attribute value, acquiring a mapping relation between the placeholder and the variable data so as to replace the first attribute value with the placeholder.
3. The mailbox topic skin switching method of claim 1 further including:
judging whether the user side has a cached third layered style sheet file of the subject skin or not; if there is, then
Executing the third layered style sheet file; if not, then
And sending a first request to a server side to receive the second cascading style sheet file from the server side.
4. The mailbox theme skin switching method is characterized by being applied to a server side, and comprises the following steps:
receiving a first attribute value from a user side and a variable data set formed by variable data, wherein the first attribute value is a value of a corresponding style of a current default theme skin in a cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder;
replacing the placeholder with the first attribute value and variable dataset to generate an executable second cascading style sheet file;
and sending the second cascading style sheet file to a user side to replace the first cascading style sheet file corresponding to the default theme skin.
5. The mailbox topic skin switching method according to claim 4, wherein said user side has a cascading style sheet preprocessing plug-in, said cascading style sheet preprocessing plug-in is used for identifying an attribute of said cascading style sheet and said first attribute value corresponding to said attribute, said first attribute value includes a name of said placeholder and a second attribute value corresponding to said placeholder;
the first attribute value is used for acquiring a mapping relation between the placeholder and the variable data, and replacing the first attribute value with the placeholder.
6. The mailbox topic skin switching method of claim 4 further comprising:
when the third layered style sheet file of the subject skin which does not have the cache in the user side is received, a first request from the user side is received;
and sending the second cascading style sheet file to the user terminal based on the first request.
7. A mailbox theme skin switching device, characterized in that it is applied to a user terminal, the device comprising:
the first acquisition module is used for acquiring a first attribute value corresponding to the current default theme skin in the cascading style sheet attribute, wherein the first attribute value is the value of a corresponding style of the default theme skin in the cascading style sheet;
the first replacing module is used for replacing the first attribute value with a placeholder to obtain a first cascading style sheet file and variable data of default theme skin;
the first sending module is used for sending the first attribute value and a variable data set formed by the variable data to a server side so as to replace the placeholder and generate an executable second cascading style sheet file;
the first receiving module is configured to receive the second cascading style sheet file from the server side, so as to replace the first cascading style sheet file corresponding to the default theme skin.
8. A mailbox theme skin switching device, characterized in that it is applied to a server side, said device comprising:
the second receiving module is used for receiving a first attribute value from a user side and a variable data set formed by variable data, wherein the first attribute value is a value of a corresponding style of the current default theme skin in the cascading style sheet, and the variable data is a first cascading style sheet file and the default theme skin obtained after the first attribute value is replaced by a placeholder;
a second replacement module for replacing the placeholder with the first attribute value and variable dataset to generate an executable second cascading style sheet file;
and the second sending module is used for sending the second cascading style sheet file to a user side so as to replace the first cascading style sheet file corresponding to the default theme skin.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 3 or 4 to 6 when the computer program is executed.
10. A computer storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1 to 3 or 4 to 6.
CN202311473633.XA 2023-11-08 2023-11-08 Mailbox theme skin switching method and device, electronic equipment and storage medium Pending CN117194839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311473633.XA CN117194839A (en) 2023-11-08 2023-11-08 Mailbox theme skin switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311473633.XA CN117194839A (en) 2023-11-08 2023-11-08 Mailbox theme skin switching method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117194839A true CN117194839A (en) 2023-12-08

Family

ID=88990975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311473633.XA Pending CN117194839A (en) 2023-11-08 2023-11-08 Mailbox theme skin switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117194839A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503212A (en) * 2016-10-27 2017-03-15 中企动力科技股份有限公司 A kind of method to set up of web page element pattern and device
CN110618850A (en) * 2019-08-30 2019-12-27 北京浪潮数据技术有限公司 UI (user interface) loading method and system and related device
CN111666123A (en) * 2020-05-28 2020-09-15 平安医疗健康管理股份有限公司 Page theme control method and system and computer equipment
CN116257714A (en) * 2022-12-20 2023-06-13 网易(杭州)网络有限公司 Method, device, computer equipment and storage medium for generating cascading style sheet

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503212A (en) * 2016-10-27 2017-03-15 中企动力科技股份有限公司 A kind of method to set up of web page element pattern and device
CN110618850A (en) * 2019-08-30 2019-12-27 北京浪潮数据技术有限公司 UI (user interface) loading method and system and related device
CN111666123A (en) * 2020-05-28 2020-09-15 平安医疗健康管理股份有限公司 Page theme control method and system and computer equipment
CN116257714A (en) * 2022-12-20 2023-06-13 网易(杭州)网络有限公司 Method, device, computer equipment and storage medium for generating cascading style sheet

Similar Documents

Publication Publication Date Title
CN107784516B (en) Advertisement putting method and device
CN107454147A (en) Information processing method and device
CN111381913B (en) Front-end multilingual loading adaptation method, device, computer equipment and storage medium
WO2014140548A2 (en) Collaborative editing
CN112100152A (en) Service data processing method, system, server and readable storage medium
CN111767297B (en) Big data processing method, device, equipment and medium
CN111431767B (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN107066175B (en) Method and device for generating display interface of securities
CN112115328B (en) Page flow map construction method and device and computer readable storage medium
CN113656119A (en) Method and system for backtracking user operation through dom node
CN108108381B (en) Page monitoring method and device
CN117194839A (en) Mailbox theme skin switching method and device, electronic equipment and storage medium
CN113268232A (en) Page skin generation method and device and computer readable storage medium
CN109543127B (en) Page refreshing method, device and equipment and readable storage medium
CN108874856B (en) Page generation system, method and server
KR20080060690A (en) System and method for changing web document style
CN115186207A (en) Method and device for loading page resources and electronic equipment
CN108763393A (en) Book management method, device, computer equipment and storage medium
CN113448649A (en) Redis-based home page data loading server and method
CN112328922A (en) Processing method and device
CN113961790B (en) Access method and device suitable for batch texts and storage medium
CN114548061B (en) Intelligent data filling method, device and system, mobile terminal and storage medium
CN112559930B (en) Webpage integration method, webpage integration device, computer equipment and storage medium
CN111191079B (en) Document content acquisition method, device, equipment and storage medium
CN117234512B (en) Method, system, electronic equipment and storage medium for rapidly developing business

Legal Events

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