Explorar el Código

认证通页面跳转新增

喻文俊 hace 3 años
padre
commit
a91e7a016b

+ 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;
+    }
+
+
+
 }

+ 7 - 2
src/main/resources/static/js/activity/attestation.js

@@ -21,7 +21,7 @@ var orderPage = new Vue({
             }
         ],
         suppileData:[
-            {   logo:'/img/activity/attestation/1.jpg' },
+            {   logo:'/img/activity/attestation/1.jpg' , appId: 'abcdefg', name: '上海品辉医疗科技有限公司官方授权'},
             {   logo:'/img/activity/attestation/2.jpg' },
             {   logo:'/img/activity/attestation/3.jpg' },
             // {   logo:'/img/activity/attestation/4.jpg' },
@@ -36,7 +36,12 @@ var orderPage = new Vue({
 
     },
     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="en">
+<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: 768px;
+            }
+        }
+
+        @media screen and (max-width: 768px) {
+            .iframe {
+                width: 100%;
+                height: 100%;
+            }
+
+            .iframe iframe {
+                width: 100%;
+                height: 100%;
+            }
+        }
+
+    </style>
+</head>
+<body>
+<div class="iframe" id="iframe">
+    <iframe src="http://localhost:8080/#/pages/approve/index?appId=abcdefg"
+            frameborder="0"
+    ></iframe>
+</div>
+
+<script src="/lib/vue2.6.12.min.js"></script>
+<script>
+    new Vue({
+        data: {
+            appId: ''
+        },
+        computed: {
+            resultSrc: function () {
+                // http://zp.caimei365.com/#/pages/approve/index
+                // http://zp-b.caimei365.com/#/pages/approve/index
+                return `http://zp-b.caimei365.com/#/pages/approve/index?appId=${this.appId}`
+            }
+        },
+        created: function () {
+            this.appId = window.localStorage.getItem('approveAppId');
+            const title = window.localStorage.getItem('approveIframeName');
+            window.document.title = title;
+        }
+    }).$mount('#iframe')
+</script>
+</body>
+</html>

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

@@ -230,7 +230,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>