| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <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">
- <view class="flex justify-around align-center">
- <view class="padding-right text-center text-black text-bold" style="width: 60upx;">{{index + 1}}</view>
- <view class="padding-right">
- <u-avatar :src="item.avatar" size="130"></u-avatar>
- </view>
- <view>
- <view class="text-bold text-black">{{item.name}}</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>
- </template>
- <script>
- import searchBar from "@/components/basic/search-bar.vue";
- export default {
- components: {
- searchBar,
- },
- data() {
- return {
- hotList: [],
- }
- },
- onLoad(options) {
- this.getRankList(options.activityId);
- },
- onReachBottom() {
- console.log("到底了")
- },
- methods: {
- getRankList(id) {
- this.$u.api.activity.rankList({activityId: id}).then(res => {
- this.hotList = res.records;
- })
- },
- //跳转需要带惨方法
- navWithParm() {
- uni.navigateTo({
- url: "/pages/activityList/activity/boost"
- })
- },
- onSearch(value) {
- console.log(value);
- }
- }
- }
- </script>
- <style>
- </style>
|