| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <view>
- <block v-if="$u.test.isEmpty(boostList)">
- <u-empty margin-top="300" text="暂无数据" mode="list"></u-empty>
- </block>
- <block v-else>
- <block v-for="(item, index) in boostList" :key="index">
- <view class="flex align-center justify-between boder">
- <view class="flex align-center" style="width: 55%;">
- <view class="padding-sm">
- <u-avatar :src="item.loginWebVO.avatar" size="82"></u-avatar>
- </view>
- <view>
- <view class="name">{{item.loginWebVO.nickName}}</view>
- <view class="time padding-top-xs">{{item.createTime}}</view>
- </view>
- </view>
- <view class="text-sm" style="color: #757575;" v-if="item.type==1">{{item.note}}</view>
- <view class="text-sm" style="color: #757575;" v-if="item.type==2">商品兑换</view>
- <view class="text-sm" style="color: #757575;" v-if="item.type==3">奖金提现</view>
- <view class="name padding-right flex justify-end" style="width: 180upx;">{{+item.hotValue}}热力值</view>
- </view>
- </block>
- <view style="height: 80rpx;" v-if="status">
- <u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
- </view>
- </block>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- current: 1,
- size: 30,
- status: false,
- boostList: [],
- }
- },
- onLoad() {
- this.userId = uni.getStorageSync("userId");
- this.getBoostDetail();
- },
- onReachBottom() {
- if (this.boostList.length < this.current * this.size) {
- this.status = true;
- } else {
- this.current += 1;
- this.getBoostDetail();
- }
- },
- methods: {
- getBoostDetail() {
- this.$u.api.boost.list({userId: this.userId, current: this.current, size: this.size}).then(res => {
- this.boostList = [...this.boostList,...res.records];
- })
- }
- }
- }
- </script>
- <style>
- .name {
- font-size: 26upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #111111;
- }
- .time {
- font-size: 22upx;
- font-family: PingFang SC;
- color: #9E9E9E;
- }
- .boder {
- margin: 20upx;
- box-shadow: -1upx -1upx 60upx #d0d0d0;
- border-radius: 30upx;
- }
- </style>
|