agreement.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="page flex-col" :style="{'height':height}">
  3. <scroll-view scroll-y="true" class="scroll-y ">
  4. <view class="content-box flex-col">
  5. <!-- <web-view src="http://www.gzqcdj.cn/doc/2.html"></web-view>-->
  6. <rich-text v-html="name">
  7. </rich-text>
  8. </view>
  9. </scroll-view>
  10. <!--#ifdef H5-->
  11. <liu-drag-button @clickBtn="back">返回</liu-drag-button>
  12. <!--#endif-->
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. name: '',
  20. height: '',
  21. type:''
  22. };
  23. },
  24. mounted() {
  25. },
  26. onLoad(option) {
  27. let sysInfo = uni.getSystemInfoSync();
  28. this.height = sysInfo.windowHeight + 'px';
  29. console.log("获取到的高度", this.height)
  30. uni.setNavigationBarTitle({
  31. title: option.name
  32. })
  33. this.type = option.type
  34. this.aboutByType(this.type)
  35. },
  36. methods: {
  37. back() {
  38. uni.navigateBack({
  39. delta: 1
  40. })
  41. },
  42. aboutByType(type) {
  43. this.$api.service.aboutByType({type:type}).then(res => {
  44. this.name = res.data.data.aboutContent
  45. })
  46. }
  47. }
  48. };
  49. </script>
  50. <style lang="scss">
  51. @import './index.rpx.css';
  52. </style>