Selaa lähdekoodia

用户协议,隐私协议

liyongli 3 vuotta sitten
vanhempi
commit
dbebf5edc4

+ 10 - 0
src/config/page.js

@@ -1,5 +1,15 @@
 //这里做页面参数约定和说明,如果url没有携带requiredParams的参数则无法初始化页面
 module.exports = {
+  userProtocol: {
+    title: "用户协议",
+    requiredParams: {},
+    optionalParams: {}
+  },
+  privacy: {
+    title: "隐私协议",
+    requiredParams: {},
+    optionalParams: {}
+  },
   aboutUs: {
     title: "关于我们",
     requiredParams: {},

+ 52 - 0
src/pages/privacy/Index.vue

@@ -0,0 +1,52 @@
+<template>
+  <div id="privacy" class="app">
+    <div class="sk" v-if="!content">
+      <br />
+      <van-skeleton title :row="10" />
+    </div>
+    <news v-if="content" :item="{ content: content }" />
+  </div>
+</template>
+
+<script>
+import { Skeleton as vanSkeleton } from "vant";
+import { currentUrlToParams } from "@/utils/common.js";
+import "vant/lib/skeleton/style";
+import news from "@/components/Detail/news.vue";
+
+export default {
+  name: "app",
+  data: function() {
+    return {
+      content: ""
+    };
+  },
+  methods: {
+    onClickLeft() {
+      history.go(-1);
+    }
+  },
+  mounted() {
+    window.$privacy = function(html) {
+      this.content = html;
+    };
+    this.$pageParams = currentUrlToParams();
+  },
+  beforeDestroy: function() {},
+  components: { news, vanSkeleton }
+};
+</script>
+<style lang="scss">
+#privacy {
+  height: 100%;
+  overflow-y: scroll;
+  .head {
+    text-align: center;
+    padding-bottom: 1em;
+    padding-top: 0.5rem;
+    .van-image {
+      margin: 0 auto;
+    }
+  }
+}
+</style>

+ 17 - 0
src/pages/privacy/index.js

@@ -0,0 +1,17 @@
+import Vue from "vue";
+import App from "./Index.vue";
+import "@/pages/common.js";
+import { validateInitPage } from "@/utils/validateInitPage.js";
+
+validateInitPage() //这里还可以链式then做一些权限拦截
+  .then((pageName, pageParams) => {
+    Vue.prototype.$pageName = pageName;
+    Vue.prototype.$pageParams = pageParams;
+
+    new Vue({
+      render: h => h(App)
+    }).$mount("#app");
+  })
+  .catch(e => {
+    console.log(e);
+  });

+ 52 - 0
src/pages/userProtocol/Index.vue

@@ -0,0 +1,52 @@
+<template>
+  <div id="userProtocol" class="app">
+    <div class="sk" v-if="!content">
+      <br />
+      <van-skeleton title :row="10" />
+    </div>
+    <news v-if="content" :item="{ content: content }" />
+  </div>
+</template>
+
+<script>
+import { Skeleton as vanSkeleton } from "vant";
+import { currentUrlToParams } from "@/utils/common.js";
+import "vant/lib/skeleton/style";
+import news from "@/components/Detail/news.vue";
+
+export default {
+  name: "app",
+  data: function() {
+    return {
+      content: ""
+    };
+  },
+  methods: {
+    onClickLeft() {
+      history.go(-1);
+    }
+  },
+  mounted() {
+    window.$userProtocol = function(html) {
+      this.content = html;
+    };
+    this.$pageParams = currentUrlToParams();
+  },
+  beforeDestroy: function() {},
+  components: { news, vanSkeleton }
+};
+</script>
+<style lang="scss">
+#userProtocol {
+  height: 100%;
+  overflow-y: scroll;
+  .head {
+    text-align: center;
+    padding-bottom: 1em;
+    padding-top: 0.5rem;
+    .van-image {
+      margin: 0 auto;
+    }
+  }
+}
+</style>

+ 16 - 0
src/pages/userProtocol/index.js

@@ -0,0 +1,16 @@
+import Vue from "vue";
+import App from "./Index.vue";
+import "@/pages/common.js";
+import { validateInitPage } from "@/utils/validateInitPage.js";
+
+validateInitPage() //这里还可以链式then做一些权限拦截
+  .then((pageName, pageParams) => {
+    Vue.prototype.$pageName = pageName;
+    Vue.prototype.$pageParams = pageParams;
+    new Vue({
+      render: h => h(App)
+    }).$mount("#app");
+  })
+  .catch(e => {
+    console.log(e);
+  });