珠宝小程序前端代码
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.

134 lines
2.4 KiB

3 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="收支明细"
  4. bgColor="#A3D250"
  5. color="#fff"
  6. leftClick
  7. @leftClick="$utils.navigateBack" />
  8. <view class="bg"/>
  9. <view class="cell">
  10. <view class="cell-top">收支明细</view>
  11. <view class="cell-box"
  12. :key="index"
  13. v-for="(item,index) in list">
  14. <uv-cell-group>
  15. <uv-cell
  16. :title="item.title"
  17. :label="item.createTime"
  18. :center="true">
  19. <template #value>
  20. <view class="cell-text">
  21. <view class="price-text"
  22. v-if="item.type">{{ type[item.type] }}{{ item.money }}</view>
  23. <view class="price-text add"
  24. v-else>{{ type[item.type] }}{{ item.money }}</view>
  25. <view class="tips">{{ state[item.state] }}</view>
  26. </view>
  27. </template>
  28. </uv-cell>
  29. </uv-cell-group>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import mixinsList from '@/mixins/list.js'
  36. import { mapState } from 'vuex'
  37. export default {
  38. mixins : [mixinsList],
  39. data() {
  40. return {
  41. mixinsListApi : 'getWaterPageList',
  42. list : [],
  43. type : ['+', '-'],
  44. state : ['未到账', '已到账'],
  45. }
  46. },
  47. computed: {
  48. ...mapState(['userInfo', 'riceInfo']),
  49. },
  50. onShow() {
  51. this.$store.commit('getUserInfo')
  52. this.$store.commit('getRiceInfo')
  53. },
  54. methods: {
  55. }
  56. }
  57. </script>
  58. <style scoped lang="scss">
  59. .page{
  60. .bg{
  61. background-color: $uni-color;
  62. height: 300rpx;
  63. position: absolute;
  64. left: 0;
  65. width: 100%;
  66. z-index: -1;
  67. border-bottom-left-radius: 30rpx;
  68. border-bottom-right-radius: 30rpx;
  69. }
  70. .price{
  71. color: #FFFFFF;
  72. padding: 40rpx;
  73. .title{
  74. color: #eee;
  75. font-size: 28rpx;
  76. }
  77. .num{
  78. font-size: 50rpx;
  79. font-weight: 900;
  80. margin-top: 10rpx;
  81. }
  82. }
  83. .cell {
  84. margin: 20rpx;
  85. background-color: #FFFFFF;
  86. border-radius: 16rpx;
  87. .cell-top {
  88. padding: 40rpx 34rpx;
  89. color: #474747;
  90. font-size: 34rpx;
  91. font-weight: 600;
  92. position: relative;
  93. &::after{
  94. content: '';
  95. display: block;
  96. position: absolute;
  97. left: 55rpx;
  98. bottom: 38rpx;
  99. height: 10rpx;
  100. width: 120rpx;
  101. background: linear-gradient(to right, #fff, $uni-color);
  102. }
  103. }
  104. .cell-text{
  105. text-align: right;
  106. .price-text{
  107. font-size: 32rpx;
  108. font-weight: 900;
  109. }
  110. .add{
  111. color: #f40;
  112. }
  113. .tips{
  114. font-size: 22rpx;
  115. color: #aaa;
  116. margin-top: 10rpx;
  117. }
  118. }
  119. }
  120. }
  121. </style>