userAgreement.vue 943 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view>
  3. <navigation-bar :title="title" background-color="#fff" front-color="#000000" />
  4. <view style="margin-bottom: 15px;" v-html="content"></view>
  5. <u-button type="primary" shape="circle" text="我已知晓并同意" @click="back()"></u-button>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. id: 0,
  13. content: '',
  14. title: '',
  15. }
  16. },
  17. onLoad(option) {
  18. this.id = option.id
  19. },
  20. created() {
  21. this.getAgreement()
  22. },
  23. methods: {
  24. getAgreement() {
  25. let params = {
  26. id: this.id
  27. }
  28. this.http.request({
  29. url: '/level-one-server/app/TbAgreement/getById',
  30. data: params,
  31. method: 'get',
  32. success: res => {
  33. let data = res.data.data
  34. this.title = data.type
  35. this.content = data.content
  36. }
  37. });
  38. },
  39. back() {
  40. uni.navigateBack({
  41. delta: 1,
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss">
  48. page {
  49. padding: 10px;
  50. }
  51. </style>