Parcourir la source

upd(云机用户手册): 兼容性更新

曾志翔 il y a 3 ans
Parent
commit
522e02b759
1 fichiers modifiés avec 80 ajouts et 9 suppressions
  1. 80 9
      microserviceUserH5/vcloud/userManual.html

+ 80 - 9
microserviceUserH5/vcloud/userManual.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="zh-CN">
+<html lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
@@ -10,17 +10,18 @@
     <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico" />
     <title>双子星</title>
     <link rel="stylesheet" href="../static/css/normalize-8.0.1.css" />
-    <script src="https://unpkg.com/vconsole@3.14.6/dist/vconsole.min.js"></script>
+    <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/vConsole/3.12.1/vconsole.min.js"></script>
     <script>
       // VConsole will be exported to `window.VConsole` by default.
       var vConsole = new window.VConsole();
     </script>
-    <script src="../static/js/vender/vue/vue.min.js"></script>
 
-    <!-- <script src="https://cdn.staticfile.org/vue/2.2.2/vue.js"></script> -->
+    <!-- <script src="../static/js/vender/vue/vue.min.js"></script> -->
+
+    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.js"></script>
     <!-- <script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.js"></script> -->
     <script src="../static/js/vender/config.js"></script>
-    <script src="../static/js/tailwindcss/v3.0.24/index.js"></script>
+    <!-- <script src="../static/js/tailwindcss/v3.0.24/index.js"></script>
     <script>
       tailwind.config = {
         theme: {},
@@ -28,8 +29,9 @@
           preflight: false,
         },
       };
-    </script>
-    <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
+    </script> -->
+    <!-- <script src="../static/js/vender/jquery-3.4.1.min.js"></script> -->
+
     <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css" />
     <script src="../static/js/vender/toastr/toastr.min.js"></script>
     <script>
@@ -80,18 +82,26 @@
         font-size: 0.28rem;
         color: #333;
       }
+      .title {
+        text-align: center;
+        font-weight: bold;
+      }
     </style>
   </head>
   <body>
+    <noscript>
+      <div class="">noscript</div>
+    </noscript>
+    <!-- <div class="data">777</div> -->
     <div v-cloak id="app">
-      <h1 class="text-center mt-2">{{title}}</h1>
+      <!-- <h1 class="title">{{title}}</h1> -->
       <div class="p-2 phone-container" v-html="content"></div>
     </div>
     <script src="../static/js/vender/vue/axios.min.js"></script>
     <script src="../static/js/vender/vue/config.js"></script>
     <script src="../static/js/vender/vue/api.js"></script>
 
-    <script type="text/javascript">
+    <!-- <script type="text/javascript">
       Vue.config.errorHandler = function (err, vm, info) {
         toastr.error(err.message);
         return false;
@@ -142,6 +152,67 @@
           return false;
         },
       });
+    </script> -->
+
+    <script>
+      // console.log($('.data').html('888'));
+      new Vue({
+        el: '#app',
+        data() {
+          return {
+            title: '',
+            content: '',
+          };
+        },
+        mounted() {
+          const t = this;
+          service
+            .get('/api/public/v5/agreementApi/content/getContentByType', {
+              params: {
+                agreementCoding: 'XYPZYHXY2004',
+                type: 1,
+              },
+            })
+            .then(function (response) {
+              t.title = response.data.agreementName;
+              // t.content = response.data.content;
+              const html = document.createElement('html');
+              // console.log(html);
+              html.innerHTML = response.data.content;
+
+              const phoneContainers = html.querySelectorAll('.phone-container');
+
+              if (phoneContainers.length > 0) {
+                t.content =
+                  phoneContainers[phoneContainers.length - 1].innerHTML;
+              } else {
+                t.content = response.data.content;
+              }
+            });
+
+          // .then(
+          //   function (response) {
+          // //     console.log(response);
+          //     t.title = response.data.agreementName;
+          //     t.content = response.data.content;
+          // //     // const html = document.createElement('html');
+          // //     // html.innerHTML = response.data.content;
+          // //     // const phoneContainers =
+          // //     //   html.querySelectorAll('.phone-container');
+          // //     // if (phoneContainers.length > 0) {
+          // //     //   this.content = phoneContainers.item(
+          // //     //     phoneContainers.length - 1,
+          // //     //   ).innerHTML;
+          // //     // } else {
+          // //     //   this.content = response.data.content;
+          // //     // }
+          //   }
+          // //   // function (err) {
+          // //   //   toastr.error(err.message);
+          // //   // },
+          // );
+        },
+      });
     </script>
   </body>
 </html>