Forráskód Böngészése

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

Damon 7 hónapja
szülő
commit
5e87b32b11
1 módosított fájl, 16 hozzáadás és 14 törlés
  1. 16 14
      src/pages/agreement/index.vue

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

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