| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view>
- <block v-for="(item, index) in boostList" :key="index">
- <view class="flex align-center justify-between boder">
- <view class="flex align-center" style="width: 50%;">
- <view class="padding-sm">
- <u-avatar :src="item.avatar" size="82"></u-avatar>
- </view>
- <view>
- <view class="name">{{item.nickName}}</view>
- <view class="time padding-top-xs">{{item.createTime}}</view>
- </view>
- </view>
- <view class="text-sm" style="color: #757575;">{{item.type}}</view>
- <view class="name padding-right flex justify-end" style="width: 180upx;">{{item.totalHotValue}}热力值</view>
- </view>
- </block>
- <view style="height: 80rpx;" v-if="status">
- <u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
- </view>
- </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({id: 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: 16upx;
- font-family: PingFang SC;
- color: #9E9E9E;
- }
- .boder {
- margin: 20upx;
- box-shadow: -1upx -1upx 60upx #d0d0d0;
- border-radius: 30upx;
- }
- </style>
|