Commit c858077305e02bfafbf33c2ef99ab3548173dad6
1 parent
13cb0265
fix: 调整热销商品位置,prod2-39/40
Showing
5 changed files
with
255 additions
and
156 deletions
components/MobileProductDetail.vue
@@ -409,7 +409,7 @@ | @@ -409,7 +409,7 @@ | ||
409 | slider-color="blue-lighten-1" | 409 | slider-color="blue-lighten-1" |
410 | selected-class="active" | 410 | selected-class="active" |
411 | > | 411 | > |
412 | - <v-tab :value="1">JOURNAL RECOMMENDATION</v-tab> | 412 | + <v-tab :value="1">Product-related Journals</v-tab> |
413 | </v-tabs> | 413 | </v-tabs> |
414 | <v-window v-model="tabJournal"> | 414 | <v-window v-model="tabJournal"> |
415 | <v-window-item key="1" :value="1"> | 415 | <v-window-item key="1" :value="1"> |
components/ProductDetail.vue
@@ -361,7 +361,7 @@ | @@ -361,7 +361,7 @@ | ||
361 | selected-class="active" | 361 | selected-class="active" |
362 | grow | 362 | grow |
363 | > | 363 | > |
364 | - <v-tab value="one">Journal Recommendation</v-tab> | 364 | + <v-tab value="one">Product-related Journals</v-tab> |
365 | </v-tabs> | 365 | </v-tabs> |
366 | <v-list> | 366 | <v-list> |
367 | <v-list-item | 367 | <v-list-item |
@@ -795,9 +795,31 @@ const slide = ref(0); | @@ -795,9 +795,31 @@ const slide = ref(0); | ||
795 | border-top: 3px solid #1f88e5 !important; | 795 | border-top: 3px solid #1f88e5 !important; |
796 | } | 796 | } |
797 | 797 | ||
798 | -.tabs { | ||
799 | - border-bottom: 2px solid #1f88e5; | 798 | +@media screen and (min-width: 1537px) { |
799 | + .tabs { | ||
800 | + border-bottom: 2px solid #1f88e5; | ||
801 | + margin: 10px auto 20px; | ||
802 | + width: 100%; | ||
803 | + } | ||
804 | +} | ||
805 | +@media screen and (max-width: 1536px) and (min-width: 1281px) { | ||
806 | + .tabs { | ||
807 | + border-bottom: 2px solid #1f88e5; | ||
808 | + margin: 10px auto 40px; | ||
809 | + width: 100%; | ||
810 | + } | ||
800 | } | 811 | } |
812 | +@media screen and (max-width: 1280px) { | ||
813 | + .tabs { | ||
814 | + border-bottom: 2px solid #1f88e5; | ||
815 | + margin: 10px auto 40px; | ||
816 | + width: 100%; | ||
817 | + } | ||
818 | +} | ||
819 | + | ||
820 | +// .tabs { | ||
821 | +// border-bottom: 2px solid #1f88e5; | ||
822 | +// } | ||
801 | 823 | ||
802 | .active { | 824 | .active { |
803 | background-color: #1086e8; | 825 | background-color: #1086e8; |
@@ -865,8 +887,8 @@ th { | @@ -865,8 +887,8 @@ th { | ||
865 | align-items: center; | 887 | align-items: center; |
866 | justify-content: center; | 888 | justify-content: center; |
867 | height: 320px; | 889 | height: 320px; |
868 | - margin: 10px auto 130px; | ||
869 | - width: 80%; | 890 | + margin: 10px auto 80px; |
891 | + width: 100%; | ||
870 | } | 892 | } |
871 | } | 893 | } |
872 | @media screen and (max-width: 1536px) and (min-width: 1281px) { | 894 | @media screen and (max-width: 1536px) and (min-width: 1281px) { |
@@ -875,7 +897,7 @@ th { | @@ -875,7 +897,7 @@ th { | ||
875 | align-items: center; | 897 | align-items: center; |
876 | justify-content: center; | 898 | justify-content: center; |
877 | height: 320px; | 899 | height: 320px; |
878 | - margin: 10px auto 60px; | 900 | + margin: 10px auto 0px; |
879 | width: 80%; | 901 | width: 80%; |
880 | padding: 0; | 902 | padding: 0; |
881 | } | 903 | } |
@@ -886,7 +908,7 @@ th { | @@ -886,7 +908,7 @@ th { | ||
886 | align-items: center; | 908 | align-items: center; |
887 | justify-content: center; | 909 | justify-content: center; |
888 | height: 320px; | 910 | height: 320px; |
889 | - margin: 10px auto 60px; | 911 | + margin: 10px auto 0px; |
890 | width: 80%; | 912 | width: 80%; |
891 | padding: 0; | 913 | padding: 0; |
892 | } | 914 | } |
@@ -900,7 +922,7 @@ th { | @@ -900,7 +922,7 @@ th { | ||
900 | display: inline-block; | 922 | display: inline-block; |
901 | margin: 0 5px; | 923 | margin: 0 5px; |
902 | text-align: center; | 924 | text-align: center; |
903 | - width: 315px; | 925 | + width: 300px; |
904 | } | 926 | } |
905 | } | 927 | } |
906 | @media screen and (max-width: 1536px) and (min-width: 1281px) { | 928 | @media screen and (max-width: 1536px) and (min-width: 1281px) { |
@@ -921,8 +943,8 @@ th { | @@ -921,8 +943,8 @@ th { | ||
921 | } | 943 | } |
922 | @media screen and (min-width: 1537px) { | 944 | @media screen and (min-width: 1537px) { |
923 | .image-row img { | 945 | .image-row img { |
924 | - width: 240px; | ||
925 | - height: 240px; | 946 | + width: 200px; |
947 | + height: 200px; | ||
926 | } | 948 | } |
927 | } | 949 | } |
928 | @media screen and (max-width: 1536px) and (min-width: 1281px) { | 950 | @media screen and (max-width: 1536px) and (min-width: 1281px) { |
@@ -939,34 +961,46 @@ th { | @@ -939,34 +961,46 @@ th { | ||
939 | } | 961 | } |
940 | @media screen and (min-width: 1537px) { | 962 | @media screen and (min-width: 1537px) { |
941 | .image-name { | 963 | .image-name { |
942 | - display: block; | 964 | + display: -webkit-box; /* Enables multi-line text handling */ |
965 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
966 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
967 | + overflow: hidden; /* Hides the overflowed text */ | ||
968 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
943 | margin-top: 5px; | 969 | margin-top: 5px; |
944 | font-size: 16px; | 970 | font-size: 16px; |
945 | width: 180px; | 971 | width: 180px; |
946 | color: #555; | 972 | color: #555; |
947 | - text-align: left; | ||
948 | - margin-left: 60px; | 973 | + text-align: center; /* Centers the text horizontally */ |
974 | + margin-left: 50px; | ||
949 | } | 975 | } |
950 | } | 976 | } |
951 | @media screen and (max-width: 1536px) and (min-width: 1281px) { | 977 | @media screen and (max-width: 1536px) and (min-width: 1281px) { |
952 | .image-name { | 978 | .image-name { |
953 | - display: block; | 979 | + display: -webkit-box; /* Enables multi-line text handling */ |
980 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
981 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
982 | + overflow: hidden; /* Hides the overflowed text */ | ||
983 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
954 | margin-top: 5px; | 984 | margin-top: 5px; |
955 | font-size: 16px; | 985 | font-size: 16px; |
956 | width: 180px; | 986 | width: 180px; |
957 | color: #555; | 987 | color: #555; |
958 | - text-align: left; | 988 | + text-align: center; /* Centers the text horizontally */ |
959 | margin-left: 10px; | 989 | margin-left: 10px; |
960 | } | 990 | } |
961 | } | 991 | } |
962 | @media screen and (max-width: 1280px) { | 992 | @media screen and (max-width: 1280px) { |
963 | .image-name { | 993 | .image-name { |
964 | - display: block; | 994 | + display: -webkit-box; /* Enables multi-line text handling */ |
995 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
996 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
997 | + overflow: hidden; /* Hides the overflowed text */ | ||
998 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
965 | margin-top: 5px; | 999 | margin-top: 5px; |
966 | font-size: 16px; | 1000 | font-size: 16px; |
967 | width: 180px; | 1001 | width: 180px; |
968 | color: #555; | 1002 | color: #555; |
969 | - text-align: left; | 1003 | + text-align: center; /* Centers the text horizontally */ |
970 | margin-left: 20px; | 1004 | margin-left: 20px; |
971 | } | 1005 | } |
972 | } | 1006 | } |
@@ -983,6 +1017,7 @@ button .recommendButton { | @@ -983,6 +1017,7 @@ button .recommendButton { | ||
983 | width: 26px; | 1017 | width: 26px; |
984 | height: 27px; | 1018 | height: 27px; |
985 | margin-right: 30px; | 1019 | margin-right: 30px; |
1020 | + margin-bottom: 50px; | ||
986 | } | 1021 | } |
987 | 1022 | ||
988 | .recommend-img-left:hover { | 1023 | .recommend-img-left:hover { |
@@ -995,6 +1030,7 @@ button .recommendButton { | @@ -995,6 +1030,7 @@ button .recommendButton { | ||
995 | width: 26px; | 1030 | width: 26px; |
996 | height: 27px; | 1031 | height: 27px; |
997 | margin-left: 30px; | 1032 | margin-left: 30px; |
1033 | + margin-bottom: 50px; | ||
998 | } | 1034 | } |
999 | 1035 | ||
1000 | .recommend-img-right:hover { | 1036 | .recommend-img-right:hover { |
deploy/prod2.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # 变量定义 | 2 | # 变量定义 |
3 | -LAST_TAG="1.0.38" | ||
4 | -TAG="1.0.39" | 3 | +LAST_TAG="1.0.39" |
4 | +TAG="1.0.40" | ||
5 | TARGET_PATH="/root/web/canrud-outside-nuxt-front" | 5 | TARGET_PATH="/root/web/canrud-outside-nuxt-front" |
6 | DOCKERFILE_PATH="/root/web/canrud-outside-nuxt-front/canrud-nuxt-front" | 6 | DOCKERFILE_PATH="/root/web/canrud-outside-nuxt-front/canrud-nuxt-front" |
7 | IMAGE_NAME="canrud-outside-front" | 7 | IMAGE_NAME="canrud-outside-front" |
pages/index.vue
@@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
36 | v-model="tabRecom" | 36 | v-model="tabRecom" |
37 | color="white" | 37 | color="white" |
38 | bg-color="#eeeeee" | 38 | bg-color="#eeeeee" |
39 | + style="margin-top: 40px" | ||
39 | slider-color="blue-lighten-1" | 40 | slider-color="blue-lighten-1" |
40 | selected-class="active" | 41 | selected-class="active" |
41 | v-if="recommendImages[0] !== null && !isMobile()" | 42 | v-if="recommendImages[0] !== null && !isMobile()" |
@@ -87,7 +88,7 @@ | @@ -87,7 +88,7 @@ | ||
87 | /> | 88 | /> |
88 | </div> | 89 | </div> |
89 | </div> | 90 | </div> |
90 | - <div style="padding-left: 16px; padding-right: 16px; padding-bottom: 30px"> | 91 | + <div style="padding-left: 16px; padding-right: 16px"> |
91 | <v-tabs | 92 | <v-tabs |
92 | class="tabs2" | 93 | class="tabs2" |
93 | ref="tabs2" | 94 | ref="tabs2" |
@@ -518,7 +519,7 @@ const hotLength = computed(() => | @@ -518,7 +519,7 @@ const hotLength = computed(() => | ||
518 | .tabs { | 519 | .tabs { |
519 | border-bottom: 2px solid #1f88e5; | 520 | border-bottom: 2px solid #1f88e5; |
520 | margin: 10px auto 0px; | 521 | margin: 10px auto 0px; |
521 | - width: 80%; | 522 | + width: 85%; |
522 | } | 523 | } |
523 | } | 524 | } |
524 | 525 | ||
@@ -541,7 +542,7 @@ const hotLength = computed(() => | @@ -541,7 +542,7 @@ const hotLength = computed(() => | ||
541 | align-items: center; | 542 | align-items: center; |
542 | justify-content: center; | 543 | justify-content: center; |
543 | height: 320px; | 544 | height: 320px; |
544 | - margin: 10px auto 100px; | 545 | + margin: 10px auto 50px; |
545 | width: 80%; | 546 | width: 80%; |
546 | } | 547 | } |
547 | } | 548 | } |
@@ -550,7 +551,7 @@ const hotLength = computed(() => | @@ -550,7 +551,7 @@ const hotLength = computed(() => | ||
550 | display: flex; | 551 | display: flex; |
551 | align-items: center; | 552 | align-items: center; |
552 | justify-content: center; | 553 | justify-content: center; |
553 | - height: 320px; | 554 | + height: 240px; |
554 | margin: 10px auto 0px; | 555 | margin: 10px auto 0px; |
555 | width: 80%; | 556 | width: 80%; |
556 | } | 557 | } |
@@ -561,7 +562,7 @@ const hotLength = computed(() => | @@ -561,7 +562,7 @@ const hotLength = computed(() => | ||
561 | align-items: center; | 562 | align-items: center; |
562 | justify-content: center; | 563 | justify-content: center; |
563 | height: 260px; | 564 | height: 260px; |
564 | - margin: 10px auto 30px; | 565 | + margin: 10px auto 0px; |
565 | width: 90%; | 566 | width: 90%; |
566 | } | 567 | } |
567 | } | 568 | } |
@@ -624,34 +625,46 @@ const hotLength = computed(() => | @@ -624,34 +625,46 @@ const hotLength = computed(() => | ||
624 | } | 625 | } |
625 | @media screen and (min-width: 1537px) { | 626 | @media screen and (min-width: 1537px) { |
626 | .image-name { | 627 | .image-name { |
627 | - display: block; | 628 | + display: -webkit-box; /* Enables multi-line text handling */ |
629 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
630 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
631 | + overflow: hidden; /* Hides the overflowed text */ | ||
632 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
628 | margin-top: 5px; | 633 | margin-top: 5px; |
629 | font-size: 16px; | 634 | font-size: 16px; |
630 | width: 180px; | 635 | width: 180px; |
631 | color: #555; | 636 | color: #555; |
632 | - text-align: left; | 637 | + text-align: center; /* Centers the text horizontally */ |
633 | margin-left: 50px; | 638 | margin-left: 50px; |
634 | } | 639 | } |
635 | } | 640 | } |
636 | @media screen and (max-width: 1536px) and (min-width: 1281px) { | 641 | @media screen and (max-width: 1536px) and (min-width: 1281px) { |
637 | .image-name { | 642 | .image-name { |
638 | - display: block; | 643 | + display: -webkit-box; /* Enables multi-line text handling */ |
644 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
645 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
646 | + overflow: hidden; /* Hides the overflowed text */ | ||
647 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
639 | margin-top: 5px; | 648 | margin-top: 5px; |
640 | font-size: 16px; | 649 | font-size: 16px; |
641 | width: 180px; | 650 | width: 180px; |
642 | color: #555; | 651 | color: #555; |
643 | - text-align: left; | 652 | + text-align: center; /* Centers the text horizontally */ |
644 | margin-left: 10px; | 653 | margin-left: 10px; |
645 | } | 654 | } |
646 | } | 655 | } |
647 | @media screen and (max-width: 1280px) { | 656 | @media screen and (max-width: 1280px) { |
648 | .image-name { | 657 | .image-name { |
649 | - display: block; | 658 | + display: -webkit-box; /* Enables multi-line text handling */ |
659 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
660 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
661 | + overflow: hidden; /* Hides the overflowed text */ | ||
662 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
650 | margin-top: 5px; | 663 | margin-top: 5px; |
651 | font-size: 16px; | 664 | font-size: 16px; |
652 | width: 180px; | 665 | width: 180px; |
653 | color: #555; | 666 | color: #555; |
654 | - text-align: left; | 667 | + text-align: center; /* Centers the text horizontally */ |
655 | margin-left: 5px; | 668 | margin-left: 5px; |
656 | } | 669 | } |
657 | } | 670 | } |
pages/products/index.vue
@@ -2,67 +2,131 @@ | @@ -2,67 +2,131 @@ | ||
2 | <div class="tw-m-auto tw-pb-[64px]" style="padding-bottom: 0px"> | 2 | <div class="tw-m-auto tw-pb-[64px]" style="padding-bottom: 0px"> |
3 | <CategoryList v-if="categoryStore.categoryVisible && !isMobile()" /> | 3 | <CategoryList v-if="categoryStore.categoryVisible && !isMobile()" /> |
4 | <MobileCategoryList v-if="categoryStore.categoryVisible && isMobile()" /> | 4 | <MobileCategoryList v-if="categoryStore.categoryVisible && isMobile()" /> |
5 | - <v-container class=""> | ||
6 | - <v-tabs | ||
7 | - class="tabs" | ||
8 | - v-model="tabRecom" | ||
9 | - style="margin-top: 25px" | ||
10 | - color="white" | ||
11 | - bg-color="#eeeeee" | ||
12 | - slider-color="blue-lighten-1" | ||
13 | - selected-class="active" | ||
14 | - v-if="recommendImages[0] !== null && !isMobile()" | ||
15 | - > | ||
16 | - <v-tab :value="1">Best Sellers</v-tab> | ||
17 | - <!-- <v-tab :value="3">商品百科</v-tab> --> | ||
18 | - </v-tabs> | ||
19 | - <div | ||
20 | - id="image-container" | ||
21 | - v-if="recommendImages[0] !== null && !isMobile()" | ||
22 | - > | ||
23 | - <div class="recommend-left-box"> | ||
24 | - <v-img | ||
25 | - src="https://m-canrd.oss-cn-shenzhen.aliyuncs.com/crmebimage/public/maintain/2024/09/14/76c987e13a334be481a346c19c2284f3qy4tjnxps7.png" | ||
26 | - alt="往左移" | ||
27 | - class="recommend-img-left" | ||
28 | - @click="toggleRowLeft" | ||
29 | - /> | ||
30 | - </div> | ||
31 | - <div class="image-row" id="row1"> | ||
32 | - <!-- <img | 5 | + <v-tabs |
6 | + class="tabs" | ||
7 | + v-model="tabRecom" | ||
8 | + style="margin-top: 25px" | ||
9 | + color="white" | ||
10 | + bg-color="#eeeeee" | ||
11 | + slider-color="blue-lighten-1" | ||
12 | + selected-class="active" | ||
13 | + v-if="recommendImages[0] !== null && !isMobile()" | ||
14 | + > | ||
15 | + <v-tab :value="1">Best Sellers</v-tab> | ||
16 | + <!-- <v-tab :value="3">商品百科</v-tab> --> | ||
17 | + </v-tabs> | ||
18 | + <div id="image-container" v-if="recommendImages[0] !== null && !isMobile()"> | ||
19 | + <div class="recommend-left-box"> | ||
20 | + <v-img | ||
21 | + src="https://m-canrd.oss-cn-shenzhen.aliyuncs.com/crmebimage/public/maintain/2024/09/14/76c987e13a334be481a346c19c2284f3qy4tjnxps7.png" | ||
22 | + alt="往左移" | ||
23 | + class="recommend-img-left" | ||
24 | + @click="toggleRowLeft" | ||
25 | + /> | ||
26 | + </div> | ||
27 | + <div class="image-row" id="row1"> | ||
28 | + <!-- <img | ||
33 | v-for="(imageObj, index) in recommendImages.slice(0, 5)" | 29 | v-for="(imageObj, index) in recommendImages.slice(0, 5)" |
34 | :key="'row1-' + index" | 30 | :key="'row1-' + index" |
35 | :src="imageObj[0]?.url" | 31 | :src="imageObj[0]?.url" |
36 | :alt="'Image ' + (index + 1)" | 32 | :alt="'Image ' + (index + 1)" |
37 | style="margin: 0 5px; width: 200px; height: 200px" | 33 | style="margin: 0 5px; width: 200px; height: 200px" |
38 | /> --> | 34 | /> --> |
39 | - <div | ||
40 | - v-for="(imageObj, index) in recommendImages" | ||
41 | - :key="'row1-' + index" | ||
42 | - class="imageTotal" | ||
43 | - > | ||
44 | - <a v-if="imageObj" :href="imageObj[0]?.productUrl" target="_blank"> | ||
45 | - <img | ||
46 | - :src="imageObj[0]?.url" | ||
47 | - :alt="'Image ' + (index + 1)" | ||
48 | - class="item-imgHot" | ||
49 | - /> | ||
50 | - <span class="image-name"> | ||
51 | - {{ imageObj[0]?.name }} | ||
52 | - </span> | ||
53 | - </a> | ||
54 | - <div v-else style="width: 200px; height: 200px"></div> | ||
55 | - </div> | ||
56 | - </div> | ||
57 | - <div class="recommend-right-box"> | ||
58 | - <v-img | ||
59 | - src="https://m-canrd.oss-cn-shenzhen.aliyuncs.com/crmebimage/public/maintain/2024/09/14/b5daa0a8f2f140f5b406e984c730a453iznzlekysg.png" | ||
60 | - alt="往右移" | ||
61 | - class="recommend-img-right" | ||
62 | - @click="toggleRowRight" | ||
63 | - /> | 35 | + <div |
36 | + v-for="(imageObj, index) in recommendImages" | ||
37 | + :key="'row1-' + index" | ||
38 | + class="imageTotal" | ||
39 | + > | ||
40 | + <a v-if="imageObj" :href="imageObj[0]?.productUrl" target="_blank"> | ||
41 | + <img | ||
42 | + :src="imageObj[0]?.url" | ||
43 | + :alt="'Image ' + (index + 1)" | ||
44 | + class="item-imgHot" | ||
45 | + /> | ||
46 | + <span class="image-name"> | ||
47 | + {{ imageObj[0]?.name }} | ||
48 | + </span> | ||
49 | + </a> | ||
50 | + <div v-else style="width: 200px; height: 200px"></div> | ||
64 | </div> | 51 | </div> |
65 | </div> | 52 | </div> |
53 | + <div class="recommend-right-box"> | ||
54 | + <v-img | ||
55 | + src="https://m-canrd.oss-cn-shenzhen.aliyuncs.com/crmebimage/public/maintain/2024/09/14/b5daa0a8f2f140f5b406e984c730a453iznzlekysg.png" | ||
56 | + alt="往右移" | ||
57 | + class="recommend-img-right" | ||
58 | + @click="toggleRowRight" | ||
59 | + /> | ||
60 | + </div> | ||
61 | + </div> | ||
62 | + <v-container class=""> | ||
63 | + <div class="tw-text-center tw-mt-[32px]" v-if="loading"> | ||
64 | + <v-progress-circular | ||
65 | + color="blue-lighten-2" | ||
66 | + indeterminate | ||
67 | + size="64" | ||
68 | + class="tw-m-auto" | ||
69 | + ></v-progress-circular> | ||
70 | + </div> | ||
71 | + <v-item-group multiple> | ||
72 | + <v-row v-if="!loading"> | ||
73 | + <v-col | ||
74 | + v-for="(item, i) in productStore.list" | ||
75 | + :key="i" | ||
76 | + cols="6" | ||
77 | + lg="3" | ||
78 | + md="4" | ||
79 | + sm="6" | ||
80 | + > | ||
81 | + <v-hover v-slot="{ isHovering, props }" open-delay="200"> | ||
82 | + <v-card | ||
83 | + :elevation="isHovering ? 16 : 2" | ||
84 | + :class="{ 'on-hover': isHovering }" | ||
85 | + class="mx-auto" | ||
86 | + v-bind="props" | ||
87 | + :to="`/products/detail/${item.id}`" | ||
88 | + > | ||
89 | + <v-img :src="item.imgList[0].url" :alt="item.name"> | ||
90 | + <!-- <v-expand-transition> | ||
91 | + <div | ||
92 | + v-if="isHovering" | ||
93 | + class="d-flex transition-fast-in-fast-out bg-orange-darken-2 v-card--reveal tw-p-[12px] tw-text-justify" | ||
94 | + style="height: 100%" | ||
95 | + > | ||
96 | + 产品描述描述描述描述描述描述描述描述 | ||
97 | + </div> | ||
98 | + </v-expand-transition> --> | ||
99 | + </v-img> | ||
100 | + <v-card-text class="tw-text-left font-weight-medium title"> | ||
101 | + <h3 style="color: red" v-if="item.price"> | ||
102 | + ${{ item.price }} | ||
103 | + </h3> | ||
104 | + <h4>{{ item.name }}</h4> | ||
105 | + </v-card-text> | ||
106 | + </v-card> | ||
107 | + </v-hover> | ||
108 | + </v-col> | ||
109 | + </v-row> | ||
110 | + <div | ||
111 | + v-if="!productStore.total && !loading" | ||
112 | + class="text-medium-emphasis text-body-1 tw-text-center tw-m-[64px]" | ||
113 | + > | ||
114 | + no data | ||
115 | + </div> | ||
116 | + </v-item-group> | ||
117 | + <v-row> | ||
118 | + <v-col> | ||
119 | + <v-pagination | ||
120 | + :size="isMobile() ? 'small' : 'default'" | ||
121 | + v-if="productStore.total" | ||
122 | + v-model="productStore.pageNo" | ||
123 | + @update:modelValue="productStore.updatePageNo" | ||
124 | + :length="length" | ||
125 | + rounded="0" | ||
126 | + class="tw-float-right tw-mt-[32px]" | ||
127 | + total-visible="5" | ||
128 | + ></v-pagination></v-col | ||
129 | + ></v-row> | ||
66 | <v-tabs | 130 | <v-tabs |
67 | class="tabs2" | 131 | class="tabs2" |
68 | ref="tabs2" | 132 | ref="tabs2" |
@@ -131,61 +195,6 @@ | @@ -131,61 +195,6 @@ | ||
131 | total-visible="5" | 195 | total-visible="5" |
132 | ></v-pagination></v-col | 196 | ></v-pagination></v-col |
133 | ></v-row> | 197 | ></v-row> |
134 | - <div style="width: 50px"></div> | ||
135 | - <div class="tw-text-center tw-mt-[32px]" v-if="loading"> | ||
136 | - <v-progress-circular | ||
137 | - color="blue-lighten-2" | ||
138 | - indeterminate | ||
139 | - size="64" | ||
140 | - class="tw-m-auto" | ||
141 | - ></v-progress-circular> | ||
142 | - </div> | ||
143 | - <v-item-group multiple> | ||
144 | - <v-row v-if="!loading"> | ||
145 | - <v-col | ||
146 | - v-for="(item, i) in productStore.list" | ||
147 | - :key="i" | ||
148 | - cols="6" | ||
149 | - lg="3" | ||
150 | - md="4" | ||
151 | - sm="6" | ||
152 | - > | ||
153 | - <v-hover v-slot="{ isHovering, props }" open-delay="200"> | ||
154 | - <v-card | ||
155 | - :elevation="isHovering ? 16 : 2" | ||
156 | - :class="{ 'on-hover': isHovering }" | ||
157 | - class="mx-auto" | ||
158 | - v-bind="props" | ||
159 | - :to="`/products/detail/${item.id}`" | ||
160 | - > | ||
161 | - <v-img :src="item.imgList[0].url" :alt="item.name"> | ||
162 | - <!-- <v-expand-transition> | ||
163 | - <div | ||
164 | - v-if="isHovering" | ||
165 | - class="d-flex transition-fast-in-fast-out bg-orange-darken-2 v-card--reveal tw-p-[12px] tw-text-justify" | ||
166 | - style="height: 100%" | ||
167 | - > | ||
168 | - 产品描述描述描述描述描述描述描述描述 | ||
169 | - </div> | ||
170 | - </v-expand-transition> --> | ||
171 | - </v-img> | ||
172 | - <v-card-text class="tw-text-left font-weight-medium title"> | ||
173 | - <h3 style="color: red" v-if="item.price"> | ||
174 | - ${{ item.price }} | ||
175 | - </h3> | ||
176 | - <h4>{{ item.name }}</h4> | ||
177 | - </v-card-text> | ||
178 | - </v-card> | ||
179 | - </v-hover> | ||
180 | - </v-col> | ||
181 | - </v-row> | ||
182 | - <div | ||
183 | - v-if="!productStore.total && !loading" | ||
184 | - class="text-medium-emphasis text-body-1 tw-text-center tw-m-[64px]" | ||
185 | - > | ||
186 | - no data | ||
187 | - </div> | ||
188 | - </v-item-group> | ||
189 | </v-container> | 198 | </v-container> |
190 | </div> | 199 | </div> |
191 | </template> | 200 | </template> |
@@ -221,7 +230,6 @@ const loadHotProducts = async () => { | @@ -221,7 +230,6 @@ const loadHotProducts = async () => { | ||
221 | pageSize.value = 4; | 230 | pageSize.value = 4; |
222 | } | 231 | } |
223 | hotLoading.value = true; | 232 | hotLoading.value = true; |
224 | - | ||
225 | let { data: hotProducts } = await useAsyncData( | 233 | let { data: hotProducts } = await useAsyncData( |
226 | "hotProducts", | 234 | "hotProducts", |
227 | () => | 235 | () => |
@@ -492,9 +500,30 @@ const hotLength = computed(() => | @@ -492,9 +500,30 @@ const hotLength = computed(() => | ||
492 | -webkit-box-orient: vertical; | 500 | -webkit-box-orient: vertical; |
493 | } | 501 | } |
494 | 502 | ||
495 | -.tabs { | ||
496 | - border-bottom: 2px solid #1f88e5; | 503 | +@media screen and (min-width: 1537px) { |
504 | + .tabs { | ||
505 | + border-bottom: 2px solid #1f88e5; | ||
506 | + margin: 10px auto 20px; | ||
507 | + width: 96%; | ||
508 | + } | ||
509 | +} | ||
510 | +@media screen and (max-width: 1536px) and (min-width: 1281px) { | ||
511 | + .tabs { | ||
512 | + border-bottom: 2px solid #1f88e5; | ||
513 | + margin: 10px auto 40px; | ||
514 | + width: 85%; | ||
515 | + } | ||
516 | +} | ||
517 | +@media screen and (max-width: 1280px) { | ||
518 | + .tabs { | ||
519 | + border-bottom: 2px solid #1f88e5; | ||
520 | + margin: 10px auto 40px; | ||
521 | + width: 90%; | ||
522 | + } | ||
497 | } | 523 | } |
524 | +/* .tabs { | ||
525 | + border-bottom: 2px solid #1f88e5; | ||
526 | +} */ | ||
498 | 527 | ||
499 | .active { | 528 | .active { |
500 | background-color: #1086e8; | 529 | background-color: #1086e8; |
@@ -506,7 +535,7 @@ const hotLength = computed(() => | @@ -506,7 +535,7 @@ const hotLength = computed(() => | ||
506 | align-items: center; | 535 | align-items: center; |
507 | justify-content: center; | 536 | justify-content: center; |
508 | height: 320px; | 537 | height: 320px; |
509 | - margin: 10px auto 130px; | 538 | + margin: 10px auto 50px; |
510 | width: 80%; | 539 | width: 80%; |
511 | } | 540 | } |
512 | } | 541 | } |
@@ -515,8 +544,8 @@ const hotLength = computed(() => | @@ -515,8 +544,8 @@ const hotLength = computed(() => | ||
515 | display: flex; | 544 | display: flex; |
516 | align-items: center; | 545 | align-items: center; |
517 | justify-content: center; | 546 | justify-content: center; |
518 | - height: 320px; | ||
519 | - margin: 10px auto 80px; | 547 | + height: 260px; |
548 | + margin: 10px auto 0px; | ||
520 | width: 80%; | 549 | width: 80%; |
521 | padding: 0; | 550 | padding: 0; |
522 | } | 551 | } |
@@ -526,8 +555,8 @@ const hotLength = computed(() => | @@ -526,8 +555,8 @@ const hotLength = computed(() => | ||
526 | display: flex; | 555 | display: flex; |
527 | align-items: center; | 556 | align-items: center; |
528 | justify-content: center; | 557 | justify-content: center; |
529 | - height: 320px; | ||
530 | - margin: 10px auto 80px; | 558 | + height: 260px; |
559 | + margin: 10px auto 0px; | ||
531 | width: 80%; | 560 | width: 80%; |
532 | padding: 0; | 561 | padding: 0; |
533 | } | 562 | } |
@@ -557,7 +586,7 @@ const hotLength = computed(() => | @@ -557,7 +586,7 @@ const hotLength = computed(() => | ||
557 | display: inline-block; | 586 | display: inline-block; |
558 | margin: 0 5px; | 587 | margin: 0 5px; |
559 | text-align: center; | 588 | text-align: center; |
560 | - width: 260px; | 589 | + width: 180px; |
561 | } | 590 | } |
562 | } | 591 | } |
563 | @media screen and (min-width: 1537px) { | 592 | @media screen and (min-width: 1537px) { |
@@ -574,40 +603,52 @@ const hotLength = computed(() => | @@ -574,40 +603,52 @@ const hotLength = computed(() => | ||
574 | } | 603 | } |
575 | @media screen and (max-width: 1280px) { | 604 | @media screen and (max-width: 1280px) { |
576 | .image-row img { | 605 | .image-row img { |
577 | - width: 160px; | ||
578 | - height: 160px; | 606 | + width: 120px; |
607 | + height: 120px; | ||
579 | } | 608 | } |
580 | } | 609 | } |
581 | @media screen and (min-width: 1537px) { | 610 | @media screen and (min-width: 1537px) { |
582 | .image-name { | 611 | .image-name { |
583 | - display: block; | 612 | + display: -webkit-box; /* Enables multi-line text handling */ |
613 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
614 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
615 | + overflow: hidden; /* Hides the overflowed text */ | ||
616 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
584 | margin-top: 5px; | 617 | margin-top: 5px; |
585 | font-size: 16px; | 618 | font-size: 16px; |
586 | width: 180px; | 619 | width: 180px; |
587 | color: #555; | 620 | color: #555; |
588 | - text-align: left; | 621 | + text-align: center; /* Centers the text horizontally */ |
589 | margin-left: 50px; | 622 | margin-left: 50px; |
590 | } | 623 | } |
591 | } | 624 | } |
592 | @media screen and (max-width: 1536px) and (min-width: 1281px) { | 625 | @media screen and (max-width: 1536px) and (min-width: 1281px) { |
593 | .image-name { | 626 | .image-name { |
594 | - display: block; | 627 | + display: -webkit-box; /* Enables multi-line text handling */ |
628 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
629 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
630 | + overflow: hidden; /* Hides the overflowed text */ | ||
631 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
595 | margin-top: 5px; | 632 | margin-top: 5px; |
596 | font-size: 16px; | 633 | font-size: 16px; |
597 | width: 180px; | 634 | width: 180px; |
598 | color: #555; | 635 | color: #555; |
599 | - text-align: left; | 636 | + text-align: center; /* Centers the text horizontally */ |
600 | margin-left: 10px; | 637 | margin-left: 10px; |
601 | } | 638 | } |
602 | } | 639 | } |
603 | @media screen and (max-width: 1280px) { | 640 | @media screen and (max-width: 1280px) { |
604 | .image-name { | 641 | .image-name { |
605 | - display: block; | 642 | + display: -webkit-box; /* Enables multi-line text handling */ |
643 | + -webkit-box-orient: vertical; /* Defines the vertical orientation of the box */ | ||
644 | + -webkit-line-clamp: 3; /* Limits the text to 3 lines */ | ||
645 | + overflow: hidden; /* Hides the overflowed text */ | ||
646 | + text-overflow: ellipsis; /* Adds an ellipsis when the text overflows */ | ||
606 | margin-top: 5px; | 647 | margin-top: 5px; |
607 | font-size: 16px; | 648 | font-size: 16px; |
608 | width: 180px; | 649 | width: 180px; |
609 | color: #555; | 650 | color: #555; |
610 | - text-align: left; | 651 | + text-align: center; /* Centers the text horizontally */ |
611 | margin-left: 10px; | 652 | margin-left: 10px; |
612 | } | 653 | } |
613 | } | 654 | } |
@@ -620,10 +661,18 @@ button .recommendButton { | @@ -620,10 +661,18 @@ button .recommendButton { | ||
620 | .recommend-left-box { | 661 | .recommend-left-box { |
621 | } | 662 | } |
622 | 663 | ||
664 | +@media screen and (max-width: 1280px) { | ||
665 | + .recommend-img-left { | ||
666 | + width: 26px; | ||
667 | + height: 27px; | ||
668 | + margin-bottom: 60px; | ||
669 | + } | ||
670 | +} | ||
623 | .recommend-img-left { | 671 | .recommend-img-left { |
624 | width: 26px; | 672 | width: 26px; |
625 | height: 27px; | 673 | height: 27px; |
626 | margin-right: 30px; | 674 | margin-right: 30px; |
675 | + margin-bottom: 60px; | ||
627 | } | 676 | } |
628 | 677 | ||
629 | .recommend-img-left:hover { | 678 | .recommend-img-left:hover { |
@@ -636,6 +685,7 @@ button .recommendButton { | @@ -636,6 +685,7 @@ button .recommendButton { | ||
636 | width: 26px; | 685 | width: 26px; |
637 | height: 27px; | 686 | height: 27px; |
638 | margin-left: 30px; | 687 | margin-left: 30px; |
688 | + margin-bottom: 60px; | ||
639 | } | 689 | } |
640 | 690 | ||
641 | .recommend-img-right:hover { | 691 | .recommend-img-right:hover { |