爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.5 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="about-container">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar" :style="{paddingTop: statusBarHeight + 'px'}">
  5. <view class="back" @tap="goBack">
  6. <uni-icons type="left" size="20"></uni-icons>
  7. </view>
  8. <text class="nav-title">关于我们</text>
  9. <view class="nav-icons">
  10. <!-- 占位元素保持布局对称 -->
  11. </view>
  12. </view>
  13. <!-- 主卡片 -->
  14. <view class="main-card" :style="{marginTop: 'calc(200rpx )'}">
  15. <!-- 富文本内容 -->
  16. <rich-text :nodes="memberTextContent" class="rich-text-content"></rich-text>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. statusBarHeight: 0
  25. }
  26. },
  27. computed: {
  28. memberTextContent() {
  29. console.log(getApp().globalData.configData, 'about-getApp().globalData.configData')
  30. const item = getApp().globalData.configData.find(i => i.keyName === 'member_text')
  31. return item ? item.keyContent : ''
  32. }
  33. },
  34. onLoad() {
  35. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
  36. },
  37. onPullDownRefresh() {
  38. // 模拟刷新数据
  39. setTimeout(() => {
  40. uni.stopPullDownRefresh()
  41. uni.showToast({
  42. title: '刷新成功',
  43. icon: 'success',
  44. duration: 2000
  45. })
  46. }, 1000)
  47. },
  48. methods: {
  49. goBack() {
  50. uni.navigateBack();
  51. }
  52. }
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. .about-container {
  57. min-height: 100vh;
  58. background: linear-gradient(180deg, #fff3db 0%, #fffefb 30%);
  59. padding-bottom: 40rpx;
  60. }
  61. .nav-bar {
  62. display: flex;
  63. align-items: center;
  64. height: calc(150rpx + var(--status-bar-height));
  65. padding: 0 32rpx;
  66. background: #fffbe6;
  67. position: fixed;
  68. top: 0;
  69. left: 0;
  70. right: 0;
  71. z-index: 999;
  72. box-sizing: border-box;
  73. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.03);
  74. .back {
  75. padding: 20rpx;
  76. margin-left: -20rpx;
  77. }
  78. .nav-title {
  79. flex: 1;
  80. text-align: center;
  81. font-family: PingFang SC;
  82. font-weight: 500;
  83. font-size: 16px;
  84. line-height: 140%;
  85. letter-spacing: 0%;
  86. text-align: center;
  87. vertical-align: middle;
  88. font-weight: 500;
  89. color: #222;
  90. }
  91. .nav-icons {
  92. display: flex;
  93. align-items: center;
  94. gap: 12px;
  95. }
  96. }
  97. .main-card {
  98. background: #ffffff;
  99. border-radius: 36rpx;
  100. box-shadow: 0 8rpx 32rpx rgba(255, 156, 0, 0.08);
  101. margin: 0 24rpx 0 24rpx;
  102. padding: 20rpx 32rpx 32rpx 32rpx;
  103. display: flex;
  104. flex-direction: column;
  105. align-items: stretch;
  106. }
  107. .rich-text-content {
  108. width: 100%;
  109. line-height: 1.7;
  110. font-size: 26rpx;
  111. color: #444;
  112. }
  113. </style>