index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="container">
  3. <!-- 自定义头部 -->
  4. <view class="custom-header">
  5. <view class="header-left" @click="navBack">
  6. <image class="back-icon" src="/static/icons/chevron_right_dark.svg" style="transform: rotate(180deg);"></image>
  7. </view>
  8. <text class="header-title">关于我们</text>
  9. <view class="header-right"></view>
  10. </view>
  11. <view class="header-placeholder"></view>
  12. <view class="logo-area">
  13. <image class="app-logo" src="/static/logo.png" mode="aspectFit"></image>
  14. <text class="app-name">履约者</text>
  15. <text class="app-version">Version {{ version }}</text>
  16. </view>
  17. <view class="group-card">
  18. <view class="list-item" @click="goToDetail(1)">
  19. <text class="item-title">服务协议</text>
  20. <image class="arrow-icon" src="/static/icons/chevron_right.svg"></image>
  21. </view>
  22. <view class="list-item" @click="goToDetail(2)">
  23. <text class="item-title">隐私政策</text>
  24. <image class="arrow-icon" src="/static/icons/chevron_right.svg"></image>
  25. </view>
  26. <!-- <view class="list-item no-border" @click="checkUpdate">
  27. <text class="item-title">版本更新</text>
  28. <view class="item-right">
  29. <view class="badge-yellow">1</view>
  30. <image class="arrow-icon" src="/static/icons/chevron_right.svg"></image>
  31. </view>
  32. </view> -->
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. version: '2.0.6'
  41. }
  42. },
  43. onLoad() {
  44. this.getAppVersion();
  45. },
  46. methods: {
  47. navBack() {
  48. uni.navigateBack({
  49. delta: 1
  50. });
  51. },
  52. goToDetail(id) {
  53. uni.navigateTo({
  54. url: `/pages/mine/settings/about/agreement-detail?id=${id}`
  55. });
  56. },
  57. checkUpdate() {
  58. uni.showToast({ title: '已是最新版本', icon: 'none' });
  59. },
  60. getAppVersion() {
  61. // #ifdef APP-PLUS
  62. plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
  63. this.version = widgetInfo.version || '2.0.6';
  64. });
  65. // #endif
  66. // #ifndef APP-PLUS
  67. const systemInfo = uni.getSystemInfoSync();
  68. this.version = systemInfo.appVersion || '2.0.6';
  69. // #endif
  70. }
  71. }
  72. }
  73. </script>
  74. <style>
  75. page {
  76. background-color: #F8F8F8;
  77. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  78. }
  79. .custom-header {
  80. position: fixed;
  81. top: 0;
  82. left: 0;
  83. width: 100%;
  84. height: 88rpx;
  85. padding-top: var(--status-bar-height);
  86. background-color: #fff;
  87. display: flex;
  88. align-items: center;
  89. justify-content: space-between;
  90. padding-left: 30rpx;
  91. padding-right: 30rpx;
  92. box-sizing: content-box;
  93. z-index: 100;
  94. }
  95. .header-placeholder {
  96. height: calc(88rpx + var(--status-bar-height));
  97. }
  98. .back-icon {
  99. width: 40rpx;
  100. height: 40rpx;
  101. }
  102. .header-title {
  103. font-size: 32rpx;
  104. font-weight: bold;
  105. color: #333;
  106. }
  107. .header-right {
  108. width: 40rpx;
  109. }
  110. .container {
  111. padding: 20rpx 30rpx;
  112. }
  113. .logo-area {
  114. display: flex;
  115. flex-direction: column;
  116. align-items: center;
  117. justify-content: center;
  118. padding: 100rpx 0 60rpx;
  119. }
  120. .app-logo {
  121. width: 160rpx;
  122. height: 160rpx;
  123. border-radius: 30rpx;
  124. margin-bottom: 20rpx;
  125. /* gradient background is usually part of the logo image itself, assuming logo.png is complete */
  126. }
  127. .app-name {
  128. font-size: 36rpx;
  129. font-weight: bold;
  130. color: #333;
  131. margin-bottom: 10rpx;
  132. }
  133. .app-version {
  134. font-size: 28rpx;
  135. color: #999;
  136. }
  137. .group-card {
  138. background-color: #fff;
  139. border-radius: 20rpx;
  140. padding: 0 30rpx;
  141. }
  142. .list-item {
  143. display: flex;
  144. justify-content: space-between;
  145. align-items: center;
  146. height: 100rpx;
  147. border-bottom: 1px solid #F5F5F5;
  148. }
  149. .list-item.no-border {
  150. border-bottom: none;
  151. }
  152. .item-title {
  153. font-size: 28rpx;
  154. color: #333;
  155. }
  156. .item-right {
  157. display: flex;
  158. align-items: center;
  159. }
  160. .arrow-icon {
  161. width: 28rpx;
  162. height: 28rpx;
  163. opacity: 0.5;
  164. margin-left: 10rpx;
  165. }
  166. .badge-yellow {
  167. width: 36rpx;
  168. height: 36rpx;
  169. background-color: #FFC107;
  170. color: #fff;
  171. font-size: 24rpx;
  172. line-height: 36rpx;
  173. text-align: center;
  174. border-radius: 6rpx;
  175. }
  176. </style>