agreement.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="page flex-col" :style="{'height':height}">
  3. <!-- #ifdef H5-->
  4. <uni-nav-bar v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false" left-icon="left" :title="title" @clickLeft="back" />
  5. <!-- #endif -->
  6. <scroll-view scroll-y="true" class="scroll-y ">
  7. <view class="content-box flex-col">
  8. <!-- <web-view src="http://www.gzqcdj.cn/doc/2.html"></web-view>-->
  9. <rich-text v-html="name">
  10. </rich-text>
  11. </view>
  12. </scroll-view>
  13. <!--#ifdef H5-->
  14. <liu-drag-button v-if="$isWxBrowser()" @clickBtn="back">返回</liu-drag-button>
  15. <!--#endif-->
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. name: '',
  23. height: '',
  24. type:'',
  25. title:''
  26. };
  27. },
  28. mounted() {
  29. },
  30. onLoad(option) {
  31. this.title = option.name;
  32. let sysInfo = uni.getSystemInfoSync();
  33. this.height = sysInfo.windowHeight + 'px';
  34. console.log("获取到的高度", this.height)
  35. uni.setNavigationBarTitle({
  36. title: this.title
  37. })
  38. this.type = option.type
  39. this.aboutByType(this.type)
  40. },
  41. methods: {
  42. back() {
  43. let pages = getCurrentPages()
  44. if (pages.length > 1){
  45. uni.navigateBack({
  46. delta: 1,
  47. fail:err=>{
  48. console.log(err)
  49. }
  50. })
  51. }else {
  52. uni.switchTab({
  53. url: '/pages/my/my'
  54. });
  55. }
  56. },
  57. aboutByType(type) {
  58. this.$api.service.aboutByType({type:type}).then(res => {
  59. this.name = res.data.data.aboutContent
  60. })
  61. }
  62. }
  63. };
  64. </script>
  65. <style lang="scss">
  66. @import './index.rpx.css';
  67. </style>