Jelajahi Sumber

云上美博会页面提交

喻文俊 4 tahun lalu
induk
melakukan
ff98860c4e

+ 3 - 3
src/main/resources/config/dev/application-dev.yml

@@ -53,9 +53,9 @@ logging:
 # 服务域名
 caimei:
   siteEnv: 0 #网站环境,(2:正式环境,1:测试环境,0:开发环境)
-  spiServer: https://spi-b.caimei365.com
-#  spiServer: http://192.168.2.67:8008
-#  coreServer: https://core-b.caimei365.com
+#  spiServer: https://spi-b.caimei365.com
+  spiServer: http://192.168.2.68:8008
+# coreServer: https://core-b.caimei365.com
   coreServer: http://192.168.2.68:18002
   imageDomain: https://img-b.caimei365.com
   wwwDomain: http:localhost:8009

+ 2 - 0
src/main/resources/static/css/activity/beautyTopic.css

@@ -312,6 +312,8 @@ a{color:#333;text-decoration:none}
 .cm-article-item .cm-line::before{content:'';display:block;height:2px;width:16px;background-color:#ff5c00}
 .cm-product-item .cm-product-title{font-size:3vw;color:#4a4f58;line-height:5vw;-webkit-transition:all 0.4s;-o-transition:all 0.4s;transition:all 0.4s}
 .cm-product-item .cm-prodcut-price{font-size:3vw;font-weight:bold}
+.cm-product-item .cm-prodcut-price .price-tag{height:5vw;padding:1vw 0}
+.cm-product-item .cm-prodcut-price .price-tag .tag{display:inline-block;height:20px;line-height:20px;border:1px solid #ffe6dc;border-radius:2px;font-size:12px;color:#e15616;cursor:pointer;background:#fff;padding:0 4px;position:relative;font-style:normal}
 .cm-product-item .h20{height:20px}
 .cm-product-item .h24{height:24px}
 .cm-product-item .h44{height:10vw}

+ 14 - 0
src/main/resources/static/js/activity/index.js

@@ -48,6 +48,9 @@ var activeApp = (function () {
             }
         },
         filters: {
+            NumFormat: function NumFormat(value) {//处理金额
+                return Number(value).toFixed(2);
+            },
             tabTime: function tabTime(val) {
                 // 2021-08-16 00:00:00
                 var first = val.split(' ')[0];
@@ -56,6 +59,17 @@ var activeApp = (function () {
             }
         },
         methods: {
+            //促销活动类型数据处理
+            PromotionsFormat: function (promo) {
+                if (promo !== null) {
+                    if (promo.type === 1 && promo.mode === 1) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                }
+                return false;
+            },
             // 创建tab与轮播图的对应关系
             makeVideoFetchMap: function makeVideoFetchMap() {
                 var videoList = [22, 23, 24, 25];

+ 174 - 6
src/main/resources/templates/activity/beautyTopic.html

@@ -95,8 +95,91 @@
                                                         <!-- <span class="cm-tag color3">单品满减</span> -->
                                                         <span class="cm-tag color2" v-if="pros.listType == 2">{{ pros.label }}</span>
                                                     </div>
-                                                    <div class="cm-prodcut-price h24"><span>¥</span><span
-                                                            class="p-icon i3"></span></div>
+                                                    <div class="cm-prodcut-price h24">
+                                                        <div class="pro-price" v-if="pros.listType == 1">
+                                                            <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                                                <template v-if="pros.product.productCategory==1">
+                                                                    <!-- 样式1 价格未公开-->
+                                                                    <template v-if="pros.product.priceFlag==1">
+                                                                        <div class="price-tag">
+                                                                            <span class="tag"
+                                                                                  v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                                        </div>
+                                                                        <div class="price">¥价格未公开</div>
+                                                                    </template>
+                                                                    <template v-else>
+                                                                        <!-- 样式2-->
+                                                                        <template
+                                                                                v-if="(pros.product.priceFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
+                                                                            <div class="price-tag">
+                                                                                <span class="tag" v-if="pros.product.actStatus==1">
+                                                                                  {{pros.product.promotions.name}}
+                                                                                  <span v-if="pros.priceFlag != 1 && PromotionsFormat(pros.product.promotions)">:¥{{pros.product.price | NumFormat}}</span>
+                                                                                </span>
+                                                                            </div>
+                                                                            <div class="price"
+                                                                                 :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                                                <span>
+                                                                                  ¥{{(PromotionsFormat(pros.product.promotions) ? pros.product.originalPrice
+                                                                                  : pros.product.price) | NumFormat }}
+                                                                                </span>
+                                                                            </div>
+                                                                        </template>
+                                                                        <!-- 样式3 -->
+                                                                        <template
+                                                                                v-else-if="pros.product.priceFlag==2 && pros.product.userIdentity==4">
+                                                                            <div class="price-tag"
+                                                                                 v-if="pros.product.actStatus==1">
+                                                                                <span class="tag">{{pros.product.promotions.name}}</span>
+                                                                            </div>
+                                                                            <div class="price"><span>¥会员可见</span></div>
+                                                                        </template>
+                                                                        <!-- 样式4 -->
+                                                                        <template v-else>
+                                                                            <div class="price-tag"
+                                                                                 v-if="pros.product.actStatus==1">
+                                                                                <span class="tag">{{pros.product.promotions.name}}</span>
+                                                                            </div>
+                                                                            <div class="price"><span>¥</span>
+                                                                                <span class="p-icon"
+                                                                                      :class="'i'+pros.product.priceGrade"></span>
+                                                                            </div>
+                                                                        </template>
+                                                                    </template>
+                                                                </template>
+                                                                <!-- 样式5 -->
+                                                                <template v-else>
+                                                                    <div class="price-tag"></div>
+                                                                    <div class="price"
+                                                                         v-if="pros.product.detailTalkFlag == '2'">¥价格详聊
+                                                                    </div>
+                                                                    <div class="price" v-else>
+                                                                        <span>¥{{ pros.product.price | NumFormat }}</span>
+                                                                    </div>
+                                                                </template>
+                                                            </template>
+                                                            <template v-else>
+                                                                <!-- 样式6 -->
+                                                                <template v-if="pros.product.productCategory == 1">
+                                                                    <div class="price-tag" v-if="params.userId>0">
+                                                                        <span class="tag"
+                                                                              v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                                    </div>
+                                                                    <div class="price  ">
+                                                                        <span>¥</span>
+                                                                        <span class="p-icon"
+                                                                              :class="'i'+pros.product.priceGrade"></span>
+                                                                    </div>
+                                                                </template>
+                                                                <!-- 样式7 -->
+                                                                <template v-else>
+                                                                    <div class="price-tag"></div>
+                                                                    <div class="price  "><span>¥登录可见</span></div>
+                                                                </template>
+                                                            </template>
+                                                        </div>
+
+                                                    </div>
                                                 </div>
                                             </div>
                                         </a>
@@ -123,7 +206,8 @@
                                 >
                                     <div class="aspect"
                                          :data-scalc="getProductScalcMap(floorData.floorContent.templateType).scalc[index]">
-                                        <a target="_blank" :href="reallink(floorData.floorContent['adsLink' + (index + 1)])">
+                                        <a target="_blank"
+                                           :href="reallink(floorData.floorContent['adsLink' + (index + 1)])">
                                             <img
                                                     width="100%"
                                                     height="100%"
@@ -164,8 +248,91 @@
                                                     <!-- <span class="cm-tag color3">单品满减</span> -->
                                                     <span class="cm-tag color2" v-if="pros.listType == 2">{{ pros.label }}</span>
                                                 </div>
-                                                <div class="cm-prodcut-price h24"><span>¥</span><span
-                                                        class="p-icon i3"></span></div>
+                                                <div class="cm-prodcut-price h24">
+                                                     <div class="pro-price" v-if="pros.listType == 1">
+                                                            <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                                                <template v-if="pros.product.productCategory==1">
+                                                                    <!-- 样式1 价格未公开-->
+                                                                    <template v-if="pros.product.priceFlag==1">
+                                                                        <div class="price-tag">
+                                                                            <span class="tag"
+                                                                                  v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                                        </div>
+                                                                        <div class="price">¥价格未公开</div>
+                                                                    </template>
+                                                                    <template v-else>
+                                                                        <!-- 样式2-->
+                                                                        <template
+                                                                                v-if="(pros.product.priceFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
+                                                                            <div class="price-tag">
+                                                                                <span class="tag" v-if="pros.product.actStatus==1">
+                                                                                  {{pros.product.promotions.name}}
+                                                                                  <span v-if="pros.priceFlag != 1 && PromotionsFormat(pros.product.promotions)">:¥{{pros.product.price | NumFormat}}</span>
+                                                                                </span>
+                                                                            </div>
+                                                                            <div class="price"
+                                                                                 :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                                                <span>
+                                                                                  ¥{{(PromotionsFormat(pros.product.promotions) ? pros.product.originalPrice
+                                                                                  : pros.product.price) | NumFormat }}
+                                                                                </span>
+                                                                            </div>
+                                                                        </template>
+                                                                        <!-- 样式3 -->
+                                                                        <template
+                                                                                v-else-if="pros.product.priceFlag==2 && pros.product.userIdentity==4">
+                                                                            <div class="price-tag"
+                                                                                 v-if="pros.product.actStatus==1">
+                                                                                <span class="tag">{{pros.product.promotions.name}}</span>
+                                                                            </div>
+                                                                            <div class="price"><span>¥会员可见</span></div>
+                                                                        </template>
+                                                                        <!-- 样式4 -->
+                                                                        <template v-else>
+                                                                            <div class="price-tag"
+                                                                                 v-if="pros.product.actStatus==1">
+                                                                                <span class="tag">{{pros.product.promotions.name}}</span>
+                                                                            </div>
+                                                                            <div class="price"><span>¥</span>
+                                                                                <span class="p-icon"
+                                                                                      :class="'i'+pros.product.priceGrade"></span>
+                                                                            </div>
+                                                                        </template>
+                                                                    </template>
+                                                                </template>
+                                                                <!-- 样式5 -->
+                                                                <template v-else>
+                                                                    <div class="price-tag"></div>
+                                                                    <div class="price"
+                                                                         v-if="pros.product.detailTalkFlag == '2'">¥价格详聊
+                                                                    </div>
+                                                                    <div class="price" v-else>
+                                                                        <span>¥{{ pros.product.price | NumFormat }}</span>
+                                                                    </div>
+                                                                </template>
+                                                            </template>
+                                                            <template v-else>
+                                                                <!-- 样式6 -->
+                                                                <template v-if="pros.product.productCategory == 1">
+                                                                    <div class="price-tag" v-if="params.userId>0">
+                                                                        <span class="tag"
+                                                                              v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                                    </div>
+                                                                    <div class="price  ">
+                                                                        <span>¥</span>
+                                                                        <span class="p-icon"
+                                                                              :class="'i'+pros.product.priceGrade"></span>
+                                                                    </div>
+                                                                </template>
+                                                                <!-- 样式7 -->
+                                                                <template v-else>
+                                                                    <div class="price-tag"></div>
+                                                                    <div class="price  "><span>¥登录可见</span></div>
+                                                                </template>
+                                                            </template>
+                                                        </div>
+
+                                                </div>
                                             </div>
                                         </div>
                                     </a>
@@ -179,7 +346,8 @@
                                 >
                                     <div class="aspect"
                                          :data-scalc="getProductScalcMap(floorData.floorContent.templateType).scalc[index]">
-                                        <a target="_blank" :href="reallink(floorData.floorContent['adsLink' + (index + 1)])">
+                                        <a target="_blank"
+                                           :href="reallink(floorData.floorContent['adsLink' + (index + 1)])">
                                             <img
                                                     width="100%"
                                                     height="100%"