h5.vue 837 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="content">
  3. <view v-html="ulrtext" style="padding-top: 20rpx;"></view>
  4. </view>
  5. </template>
  6. <script>
  7. import {getyingsi,getxieyi} from '@/api/user.js'
  8. export default {
  9. data() {
  10. return {
  11. type:"",
  12. ulrtext:''
  13. }
  14. },
  15. onLoad(option) {
  16. if(option.type==1){
  17. //协议
  18. uni.setNavigationBarTitle({
  19. title: "用户协议"
  20. });
  21. this.getgetxieyilist()
  22. }else{
  23. //隐私
  24. uni.setNavigationBarTitle({
  25. title: "隐私保护"
  26. });
  27. this.getyingsilist()
  28. }
  29. console.log(this.type)
  30. },
  31. methods:{
  32. getyingsilist(){
  33. getyingsi().then(res=>{
  34. this.ulrtext=res
  35. })
  36. },
  37. getgetxieyilist(){
  38. getxieyi().then(res=>{
  39. this.ulrtext=res
  40. })
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped lang="scss">
  46. .content{
  47. padding: 20rpx;
  48. padding-bottom: 60rpx;
  49. }
  50. </style>