index.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*协议*/
  2. <template>
  3. <div class="protocol">
  4. <div class="container">
  5. <div class="content">
  6. <h3 class="title">{{title}}</h3>
  7. <p v-for="list in content" :key="list">{{list}}</p>
  8. <div class="btn">
  9. <el-button
  10. type="danger"
  11. size="small"
  12. class="agree-btn"
  13. @click.native.prevent="Agree"
  14. >我已阅读并同意</el-button>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import { request } from '@/utils/request'
  22. export default {
  23. name: 'Protocol',
  24. data() {
  25. return {
  26. title: '注册协议',
  27. content: []
  28. }
  29. },
  30. created() {
  31. let params = {
  32. transCode: 'C00020',
  33. type: 'P001'
  34. }
  35. request(params)
  36. .then(res => {
  37. this.content = res.content.split('\n')
  38. })
  39. .catch(err => {})
  40. },
  41. methods: {
  42. //阅读并同意
  43. Agree() {
  44. this.$router.go(-1)
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. @import '@/styles/variables.scss';
  51. @import '@/styles/mixin.scss';
  52. .protocol {
  53. padding: 50px 0;
  54. @include w_h(100%, 100%);
  55. background: $color_f5;
  56. .container {
  57. @include w_h(100%, 100%);
  58. .content {
  59. padding: 0 $pad;
  60. @include w_h(100%, 100%);
  61. overflow-y: scroll;
  62. .title {
  63. margin-bottom: 20px;
  64. font-size: 16px;
  65. text-align: center;
  66. color: $color_6;
  67. }
  68. p {
  69. margin-bottom: 10px;
  70. font-size: 14px;
  71. color: $color_9;
  72. text-align: justify;
  73. word-wrap: break-word;
  74. text-indent: 28px;
  75. }
  76. .btn {
  77. @include w_h();
  78. @include flex(center);
  79. .agree-btn {
  80. margin: 20px auto;
  81. }
  82. }
  83. }
  84. }
  85. }
  86. </style>