about-us.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="user-agreement">
  3. <!-- <view class="agreement-title">{{ aboutUsData.title }}</view> -->
  4. <view class="agreement-content">
  5. <rich-text :nodes="aboutUsData.content"></rich-text>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. aboutUsData: {
  14. title: "",
  15. content: "",
  16. },
  17. };
  18. },
  19. onLoad() {
  20. this.getAboutUs();
  21. },
  22. methods: {
  23. // 获取关于书嗨
  24. getAboutUs() {
  25. uni.showLoading({
  26. title: "加载中...",
  27. });
  28. uni.$u.http
  29. .get("/token/getArticleOne?code=aboutShuHi")
  30. .then((res) => {
  31. if (res.code === 200) {
  32. this.aboutUsData = res.data;
  33. } else {
  34. this.$u.toast(res.msg || "获取关于书嗨失败");
  35. }
  36. })
  37. .finally(() => {
  38. uni.hideLoading();
  39. });
  40. },
  41. },
  42. };
  43. </script>
  44. <style lang="scss" scoped>
  45. .user-agreement {
  46. min-height: 100vh;
  47. background-color: $app-theme-bg-color;
  48. padding: 30rpx;
  49. padding-bottom: 50px;
  50. .agreement-title {
  51. font-size: 36rpx;
  52. font-weight: bold;
  53. color: $app-theme-text-color;
  54. text-align: center;
  55. margin-bottom: 40rpx;
  56. }
  57. .agreement-content {
  58. font-size: 28rpx;
  59. color: $app-theme-text-color;
  60. line-height: 1.8;
  61. :deep(rich-text) {
  62. width: 100%;
  63. }
  64. }
  65. }
  66. </style>