123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <template>
- <view class="consume-list-box">
- <view class="consume-list">
- <view class="consume-title">
- <text class="consume-title-left"></text>
- <view class="consume-title-text">{{ title }}</view>
- <text class="consume-title-right"></text>
- </view>
- <block v-for="item in list">
- <view class="consume-list-item">
- <view class="item-val">
- <text class="item-val-title">{{ item[keys.title] }}</text>
- <text class="item-val-time">{{ item[keys.time] }}</text>
- </view>
- <view :class="['item-val-num' , item[keys.type] === 1 ? '' : 'red-color']">
- {{ item[keys.type] === 1 ? '+' : '-'}}{{ item[keys.val]}}
- </view>
- </view>
- </block>
- <loadMore v-if="list.length>0 || status === 'loading'" :status="status"></loadMore>
- <nodata v-else :config="{ top: 1, content: '暂无数据~' }"></nodata>
- </view>
- </view>
- </template>
- <script>
- import {
- refillCardInfo
- } from "@/api/personal-center.js"
- export default {
- name: "consume-list",
- props: {
- title: {
- type: String,
- default: ''
- },
- keys: {
- type: Object,
- default: () => {
- return {
- title: 'remark',
- time: 'formatCreateTimeMillis',
- val: 'entryValue',
- type: 'billType'
- }
- }
- },
- status: {
- type: String,
- default: ''
- },
- list: {
- type: Array,
- default: () => {
- return []
- }
- },
- },
- data() {
- return {
- };
- },
- methods: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .consume-list-box{
- width: 100%;
- position: relative;
- }
- .consume-list {
- width: 100%;
- padding: 0 60rpx;
-
- position: absolute;
- top: -113rpx;
- // transform: translateY(-113rpx);
- background-color: #fff;
- border-radius: 40rpx 40rpx 0 0;
- min-height: 120rpx;
- .consume-title {
- background-color: #fff;
- width: 100%;
- height: 113rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 32rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #FA6138;
- }
- .consume-title-text {
- padding: 0 22rpx;
- }
- .consume-title-left {
- width: 60rpx;
- height: 2rpx;
- background: linear-gradient(90deg, #ffffff, #3775f6);
- border-radius: 1px;
- position: relative;
- &:before {
- content: '';
- position: absolute;
- right: 0;
- top: -50%;
- width: 6rpx;
- height: 6rpx;
- background: #FA6138;
- border-radius: 50%;
- }
- }
- .consume-title-right {
- width: 60rpx;
- height: 2rpx;
- background: linear-gradient(270deg, #ffffff, #3775f6);
- border-radius: 1px;
- position: relative;
- &:before {
- content: '';
- position: absolute;
- left: 0;
- top: -50%;
- width: 6rpx;
- height: 6rpx;
- background: #FA6138;
- border-radius: 50%;
- }
- }
- .consume-list-item {
- width: 100%;
- height: 151rpx;
- border-bottom: 1rpx solid #e6e6e6;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- .item-val {
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- display: flex;
- flex-direction: column;
- .item-val-title {
- font-size: 28rpx;
- color: #1a1a1a;
- padding-bottom: 14rpx;
- }
- .item-val-time {
- font-size: 24rpx;
- color: #999999;
- }
- }
- .item-val-num {
- flex-shrink: 0;
- font-size: 30rpx;
- color: #FA6138;
- }
- .red-color{
- color: #FF3B3B;
- }
- }
- }
- </style>
|