猎豆优选小程序

agreement.vue 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view class="page-wrap" :style="{'padding-bottom': isIphoneX ? '24px': '6px'}">
  3. <!-- 顶部导航 -->
  4. <u-navbar class="navbar-wrap" :title="title" title-color="#fff" :title-size="30" :title-bold="false" :title-width="400" :is-back="true" back-icon-color="#fff" :background="navbarBackground" />
  5. <!-- 内容 -->
  6. <rich-text :nodes="agreement" />
  7. </view>
  8. </template>
  9. <script>
  10. import { agreementContent, agreementTitle } from '../../../utils/agreement'
  11. const app = getApp()
  12. export default {
  13. data() {
  14. return {
  15. navbarBackground: app.globalData.navbarBackground,
  16. isIphoneX: app.globalData.isIphoneX,
  17. title: '',
  18. agreement: '',
  19. }
  20. },
  21. onLoad({ type = '' }) {
  22. if (type && agreementContent[type]) {
  23. this.title = agreementTitle[type] || ''
  24. this.agreement = agreementContent[type]
  25. }
  26. }
  27. }
  28. </script>
  29. <style scoped lang="scss">
  30. .page-wrap {
  31. min-height: 100vh;
  32. padding: 20rpx;
  33. background-color: #fff;
  34. /deep/ .mb-20 {
  35. margin-bottom: 20rpx;
  36. }
  37. /deep/ .indent-2 {
  38. text-indent: 2em;
  39. }
  40. /deep/ .content {
  41. line-height: 44rpx;
  42. font-size: 26rpx;
  43. color: #333;
  44. }
  45. /deep/ .title-1 {
  46. line-height: 44rpx;
  47. font-size: 30rpx;
  48. color: #000;
  49. font-weight: 500;
  50. }
  51. }
  52. </style>