index.vue 4.7 KB

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