| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <view>
- <view class="bg-img" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/5f263a5a6e7c4f2493e0325f28ab659a-bgimg.png');height: 310upx;"></view>
- <block v-for="(item, index) in boostList" :key="index">
- <view class="flex align-center justify-between boder">
- <view class="flex align-center">
- <view class="padding-sm">
- <u-avatar :src="item.image" size="82"></u-avatar>
- </view>
- <view>
- <view class="name">{{item.name}}</view>
- <view class="time padding-top-xs">{{item.time}}</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.hotValue}}热力值</view>
- </view>
- </block>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- boostList: [],
- userId: '',
- current: 0,
- size: 30,
- }
- },
- onLoad() {
- this.userId = uni.getStorageSync("userId") || -1;
- this.getMyBoostList();
- },
- onReachBottom() {
- if (this.boostList.length < this.current * this.size) {
- this.status = true;
- } else {
- this.current += 1;
- this.getMyBoostList();
- }
- },
- methods: {
- getMyBoostList() {
- this.$u.api.boost.myBoost({senderId: this.userId, current: this.current, size: this.size}).then(res => {
- this.boostList = [...this.boostList,...res.records];
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .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>
|