protocol.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view class="flex-common-css bgc-f">
  3. <Nav :title="title" leftIconColor="#333" titleColor="#333"></Nav>
  4. <scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
  5. <view v-if="numType == 1 || numType == 2 || numType == 4 || numType == 5" class="" v-html="text"></view>
  6. <view v-else class="align-items-center flex-wrap-wrap">
  7. <image class="image-c" :src="imageData" mode="widthFix"></image>
  8. </view>
  9. </scroll-view>
  10. </view>
  11. </template>
  12. <script>
  13. import {
  14. getAgreement
  15. } from "@/api/common.js"
  16. export default {
  17. components: {},
  18. data() {
  19. return {
  20. numType: '',
  21. title: '',
  22. text: '',
  23. imageData: ''
  24. };
  25. },
  26. onLoad(data) {
  27. if(data) {
  28. this.numType = data.num
  29. this.getAgreement(data.num)
  30. }
  31. },
  32. mounted() {},
  33. methods: {
  34. getAgreement(num){
  35. getAgreement().then((res) => {
  36. if(res.code == 1) {
  37. if(num == 1) {
  38. this.title = '用户协议'
  39. this.text = res.data.member_agreement
  40. }else if(num == 2) {
  41. this.title = '隐私协议'
  42. this.text = res.data.privacy_protocol
  43. } else if(num == 3) {
  44. this.title = '平台资质'
  45. this.imageData = res.data.business_license
  46. }else if(num == 4) {
  47. this.title = '校友圈使用规范说明'
  48. this.text = res.data.alumni_using_standards
  49. }else if(num == 5) {
  50. this.title = '定金声明'
  51. this.text = res.data.deposit_statement
  52. }else if(num == 6) {
  53. this.title = '增值电信业务经营许可证'
  54. this.imageData = res.data.permit
  55. }
  56. }
  57. })
  58. }
  59. },
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .image-c{
  64. width: 100%;
  65. height: auto;
  66. }
  67. </style>