index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. name: '1231231',
  17. height: '',
  18. type:''
  19. };
  20. },
  21. mounted() {
  22. },
  23. onLoad(option) {
  24. let sysInfo = uni.getSystemInfoSync();
  25. this.height = sysInfo.windowHeight + 'px';
  26. console.log("获取到的高度", this.height)
  27. uni.setNavigationBarTitle({
  28. title: option.name
  29. })
  30. // this.getTermOfServiceByType(option.type);
  31. this.type = option.type
  32. this.AboutByType(this.type)
  33. },
  34. methods: {
  35. // 获取服务条款信息
  36. getTermOfServiceByType(type) {
  37. // 获取数据
  38. this.$api.getTermOfServiceByType({type: type}).then((res) => {
  39. if (res.aboutContent) {
  40. this.termOfService.aboutContent = res.aboutContent
  41. } else {
  42. this.termOfService.aboutContent = "暂无信息!!!"
  43. }
  44. }).catch(() => {
  45. uni.showToast({
  46. title: "操作失败"
  47. })
  48. });
  49. },
  50. AboutByType(type) {
  51. this.$api.AboutByType({type:type}).then(res => {
  52. this.name = res.data.data.aboutContent
  53. console.log(res,'333333333333')
  54. })
  55. }
  56. }
  57. };
  58. </script>
  59. <style lang="scss">
  60. @import '/common/css/common.css';
  61. @import './index.rpx.css';
  62. </style>