agreement.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. let pages = getCurrentPages()
  39. if (pages.length > 1){
  40. uni.navigateBack({
  41. delta: 1,
  42. fail:err=>{
  43. console.log(err)
  44. }
  45. })
  46. }else {
  47. uni.switchTab({
  48. url: '/pages/my/my'
  49. });
  50. }
  51. },
  52. aboutByType(type) {
  53. this.$api.service.aboutByType({type:type}).then(res => {
  54. this.name = res.data.data.aboutContent
  55. })
  56. }
  57. }
  58. };
  59. </script>
  60. <style lang="scss">
  61. @import './index.rpx.css';
  62. </style>