| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <template>
- <view>
- <view class="bg-img flex justify-center align-center" style="background-image: url('/static/songRank/songRankBgImg.png');height: 402upx;">
- <view class="title">歌曲排行榜</view>
- </view>
- <view class="flex justify-center align-center padding-bottom">
- <view class="search">
- <text class="cuIcon-search padding-right-xs"></text>
- {{searValue}}
- </view>
- </view>
- <u-sticky h5-nav-height="0">
- <u-tabs :list="list" active-color="#5c40e8" :bold="false" :is-scroll="false" :current="current" @change="change"></u-tabs>
- </u-sticky>
- <view class="flex align-center padding-left" style="margin-top: 40upx;">
- <image src="/static/songRank/medal.png" style="width: 32upx;height: 40upx"></image>
- <view style="font-size: 36upx;font-weight: 800;color: #000000;padding-left: 20upx;">提名歌曲</view>
- </view>
- <block v-for="(item, index) in rankList" :key="index">
- <block v-if="index == 0 || index == 1 || index == 2">
- <view class="margin-sm flex align-center" :class="index == 0 ? 'first' : index == 1 ? 'second' : index == 2 ? 'third' : '' ">
- <u-image width="200" height="200" :src="item.cover" v-if="item.urlsType==1"></u-image>
- <u-image width="200" height="200" :src="item.urls" v-else></u-image>
- <view class="flex justify-between container" :style="{width: (index == 0 ? '70%': index == 1 ? '69%' : index == 2 ? '68%' : '60%')}">
- <view class="left" style="width: 65%;">
- <view class="name text-cut">{{item.title}}</view>
- <view class="padding-tb-sm text-sm">{{item.personName}}</view>
- <view class="hot-value">热力值 {{ +item.hotValue}}</view>
- </view>
- <view class="right">
- <view class="rank" :style="{coloar: (index == 0 ? '#ECDA47': index == 1 ? '#C1D4DA' : index == 2 ? '#C1D4DA' : '')}">
- NO.{{index + 1}}
- </view>
- <view>
- <button class="cu-btn round theme-bg-color sm text-white">
- <text class="cuIcon-hotfill"></text>
- <text class="padding-left-xs">打榜</text>
- </button>
- </view>
- </view>
- </view>
- </view>
- </block>
- <block v-else>
- <view class="flex" style="padding: 10upx 30upx 30upx 40upx;">
- <view class="flex justify-center align-center text-bold text-lg padding-right">{{index + 1}}</view>
- <image v-if="item.urlsType==1" :src="item.cover" style="width: 120upx;height: 120upx;margin-right: 20upx;"></image>
- <image v-else :src="item.urls" style="width: 120upx;height: 120upx;margin-right: 20upx;"></image>
- <view style="width: 70%;">
- <view class="flex justify-between">
- <view class="music" style="width: 75%;">
- <view class="name text-cut">{{item.title}}</view>
- <view class="author">{{item.personName}}</view>
- <view class="hot-vaule">热力值 {{ +item.hotValue}}</view>
- </view>
- <view class="flex align-end">
- <button class="cu-btn round lines-purple sm" style="width: 110upx;">打榜</button>
- </view>
- </view>
- <view class="margin-top-xs"><u-line color="#cacaca"></u-line> </view>
- </view>
- </view>
- </block>
- </block>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- activityId:'1407016573251153922',
-
- current: 0,
- list: [{
- name: '全部'
- }],
- searValue: '不存在的关系 - XMASwu',
- rankList:[],
- }
- },
- onLoad() {
- this.getActivityDetail()
- this.getRankList()
- },
- methods: {
- change(index) {
- this.current = index;
- let name=this.list[index].name.replace("榜",'')
- if (name=='全部') {
- name=""
- }
- this.getRankList(name)
- },
- getActivityDetail(){
- this.$u.api.activity.detail({id:this.activityId}).then(res=>{
- let arr=res.classification.split(",")
- arr.forEach(item=>{
- let obj={
- name:item+'榜'
- }
- this.list.push(obj)
- })
- })
- },
- getRankList(name){
- let params={
- activityId:this.activityId
- }
- if (!this.$u.test.empty(name)) {
- params.personType=name
- }
- this.$u.api.production.list(params).then(res=>{
- this.rankList=res.records
- console.log(res.records);
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .search {
- margin-top: -40upx;
- width: 80%;
- border-radius: 50upx;
- line-height: 60upx;
- background-color: #FFFFFF;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #9D9D9D;
- font-size: 20upx;
- box-shadow: 10upx 20upx 60upx #d8d8d8;
- }
- .title {
- font-size: 56upx;
- font-family: PingFang SC;
- font-weight: 800;
- color: #FFFFFF;
- }
- .first {
- background-color: #fbf8e5;
- border-radius: 20upx;
- box-shadow: -1upx -1upx 60upx #d8d8d8;
- }
- .second {
- background-color: #f0f5f9;
- border-radius: 20upx;
- box-shadow: -1upx -1upx 60upx #d8d8d8;
- margin: 0 30upx;
- }
- .third {
- background-color: #fef0ef;
- border-radius: 20upx;
- box-shadow: -1upx -1upx 60upx #d8d8d8;
- margin: 20upx 40upx;
- }
- .container {
- .left {
- padding-left: 20upx;
- .name {
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: 800;
- color: #000000;
- }
- .hot-value {
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #3F372A;
- }
- }
- .right {
- text-align: center;
- padding-right: 10upx;
- .rank {
- height: 70%;
- font-size: 36upx;
- font-family: PingFang SC;
- font-weight: 800;
- font-style: italic;
- }
- }
- }
- .music {
- .name {
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #000000;
- }
- .author {
- font-size: 14upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #9A9A9A;
- }
- .hot-vaule {
- margin-top: 10upx;
- font-size: 14upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #3F372A;
- }
- }
- .lines-purple::after {
- border-color: #5a3ee8;
- }
- .lines-purple {
- color: #5a3ee8;
- }
- </style>
|