agreement.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view>
  3. <view style="color: #fff;z-index: 99999999;position: relative;">
  4. <tn-nav-bar :bottomShadow="false" backgroundColor="#207CF7">{{title}}</tn-nav-bar>
  5. <view :style="{height: tobheight+'px'}"></view>
  6. </view>
  7. <view class="gy" style="z-index: 1;position: relative;">
  8. <u-parse :content="content"></u-parse>
  9. </view>
  10. <wike-loading-page :isLoading="isLoading"></wike-loading-page>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. mapMutations,
  16. mapActions,
  17. mapState,
  18. mapGetters
  19. } from 'vuex';
  20. export default {
  21. data() {
  22. return {
  23. content: '',
  24. type: '',
  25. title: '',
  26. tobheight: 45,
  27. platform: this.$platform.get(),
  28. isLoading: true
  29. }
  30. },
  31. computed: {
  32. ...mapGetters(['appInfo'])
  33. },
  34. onLoad(e) {
  35. if (e && e.type) {
  36. this.type = e.type
  37. this.title = e.type == 'privacy' ? '隐私政策' : e.type == 'aboutus' ? '关于我们' : '使用协议'
  38. if (this.platform == 'wxMiniProgram') {
  39. var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
  40. var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop
  41. this.tobheight = (menumtop + paddingtop + uni.getMenuButtonBoundingClientRect().height)
  42. }
  43. this.privacyabout()
  44. }
  45. },
  46. methods: {
  47. privacyabout() {
  48. this.$http('conf.getGroupConf', {
  49. group: 'system.agreement'
  50. }).then(res => {
  51. console.log('关于我们返回值:', res
  52. .data.aboutus);
  53. if (res.code == 0) {
  54. uni.setNavigationBarTitle({
  55. title: this.appInfo.site_name
  56. })
  57. this.content = this.type == 'privacy' ? res.data.privacy : this.type == 'aboutus' ? res
  58. .data.aboutus : res.data.use
  59. this.isLoading = false
  60. }
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss">
  67. .gy {
  68. margin: 30rpx;
  69. }
  70. ::v-deep ._p {
  71. display: flex;
  72. justify-content: center;
  73. }
  74. </style>