旅游教育出版社-数字教材移动端
QYF-GitLab1
昨天 8e3ee81b6ed824866734b7034604121f370f4201
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<template>
  <div class="protocol">
    <van-nav-bar
      :title="title"
      left-text
      left-arrow
      @click-left="onClickLeft"
    />
    <div class="contentBox" v-html="contentBox"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      protocol: "",
      title: "",
      contentBox: ""
    };
  },
  created() {
    this.getProtocol();
  },
  methods: {
    onClickLeft() {
      var that = this;
      that.$router.push({
        path: "/personalCenter"
      });
    },
    //获取用户协议
    getProtocol() {
      var that = this;
      that.MG.resource
        .getItem({
          path: "tourism_protocol",
          fields: {
            tourism_content: [],
            tourism_tag: []
          }
        })
        .then(res => {
          try {
            const agreementData = res.datas.find(
              e => e.refCode == "tourism_userRegistrationAgreement"
            );
            const teacherData = res.datas.find(
              e => e.refCode == "tourism_teacherCertificationAgreement"
            );
            if (
              agreementData &&
              agreementData.tourism_content &&
              this.$route.query.type
            ) {
              that.title = agreementData.name;
              that.contentBox = agreementData.tourism_content.replace(
                /<strong>/gi,
                '<strong class="p_class">'
              );
            }
            if (
              teacherData &&
              teacherData.tourism_content &&
              !this.$route.query.type
            ) {
              that.title = teacherData.name;
              that.contentBox = teacherData.tourism_content.replace(
                /<strong>/gi,
                '<strong class="p_class">'
              );
            }
          } catch (error) {
            console.log(error);
          }
        });
    }
  }
};
</script>
<style scoped>
.protocol {
  width: 100vw;
  height: 100vh;
}
.contentBox {
  padding: 30px;
  box-sizing: border-box;
  height: calc(100vh - 46px);
  overflow: auto;
}
</style>