Browse Source

feat: 解决生成h5协议界面参数错误的问题

Damon 7 tháng trước cách đây
mục cha
commit
fd1ab85be2
1 tập tin đã thay đổi với 16 bổ sung14 xóa
  1. 16 14
      src/pages/agreement/index.vue

+ 16 - 14
src/pages/agreement/index.vue

@@ -1,39 +1,41 @@
 <template>
 <template>
-  <view class="app-container">
+  <view class='app-container'>
     <uv-parse :content="form.content" selectable @linktap="linktap" />
     <uv-parse :content="form.content" selectable @linktap="linktap" />
   </view>
   </view>
 </template>
 </template>
 
 
 <script>
 <script>
-import { detail } from "@/api/explain.js";
+import { detail } from '@/api/agreement.js';
 export default {
 export default {
   data() {
   data() {
     return {
     return {
       // 表单
       // 表单
-      form: {},
-    };
+      form: {}
+    }
   },
   },
   onLoad(e) {
   onLoad(e) {
-    this.getDetail(e.id);
+    this.getDetail(e.type)
   },
   },
   methods: {
   methods: {
-    getDetail(id) {
-      detail(id).then((res) => {
+    getDetail(type) {
+      detail({
+        type: type
+      }).then(res => {
         if (res.code === 0) {
         if (res.code === 0) {
-          this.form = res.data;
+          this.form = res.data
         }
         }
-      });
+      })
     },
     },
     // 点击链接
     // 点击链接
     linktap(e) {
     linktap(e) {
-      window.location.href = e.href;
-    },
-  },
-};
+      window.location.href = e.href
+    }
+  }
+}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.app-container {
+.app-container{
   white-space: pre-wrap;
   white-space: pre-wrap;
 }
 }
 </style>
 </style>