agreement.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view class="agreement">
  3. <!-- <navbar ref="navbar" backColor="#fff" :config="config"></navbar> -->
  4. <view v-html="detail.protocolContent"></view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. config: {
  12. back: true, //false是tolbar页面 是则不写
  13. title: '协议',
  14. color: '#1A1A1A',
  15. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  16. backgroundColor: [1, "#fff"],
  17. // statusBarFontColor: '#1A1A1A',
  18. },
  19. detail: {}
  20. }
  21. },
  22. onLoad(options) {
  23. let title = '协议'
  24. if (options.code == "user_protocol") {
  25. title = '用户协议'
  26. } else if (options.code == "privacy_protocol") {
  27. title = '隐私协议'
  28. }
  29. uni.setNavigationBarTitle({
  30. title: title
  31. });
  32. this.getDetail(options.code || 'user_protocol')
  33. },
  34. methods: {
  35. getDetail(code) {
  36. this.$http.get(`/protocol/info`, {
  37. code: code
  38. }).then(res => {
  39. if (res && res.code == 200) {
  40. this.detail = res.data
  41. }
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. * {
  49. word-break: break-all;
  50. }
  51. .agreement {
  52. padding: 30rpx;
  53. .top /deep/ img {
  54. max-width: 100%;
  55. }
  56. .top /deep/ .ql-align-center {
  57. text-align: center;
  58. }
  59. .top /deep/ .ql-align-right {
  60. text-align: right;
  61. }
  62. .top /deep/ blockquote {
  63. display: block;
  64. border-left: 8px solid #d0e5f2;
  65. padding: 5px 10px;
  66. margin: 10px 0;
  67. line-height: 1.4;
  68. font-size: 100%;
  69. background-color: #f1f1f1;
  70. }
  71. .top /deep/ .ql-indent-1 {
  72. margin-left: 60rpx;
  73. }
  74. .top /deep/ .ql-indent-2 {
  75. margin-left: 120rpx;
  76. }
  77. .top /deep/ .ql-indent-3 {
  78. margin-left: 180rpx;
  79. }
  80. .top /deep/ .ql-indent-4 {
  81. margin-left: 240rpx;
  82. }
  83. .top /deep/ .ql-indent-5 {
  84. margin-left: 300rpx;
  85. }
  86. }
  87. .title-item {
  88. img {
  89. width: 690rpx;
  90. height: 390rpx;
  91. }
  92. }
  93. .top {
  94. padding: 30rpx;
  95. .item {
  96. font-size: 28rpx;
  97. font-weight: 700;
  98. color: #050505;
  99. line-height: 40rpx;
  100. }
  101. .content {
  102. padding: 0 14rpx 26rpx 14rpx;
  103. font-size: 24rpx;
  104. color: #666666;
  105. font-weight: 500;
  106. line-height: 48rpx;
  107. }
  108. .title {
  109. font-size: 26rpx;
  110. font-weight: 700;
  111. color: #050505;
  112. line-height: 40rpx;
  113. }
  114. .title-item {
  115. color: #666666;
  116. font-weight: 500;
  117. line-height: 48rpx;
  118. font-size: 24rpx;
  119. padding: 0 14rpx;
  120. }
  121. }
  122. .top {
  123. .item {
  124. font-size: 28rpx;
  125. font-weight: 700;
  126. color: #050505;
  127. line-height: 40rpx;
  128. }
  129. .content {
  130. padding: 0 14rpx 26rpx 14rpx;
  131. font-size: 24rpx;
  132. color: #666666;
  133. font-weight: 500;
  134. line-height: 48rpx;
  135. }
  136. .title {
  137. font-size: 26rpx;
  138. font-weight: 700;
  139. color: #050505;
  140. line-height: 40rpx;
  141. }
  142. .title-item {
  143. color: #666666;
  144. font-weight: 500;
  145. line-height: 48rpx;
  146. font-size: 24rpx;
  147. padding: 0 14rpx;
  148. }
  149. }
  150. </style>