| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <template>
- <view>
- <view class="searchBar">
- <search-bar :disabled="false" @onSearch="onSearch"></search-bar>
- </view>
- <block v-for="(item, index) in hotList" :key="index">
- <u-line color="#e8e8e8"></u-line>
- <view class="padding-sm flex justify-between align-center bg-white" @click="navWithParm(item.loginWebVO.id)">
- <view class="flex justify-around align-center">
- <view class="padding-right text-center text-black text-bold" style="width: 60upx;">{{item.loginWebVO.rank}}</view>
- <view class="padding-right">
- <u-avatar :src="item.loginWebVO.avatar" size="130"></u-avatar>
- </view>
- <view>
- <view class="text-bold text-black">{{item.loginWebVO.nickName}}</view>
- <view class="margin-tb-xs">{{+item.totalHotValue}} 热力值</view>
- </view>
- </view>
- <view class="padding-right">
- <button class="cu-btn round text-white" style="background-color: #583ce6;height: 68upx;">
- <text class="cuIcon-hotfill padding-right-xs"></text>
- <text>打榜</text>
- </button>
- </view>
- </view>
- </block>
- <view style="height: 80rpx;" v-if="status">
- <u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
- </view>
- </view>
- </template>
- <script>
- import searchBar from "@/components/basic/search-bar.vue";
- export default {
- components: {
- searchBar,
- },
- data() {
- return {
- activityId: '',
- hotList: [],
- current: 1,
- size: 30,
- status: false,
- }
- },
- onLoad(options) {
- this.activityId = options.activityId;
- this.getRankList();
- },
- onReachBottom() {
- if (this.hotList.length < this.current * this.size) {
- this.status = true;
- } else {
- this.current += 1;
- this.getRankList();
- }
- },
- methods: {
- getRankList() {
- this.$u.api.activity.rankList({activityId: this.activityId, size: this.size, current: this.current}).then(res => {
- this.hotList = [...this.hotList,...res.records];
- })
- },
- //跳转需要带惨方法
- navWithParm(id) {
- uni.navigateTo({
- url: "/pages/activityList/activity/boost?activityId=" + this.activityId + "&receiverId=" + id,
- })
- },
- onSearch(value) {
- console.log(value);
- }
- }
- }
- </script>
- <style>
- </style>
|