userAgreement.vue 799 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view>
  3. <web-view :src="requestPath+texturl"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import {userAgreement,privacyPolicy} from '@/api/index'
  8. export default {
  9. data() {
  10. return {
  11. texturl:'',
  12. requestPath:uni.getStorageSync('requestPath')
  13. }
  14. },
  15. onLoad(option) {
  16. if(option.type){
  17. this.texturl=option.type
  18. // this.getuserAgreement()
  19. console.log(this.requestPath+this.texturl)
  20. }
  21. },
  22. methods: {
  23. getuserAgreement(){
  24. userAgreement().then(res=>{
  25. console.log(res)
  26. if(res.code==200){
  27. this.texturl=res.data
  28. }
  29. })
  30. },
  31. getprivacyPolicy(){
  32. getprivacyPolicy().then(res=>{
  33. console.log(res)
  34. if(res.code==200){
  35. this.texturl=res.data
  36. }
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. </style>