agreement.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="agreement">
  3. <navbar :config="config" backColor="#999999"></navbar>
  4. <view class="top ql-editor-box" v-html="agreement">
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. import jyfParser from "../../components/jyf-parser/jyf-parser";
  10. var app = getApp()
  11. export default {
  12. components: {
  13. jyfParser
  14. },
  15. data() {
  16. return {
  17. config: {
  18. back: true, //false是tolbar页面 是则不写
  19. title: '注册协议',
  20. color: '#1A1A1A',
  21. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  22. backgroundColor: [1, "#FFFFFF"],
  23. // statusBarFontColor: '#1A1A1A',
  24. },
  25. agreement: '',
  26. balance: [],
  27. parmas: {
  28. page: 1,
  29. limit: 20,
  30. title: ''
  31. },
  32. noData: false,
  33. tabTop: 0,
  34. status: 'more', //more|loading|noMore
  35. }
  36. },
  37. onLoad(options) {
  38. if (options.type) {
  39. this.agreementInfo(options.type);
  40. if (options.type == 'user_protocol') {
  41. this.config.title = '服务协议';
  42. }else if (options.type == 'privacy_protocol') {
  43. this.config.title = '隐私协议';
  44. }else if (options.type == 'realname_auth_protocol') {
  45. this.config.title = '实名认证协议';
  46. }else if(options.type == 'about_us'){
  47. this.config.title = '关于我们';
  48. }
  49. }
  50. },
  51. methods: {
  52. agreementInfo(type) {
  53. this.$yghttp.get('/protocol/info', {
  54. code: type
  55. })
  56. .then(res => {
  57. if (res && res.code == 200) {
  58. this.agreement = res.data.protocolContent
  59. }
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style scoped lang="scss">
  66. .agreement {
  67. width: 100%;
  68. overflow: hidden;
  69. }
  70. .topsearch {
  71. position: fixed;
  72. left: 0;
  73. width: 100%;
  74. z-index: 2;
  75. box-sizing: border-box;
  76. background-color: #fff;
  77. }
  78. .topsbox {
  79. padding: 80rpx 30rpx 0;
  80. }
  81. .leftbox {
  82. height: 60rpx;
  83. line-height: 60rpx;
  84. background-color: #E6E6E6;
  85. border-radius: 30rpx;
  86. }
  87. .u-p30s {
  88. padding: 10rpx 30rpx;
  89. }
  90. .uptop {
  91. padding: 30rpx 0;
  92. width: 100%;
  93. position: relative;
  94. }
  95. .turn {
  96. transform: rotate(90deg);
  97. }
  98. .top {
  99. padding: 0 20rpx;
  100. }
  101. /deep/ .hxicon {
  102. color: #1A1A1A !important;
  103. }
  104. </style>