recently I am doing a mall type DEMO, like JD.com Taobao and so on. For example, in the commodity details page, in addition to some relatively fixed fields in the head, such as product name, price, profile, and so on, there are also commodity details. The general format of commodity details is probably uniform, but some details will be different.
for example, the picture and text details of clothing commodity An include
version, standard type, men"s
season, spring size XXL, XL, L, M
.
picture and text paragraph
snack commodity B picture and text details are
name Ejiao cake ingredients original taste: Ejiao (28.3%), black sesame, walnut kernel
Origin, Liaocheng City, Shandong Province (Dong"a County) net content 500g shelf life 12 months
.
paragraph
in this case, for example, in the field of details, it should be divided into N fields to indicate the type, size, original taste, origin, and so on. Make a judgment on the page and assume that there is a place of origin. I will show the origin XXX if it is empty, the origin item will not be shown
or should it be saved to the database for a detail field when developing in the background, and then the front page of the string with the tag
and then append the string with the html tag to the specified DIV layer through JS? Thank you all in advance