|
@@ -1,29 +1,32 @@
|
|
<template>
|
|
<template>
|
|
<view class="app-container">
|
|
<view class="app-container">
|
|
<!-- 背景 -->
|
|
<!-- 背景 -->
|
|
- <view class="bg" />
|
|
|
|
|
|
+ <view class="bg" :style="{'background': `url(${data.channelPic})no-repeat 100% / cover`}" />
|
|
<!-- 跳转App -->
|
|
<!-- 跳转App -->
|
|
- <open-app />
|
|
|
|
|
|
+ <open-app :page="1" :channel="data.channelId" />
|
|
<!-- 详情 -->
|
|
<!-- 详情 -->
|
|
<view class="detail">
|
|
<view class="detail">
|
|
- <img src="@/static/logo.png" />
|
|
|
|
|
|
+ <img :src="data.channelPic" />
|
|
<view class="content">
|
|
<view class="content">
|
|
- <view class="title">我的声色犬马</view>
|
|
|
|
- <text class="tips">直播频道</text>
|
|
|
|
- <view class="num">3个电台</view>
|
|
|
|
|
|
+ <view class="title">{{ data.aliasName }}</view>
|
|
|
|
+ <view class="num">
|
|
|
|
+ <text class="tips">{{ data.channelTypeText }}</text>
|
|
|
|
+ <text>{{ data.count }}个{{ data.channelTypeText }}</text>
|
|
|
|
+ </view>
|
|
<view class="info">
|
|
<view class="info">
|
|
- <text>频道简介频道简介频道简介频道简介频道简介</text>
|
|
|
|
|
|
+ <text v-if="data.description">{{ data.description }}</text>
|
|
|
|
+ <text v-else>暂无描述</text>
|
|
<uni-icons />
|
|
<uni-icons />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<view class="list">
|
|
<view class="list">
|
|
- <view class="item" v-for="item in 3" :key="item" @click="getNav">
|
|
|
|
- <img class="logo" src="@/static/logo.png" />
|
|
|
|
|
|
+ <view class="item" v-for="item in list" :key="item.audioId" @click="getNav(item)">
|
|
|
|
+ <img class="logo" :src="item.audioPic" />
|
|
<view class="title">
|
|
<view class="title">
|
|
- <text>CNR音乐之声</text>
|
|
|
|
- <text>音乐台 国家台</text>
|
|
|
|
|
|
+ <text>{{ item.audioName }}</text>
|
|
|
|
+ <text>{{ item.audioInfo }}</text>
|
|
</view>
|
|
</view>
|
|
<img class="play" src="@/static/playbtn.png" @click.stop="open" />
|
|
<img class="play" src="@/static/playbtn.png" @click.stop="open" />
|
|
</view>
|
|
</view>
|
|
@@ -32,22 +35,61 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { channelAudioPage, channelDetail } from '@/api/share'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
-
|
|
|
|
|
|
+ form: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10
|
|
|
|
+ },
|
|
|
|
+ list: [],
|
|
|
|
+ total: 0,
|
|
|
|
+ data: {}
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onLoad(e) {
|
|
|
|
+ if (e.userId) {
|
|
|
|
+ this.form.userId = e.userId,
|
|
|
|
+ this.form.channelId = e.channelId
|
|
|
|
+ // 频道详情
|
|
|
|
+ channelDetail({
|
|
|
|
+ channelId: e.channelId,
|
|
|
|
+ userId: e.userId
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
+ this.data = res.data.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onReachBottom() {
|
|
|
|
+ if (this.list.length < this.total) {
|
|
|
|
+ this.form.pageSize += 10
|
|
|
|
+ this.getList()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 打开歌单
|
|
|
|
- getNav() {
|
|
|
|
|
|
+ // 列表
|
|
|
|
+ getList() {
|
|
|
|
+ channelAudioPage(this.form).then(res => {
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
+ this.list = res.data.data.records
|
|
|
|
+ this.total = res.data.data.total
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 下一页
|
|
|
|
+ getNav(item) {
|
|
|
|
+ let url = this.data.channelType === 1 || this.data.channelType === 3 ? `/pages/share/controls?channelType=${this.data.channelType}&audioId=${item.audioId}` : `/pages/share/detail?audioId=${item.audioId}`
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/pages/share/detail`
|
|
|
|
|
|
+ url: url
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 打开app
|
|
// 打开app
|
|
- open(){
|
|
|
|
- this.openApp()
|
|
|
|
|
|
+ open() {
|
|
|
|
+ this.openApp(1, this.data.channelId)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -60,7 +102,7 @@ export default {
|
|
left: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 450rpx;
|
|
height: 450rpx;
|
|
- background: linear-gradient(#3b5735, #181818);
|
|
|
|
|
|
+ filter: brightness(0.5) blur(16px);
|
|
z-index: -1;
|
|
z-index: -1;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -75,25 +117,36 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.content {
|
|
.content {
|
|
|
|
+ width: calc(100% - 272rpx);
|
|
margin-left: 32rpx;
|
|
margin-left: 32rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
.title {
|
|
.title {
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
- }
|
|
|
|
-
|
|
|
|
- .tips {
|
|
|
|
- color: rgba(255, 255, 255, 0.7);
|
|
|
|
- font-size: 22rpx;
|
|
|
|
- border: 1px solid rgba(255, 255, 255, 0.15);
|
|
|
|
- border-radius: 20rpx;
|
|
|
|
- padding: 2rpx 16rpx;
|
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
|
|
.num {
|
|
.num {
|
|
- margin: 15rpx 0 35rpx 0;
|
|
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ margin-top: -50rpx;
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
color: rgba(255, 255, 255, 0.7);
|
|
|
|
+
|
|
|
|
+ .tips {
|
|
|
|
+ color: rgba(255, 255, 255, 0.7);
|
|
|
|
+ font-size: 22rpx;
|
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.15);
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
+ padding: 2rpx 16rpx;
|
|
|
|
+ width: fit-content;
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.info {
|
|
.info {
|
|
@@ -103,7 +156,7 @@ export default {
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
|
text {
|
|
text {
|
|
- display: inline-block;
|
|
|
|
|
|
+ display: block;
|
|
width: 360rpx;
|
|
width: 360rpx;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
@@ -124,7 +177,6 @@ export default {
|
|
.list {
|
|
.list {
|
|
margin-top: 80rpx;
|
|
margin-top: 80rpx;
|
|
|
|
|
|
- .item:first-child,
|
|
|
|
.item:last-child {
|
|
.item:last-child {
|
|
margin: 0;
|
|
margin: 0;
|
|
}
|
|
}
|
|
@@ -153,10 +205,20 @@ export default {
|
|
|
|
|
|
text:first-child {
|
|
text:first-child {
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
|
|
+ width: 360rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
+
|
|
text:last-child {
|
|
text:last-child {
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
color: rgba(255, 255, 255, 0.4);
|
|
color: rgba(255, 255, 255, 0.4);
|
|
|
|
+ width: 360rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
+ -webkit-line-clamp: 3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|