洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
745 B

10 months ago
7 months ago
10 months ago
  1. <template>
  2. <view class="main">
  3. <web-view :src="url"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import { getAgreement } from '@/config/api.js'
  8. export default {
  9. data() {
  10. return {
  11. type: 1,
  12. url: ''
  13. }
  14. },
  15. onLoad(options) {
  16. this.type = options.type
  17. // if(this.type==1) {
  18. // uni.setNavigationBarTitle({
  19. // title: '隐私政策'
  20. // })
  21. // }else {
  22. // uni.setNavigationBarTitle({
  23. // title: '用户使用协议'
  24. // })
  25. // }
  26. this.getAgreementFn()
  27. },
  28. methods: {
  29. async getAgreementFn() {
  30. const {data: res} = await getAgreement()
  31. if(this.type==1) {
  32. this.url = res.privacyAgreementUrl
  33. }else {
  34. this.url = res.useAgreementUrl
  35. }
  36. }
  37. }
  38. }
  39. </script>
  40. <style>
  41. </style>