Ver código fonte

新增协议地址

huangxiaojing 3 anos atrás
pai
commit
859879f1e7
1 arquivos alterados com 82 adições e 0 exclusões
  1. 82 0
      microserviceUserH5/vcloud/agreement.html

+ 82 - 0
microserviceUserH5/vcloud/agreement.html

@@ -0,0 +1,82 @@
+<!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>Document</title>
+  <style>
+    @media screen and (max-width: 750px) {
+      html {
+        font-size: calc(100vw/7.5);
+      }
+    }
+
+    @media screen and (min-width: 750px) {
+      html {
+        font-size: calc(750px/7.5);
+      }
+    }
+
+    body {
+      padding: 0.3rem;
+    }
+
+    h1 {
+      font-size: 0.32rem;
+    }
+
+    h2 {
+      font-size: 0.31rem;
+    }
+
+    h3 {
+      font-size: 0.3rem;
+    }
+
+    h4 {
+      font-size: 0.29rem;
+    }
+
+    h5 {
+      font-size: 0.28rem;
+    }
+
+    h6 {
+      font-size: 0.27rem;
+    }
+
+    p {
+      font-size: 0.28rem;
+      color: #333;
+    }
+  </style>
+</head>
+
+<body>
+</body>
+
+</html>
+<script src="../static/js/vender/config.js"></script>
+<script type="text/javascript" src="../static/js/vender/jquery-3.4.1.min.js"></script>
+<script>
+  var agreementCoding = GetRequest().agreementCoding ? GetRequest().agreementCoding : 'XYPZYSXY2001'
+  console.log(agreementCoding);
+  $.ajax({
+    url: baseUrl + "/api/public/v4/agreement/content",
+    data: {
+      agreementCoding: agreementCoding
+    },
+    type: 'get',
+    dataType: 'json',
+    success: function (res) {
+      if (res.status === 0) {
+        var pos1 = res.data.content.lastIndexOf('<body>') + 6
+        var pos2 = res.data.content.lastIndexOf('</body>')
+        var content = pos1 >= 0 && pos2 >= 0 ? res.data.content.slice(pos1, pos2) : res.data.content
+        $('body').append(content);
+      }
+    }
+  })
+</script>