Browse Source

Merge remote-tracking branch 'remotes/origin/developerA' into developer

Aslee 3 years ago
parent
commit
0459d522cf

+ 4 - 0
src/main/java/com/caimei/www/controller/BaseController.java

@@ -23,6 +23,8 @@ import java.util.List;
 public class BaseController {
 	@Value("${caimei.coreServer}")
 	private String coreServer;
+	@Value("${caimei.zplmDomain}")
+	private String zplmDomain;
     /** 打包时间 */
     @Value("${caimei.siteEnv}")
     private String siteEnv;
@@ -56,6 +58,8 @@ public class BaseController {
 	    model.addAttribute("version", buildTime);
 		// spi服务器地址
 		model.addAttribute("coreServer", coreServer);
+		// zplm服务器地址
+		model.addAttribute("zplmDomain", zplmDomain);
 		// 搜索热门关键字
 		List<String> searchHotWord = baseService.getSearchHotWord();
 		model.addAttribute("searchHotWord", searchHotWord);

+ 11 - 0
src/main/java/com/caimei/www/controller/unlimited/ProductController.java

@@ -39,6 +39,7 @@ public class ProductController extends BaseController {
     private static final String CLOUD_BEAUTY_PATH = "activity/beautyTopic";
     private static final String ACTIVITY_COUPON_EXP = "activity/couponExp";
     private static final String ACTIVITY_ATTESTAION = "activity/attestation";
+    private static final String ACTIVITY_APPROVE_IFRAME = "activity/approveIframe.html";
     /**
      * 优惠券活动商品列表
      */
@@ -363,4 +364,14 @@ public class ProductController extends BaseController {
         return ACTIVITY_ATTESTAION;
     }
 
+    /**
+     * H5配套商品页
+     */
+    @GetMapping("/approve-iframe.html")
+    public String getActivityApproveIframe() {
+        return ACTIVITY_APPROVE_IFRAME;
+    }
+
+
+
 }

+ 2 - 0
src/main/resources/config/beta/application-beta.yml

@@ -54,6 +54,8 @@ caimei:
   imageDomain: https://img-b.caimei365.com
   wwwDomain: https://www-b.caimei365.com
   destPath: /mnt/newdatadrive/data/runtime/h5-instance/static/www
+  # 正品联盟(临时配置)
+  zplmDomain: https://zp-b.caimei365.com
 
 #DFS配置
 fdfs:

+ 2 - 1
src/main/resources/config/dev/application-dev.yml

@@ -60,7 +60,8 @@ caimei:
   imageDomain: https://img-b.caimei365.com
   wwwDomain: http:localhost:8009
   destPath: classpath:/
-
+  # 正品联盟(临时配置)
+  zplmDomain: https://zp-b.caimei365.com
 
 #DFS配置
 fdfs:

+ 2 - 1
src/main/resources/config/prod/application-prod.yml

@@ -54,7 +54,8 @@ caimei:
   imageDomain: https://img.caimei365.com
   wwwDomain: https://www.caimei365.com
   destPath: /mnt/newdatadrive/data/runtime/h5-instance/static/www
-
+  # 正品联盟(临时配置)
+  zplmDomain: https://zp-b.caimei365.com
 
 #DFS配置
 fdfs:

+ 1 - 1
src/main/resources/static/css/activity/attestation.css

@@ -119,7 +119,7 @@ li{list-style:none}
     .section_main.nine .section_content .section_li:nth-child(4n){margin-right: 0;}
     .section_main.nine .section_content .section_li img{width: 126px;height: 126px;display: block;-webkit-transform: scale(.9);-moz-transform: scale(.9);-ms-transform: scale(.9);-o-transform: scale(.9);transform: scale(.9);-o-transition: all .4s;-webkit-transition: all .4s;-moz-transition: all .4s;transition: all .4s;}
     .section_main.nine .section_content .section_li:hover img{-webkit-transform: scale(1);-moz-transform: scale(1);-ms-transform: scale(1);-o-transform: scale(1);transform: scale(1);}
-    .section_main.nine .section_content .section_li:hover{-webkit-box-shadow: 0 1px 8px 3px rgb(0 0 0 / 10%);-moz-box-shadow: 0 1px 8px 3px rgba(0, 0, 0, .1);box-shadow: 0 1px 8px 3px rgb(0 0 0 / 10%);}
+    .section_main.nine .section_content .section_li:hover{-webkit-box-shadow: 0 1px 8px 3px rgb(0 0 0 / 10%);-moz-box-shadow: 0 1px 8px 3px rgba(0, 0, 0, .1);box-shadow: 0 1px 8px 3px rgb(0 0 0 / 10%);cursor: pointer}
     /*侧边栏-联系我们*/
     .section-tel{width: 52px;height: 92px;position: fixed;right: 0;top: 50%;z-index: 99;border-radius: 2px;box-shadow: 0px 2px 12px 0px rgba(43, 43, 43, 0.1);}
     .section-tel .box{width: 52px;height: 46px;background: #FFFFFF;box-sizing: border-box;padding: 9px 12px;cursor: pointer;position: relative;}

+ 6 - 2
src/main/resources/static/css/article/article.css

@@ -85,7 +85,9 @@ dl,dd,dt{zoom:1}
 	.footer p{line-height: 30px;color: #FFFFFF;}
 	.footer p span{margin:0 5px}
 	.footer p span img.icp{width: 18px;height: 18px;display: inline-block;}
-	.bar{width:1190px;margin:0 auto;padding-top:90px;padding-bottom:15px}
+	.tip-bar{padding: 80px 0 5px}
+	.bar,.tip{width:1190px;margin:0 auto;padding-bottom:5px}
+	.tip{color: #777;}
 	.bar a{color:#777;font-size:14px}
 	.classify.biaoqian{border-bottom:solid 1px #ededed}
 	.content{width:1190px;margin:0 auto;position:relative}
@@ -200,7 +202,9 @@ dl,dd,dt{zoom:1}
 	.header .type a{display:inline-block;margin-right:1vw;padding:0 2vw;font-size:3.7vw}
 	.header .type a.current{color:#e15616}
 	.header .type:after{content:'';position:absolute;top:0;right:0;width:6vw;background-image:linear-gradient(to right,rgba(255,255,255,.5),rgba(255,255,255,1));height:100%}
-	.bar,.classify{height:8vw;line-height:8vw;font-size:3.1vw;overflow:hidden;color:#93979F;padding:0 2vw}
+	/*.tip-bar{display: flex;justify-content: space-between;align-items: center;flex-direction: row-reverse}*/
+	.tip-bar{ padding: 2vw 0 }
+	.tip,.bar,.classify{height:6vw;line-height:6vw;font-size:3.1vw;overflow:hidden;color:#93979F;padding:0 2vw}
 	.classify em{color:#E15616;font-weight:bold;margin-right:1vw;font-size:3.7vw}
 	.mainData{min-height:68vh}
 	.new-list{background:#FFF;}

+ 9 - 10
src/main/resources/static/js/activity/attestation.js

@@ -21,22 +21,21 @@ var orderPage = new Vue({
             }
         ],
         suppileData:[
-            {   logo:'/img/activity/attestation/1.jpg' },
-            {   logo:'/img/activity/attestation/2.jpg' },
-            {   logo:'/img/activity/attestation/3.jpg' },
-            // {   logo:'/img/activity/attestation/4.jpg' },
-            // {   logo:'/img/activity/attestation/5.jpg' },
-            // {   logo:'/img/activity/attestation/6.jpg' },
-            // {   logo:'/img/activity/attestation/7.jpg' },
-            // {   logo:'/img/activity/attestation/8.jpg' }
-
+            {   logo:'/img/activity/attestation/1.jpg' , appId: 'shanghaipinhuiyiliao', name: '上海品辉医疗科技有限公司官方授权'},
+            {   logo:'/img/activity/attestation/2.jpg' , appId: '', name: '认证通'},
+            {   logo:'/img/activity/attestation/3.jpg' , appId: '', name: '认证通'},
         ]
     },
     computed: {
 
     },
     methods: {
-
+        handleClick: function(data){
+            if(!data.appId) return;
+            window.localStorage.setItem('approveAppId', data.appId);
+            window.localStorage.setItem('approveIframeName', data.name);
+            window.open('/approve-iframe.html');
+        }
     },
     mounted: function () {
 

+ 81 - 0
src/main/resources/templates/activity/approveIframe.html

@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="https://www.thymeleaf.org ">
+<head>
+    <meta charset="UTF-8"/>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <title>供应商信息</title>
+    <style>
+        html {
+            width: 100%;
+            height: 100%;
+        }
+
+        body {
+            width: 100%;
+            height: 100%;
+            margin: 0;
+            background: linear-gradient(45deg, #f5f6fa, #dcdde1, #f5f6fa);
+        }
+
+        .iframe {
+            margin: 0 auto;
+            background: #fff;
+        }
+
+        @media screen and (min-width: 768px) {
+            body {
+                display: flex;
+                justify-content: center;
+                align-items: center;
+            }
+
+            .iframe iframe {
+                width: 375px;
+                height: 800px;
+            }
+        }
+
+        @media screen and (max-width: 768px) {
+            .iframe {
+                width: 100%;
+                height: 100%;
+            }
+
+            .iframe iframe {
+                width: 100%;
+                height: 100%;
+            }
+        }
+
+    </style>
+</head>
+<body>
+<input type="hidden" th:value="${zplmDomain}" id="zplmDomain">
+<div class="iframe" id="iframe">
+    <iframe :src="resultSrc" frameborder="0"></iframe>
+</div>
+
+<script src="/lib/vue2.6.12.min.js"></script>
+<script>
+    new Vue({
+        data: {
+            appId: ''
+        },
+        computed: {
+            resultSrc: function () {
+                var zplmDomain = document.querySelector('#zplmDomain').value;
+                return zplmDomain + '/#/pages/entry/auth?appId=' + this.appId;
+                // return `http://localhost:8081/#/pages/entry/auth?appId=${this.appId}`
+            }
+        },
+        created: function () {
+            this.appId = window.localStorage.getItem('approveAppId');
+            var title = window.localStorage.getItem('approveIframeName');
+            window.document.title = title;
+        }
+    }).$mount('#iframe')
+</script>
+</body>
+</html>

+ 2 - 1
src/main/resources/templates/activity/attestation.html

@@ -8,6 +8,7 @@
     <template th:replace="components/analysis"></template>
 </head>
 <body>
+<input type="hidden" th:value="${zplmDomain}" id="zplmDomain">
 <!-- 引用头部 -->
 <template th:replace="components/header"></template>
 
@@ -230,7 +231,7 @@
                     <h1>正品认证合作伙伴</h1>
                 </div>
                 <div class="section_content clear">
-                    <div class="section_li" v-for="(data , index) in suppileData">
+                    <div class="section_li" v-for="(data , index) in suppileData" @click="handleClick(data)">
                         <img class="logo" :src="data.logo" >
                     </div>
                 </div>

+ 6 - 3
src/main/resources/templates/article/list.html

@@ -10,9 +10,12 @@
 <div class="cm-modal"></div>
 <!--导航栏-->
 <template th:replace="article/components/article-header"></template>
-<!--面包屑-->
-<div th:if="${typeId}>0" class="bar">
-    <a href="/" target="_blank">首页</a>&gt; <a  th:each="type: ${articleType}" th:if="${typeId}==${type.id}" th:text="${type.name}" href="javascript:void(0);" class="title newTitle"></a>
+<div class="tip-bar">
+    <div class="tip">提示:产品详情请到采美商城搜索</div>
+    <!--面包屑-->
+    <div th:if="${typeId}>0" class="bar">
+        <a href="/" target="_blank">首页</a>&gt; <a  th:each="type: ${articleType}" th:if="${typeId}==${type.id}" th:text="${type.name}" href="javascript:void(0);" class="title newTitle"></a>
+    </div>
 </div>
 <!--主体内容-->
 <div class="content clearfix" id="ArticleContent">