index.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <script lang="ts" setup>
  2. import { storeToRefs } from 'pinia'
  3. import { ref } from 'vue'
  4. import CustomNavigationBar from '@/components/CustomNavigationBar.vue'
  5. import { LOGIN_PAGE } from '@/router/config'
  6. import { useUserStore } from '@/store'
  7. import { useTokenStore } from '@/store/token'
  8. import { changtime, menuButtonInfo, safeAreaInsets, systemInfo } from '@/utils'
  9. definePage({
  10. style: {
  11. navigationBarTitleText: '解锁收益',
  12. navigationStyle: 'custom',
  13. },
  14. })
  15. const userStore = useUserStore()
  16. const tokenStore = useTokenStore()
  17. // 使用storeToRefs解构userInfo
  18. const { userInfo } = storeToRefs(userStore)
  19. function menuClick(page: string) {
  20. uni.navigateTo({
  21. url: `/pages-A/${page}/index`,
  22. })
  23. }
  24. const show = ref(false)
  25. const filterValue = ref(Number(new Date()))
  26. function confirm() {
  27. // 函数实现
  28. show.value = false
  29. }
  30. function cancel() {
  31. show.value = false
  32. }
  33. function close() {
  34. show.value = false
  35. }
  36. function showTimeFilter() {
  37. show.value = true
  38. }
  39. const activeTab = ref('pending')
  40. function changeTab(tab: string) {
  41. activeTab.value = tab
  42. }
  43. const unlockAmount = ref('')
  44. </script>
  45. <template>
  46. <view class="profile-container">
  47. <!-- 自定义导航栏 -->
  48. <CustomNavigationBar title="解锁收益" background-color="transparent" />
  49. <!-- 顶部区域 -->
  50. <view class="income-header" style="background: url('../../static/images/income/income-bg.png') no-repeat center center; background-size: cover;">
  51. <view class="income-header-avatar-info" :style="{ paddingTop: `${safeAreaInsets.top + menuButtonInfo.height + 12}px` }">
  52. <view class="income-header-balance">
  53. 锁定余额(元)
  54. </view>
  55. <view class="income-header-balance-num">
  56. <view class="income-header-balance-num-amount">
  57. 7297491.08
  58. </view>
  59. <view class="income-header-balance-num-btns">
  60. <view class="income-header-balance-num-btn js">
  61. 查看解锁规则
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="income-header-tips">
  67. <view class="income-header-tips-item">
  68. <view class="income-header-tips-item-num">
  69. 729000.00
  70. </view>
  71. <view class="income-header-tips-item-des">
  72. 锁定金额
  73. </view>
  74. </view>
  75. <view class="income-header-tips-item">
  76. <view class="income-header-tips-item-num">
  77. 1,125
  78. </view>
  79. <view class="income-header-tips-item-des">
  80. 未结算金额
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. <!-- 菜单 -->
  86. <view class="income-header-menu">
  87. <view class="income-header-menu-title">
  88. 充值解锁金额
  89. </view>
  90. <view class="income-header-menu-input">
  91. <text class="income-header-menu-input-symbol">¥</text>
  92. <u-input
  93. v-model="unlockAmount"
  94. type="number"
  95. border="none"
  96. placeholder="请输入解锁金额"
  97. />
  98. </view>
  99. </view>
  100. <view class="income-header-menu-btn">
  101. 立即充值
  102. </view>
  103. </view>
  104. </template>
  105. <style lang="scss" scoped>
  106. ::v-deep .u-input__content__field-wrapper__field {
  107. height: 80rpx !important;
  108. font-size: 80rpx !important;
  109. }
  110. .profile-container {
  111. font-family: Alibaba PuHuiTi;
  112. min-height: 100vh;
  113. background-color: #f5f5f5;
  114. line-height: 1;
  115. // padding-top: 44px; /* 为固定导航栏留出空间 */
  116. .income-header {
  117. height: 525rpx;
  118. .income-header-avatar-info {
  119. display: flex;
  120. flex-direction: column;
  121. gap: 30rpx;
  122. padding: 0 24rpx;
  123. .income-header-balance {
  124. font-weight: 400;
  125. font-size: 26rpx;
  126. color: #ffffff;
  127. }
  128. .income-header-balance-num {
  129. display: flex;
  130. justify-content: space-between;
  131. align-items: center;
  132. .income-header-balance-num-amount {
  133. font-weight: 500;
  134. font-size: 65rpx;
  135. color: #ffffff;
  136. }
  137. .income-header-balance-num-btns {
  138. display: flex;
  139. gap: 15rpx;
  140. .income-header-balance-num-btn {
  141. padding: 20rpx 40rpx;
  142. border-radius: 33rpx;
  143. font-weight: 400;
  144. font-size: 26rpx;
  145. &.js {
  146. background: #da4c47;
  147. color: #ffffff;
  148. }
  149. &.tx {
  150. background: #bfbfbf;
  151. color: #747474;
  152. }
  153. }
  154. }
  155. }
  156. }
  157. .income-header-tips {
  158. height: 124rpx;
  159. display: flex;
  160. background: linear-gradient(114deg, #f67873, #fb847f, #f67873);
  161. border-radius: 10rpx;
  162. margin: 47rpx 24rpx 0 24rpx;
  163. .income-header-tips-item {
  164. flex: 1;
  165. display: flex;
  166. flex-direction: column;
  167. justify-content: center;
  168. align-items: center;
  169. gap: 15rpx;
  170. font-weight: 500;
  171. font-size: 30rpx;
  172. color: #ffffff;
  173. line-height: 1;
  174. position: relative;
  175. &:first-child:after {
  176. content: '';
  177. position: absolute;
  178. top: 50%;
  179. right: 0;
  180. transform: translateY(-50%);
  181. width: 2px;
  182. height: 40rpx;
  183. background: #ffffff;
  184. }
  185. .income-header-tips-item-num {
  186. font-weight: bold;
  187. }
  188. .income-header-tips-item-des {
  189. font-weight: 400;
  190. font-size: 24rpx;
  191. color: #ffffff;
  192. }
  193. }
  194. }
  195. }
  196. .income-header-menu {
  197. background: #ffffff;
  198. border-radius: 10rpx;
  199. margin: 24rpx 24rpx 0;
  200. margin-top: -30rpx;
  201. .income-header-menu-title {
  202. font-weight: 400;
  203. font-size: 26rpx;
  204. color: #333333;
  205. padding: 34rpx 20rpx;
  206. border-bottom: 2rpx solid #eeeeee;
  207. }
  208. .income-header-menu-input {
  209. display: flex;
  210. align-items: flex-end;
  211. gap: 17rpx;
  212. padding: 66rpx 20rpx;
  213. .income-header-menu-input-symbol {
  214. font-weight: 400;
  215. font-size: 60rpx;
  216. color: #333333;
  217. }
  218. }
  219. }
  220. .income-header-menu-btn {
  221. width: 600rpx;
  222. line-height: 80rpx;
  223. background: linear-gradient(90deg, #ee6b67 0%, #ff7d78 100%);
  224. border-radius: 10rpx;
  225. margin: 100rpx auto 0;
  226. font-weight: 400;
  227. font-size: 30rpx;
  228. color: #ffffff;
  229. text-align: center;
  230. }
  231. }
  232. </style>