termsPage.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <!-- 《服务条款》与《隐私政策》 -->
  3. <div class="terms-container">
  4. <div class="r-header">
  5. <div class="content">
  6. <nuxt-link to="/" tag="a" class="logo">
  7. <img class="logo-img" v-if="webConfigData.pcLogoImgText" :src="webConfigData.pcLogoImgText"/>
  8. </nuxt-link>
  9. <div class="go-login">
  10. <nuxt-link to="/login" class="login-btn">{{$t('register.goToLogin')}}</nuxt-link>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="terms-box">
  15. <div v-if="content" v-rich="content"></div>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. import util from '~/plugins/util.js'
  21. export default {
  22. layout: 'policy',
  23. data () {
  24. return {
  25. showFirstTerma: true,
  26. sts: this.$route.query.sts,
  27. content: '',
  28. webConfigData: {}
  29. }
  30. },
  31. methods: {
  32. },
  33. beforeMount () {
  34. // key = 'service-terms'代表服务条款,key = 'service-policy'代表隐私策略
  35. if (this.sts == 0) {
  36. this.$axios.get('/sys/config/info/serviceTerms')
  37. .then(({ data }) => {
  38. this.content = data.content
  39. })
  40. } else if (this.sts == 1) {
  41. this.$axios.get('/sys/config/info/servicePolicy')
  42. .then(({ data }) => {
  43. this.content = data.content
  44. })
  45. }
  46. },
  47. mounted () {
  48. this.$emit('hideLoginPop')
  49. // 获取网站配置信息
  50. this.webConfigData = JSON.parse(localStorage.getItem('webConfig') || '{}')
  51. },
  52. methods: {
  53. privacyPolicy: function () {
  54. this.showFirstTerma = false
  55. },
  56. servicePolicy: function () {
  57. this.showFirstTerma = true
  58. },
  59. }
  60. }
  61. </script>
  62. <style scoped>
  63. .logo-img {
  64. width: 190px;
  65. height: 48px;
  66. }
  67. .terms-box {
  68. width: 60%;
  69. margin: 30px auto;
  70. font-size: 15px;
  71. }
  72. .article-tit {
  73. text-align: center;
  74. font-size: 16px;
  75. font-weight: bold;
  76. }
  77. .cont,
  78. .cont-tit {
  79. margin: 15px 0;
  80. text-align: justify;
  81. line-height: 1.6em;
  82. }
  83. .cont {
  84. text-indent: 2em;
  85. }
  86. .blod {
  87. font-weight: bold;
  88. }
  89. .signature {
  90. text-align: right;
  91. margin-top: 50px;
  92. }
  93. .jump {
  94. color: #1588ca;
  95. text-decoration: underline;
  96. }
  97. </style>