mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add cinema data
This commit is contained in:
parent
0996cd58a0
commit
3f936f6a83
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/custom-navbar.min.css
vendored
2
min/custom-navbar.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar.min.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1322,11 +1322,16 @@ li.nav-item[report-id='playpage_dynamic'] .i-frame,
|
|||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
}
|
}
|
||||||
.custom-navbar .activity-popup-content .loading {
|
.custom-navbar .activity-popup-content .loading,
|
||||||
|
.custom-navbar .bangumi-subscriptions .loading {
|
||||||
|
height: 100%;
|
||||||
|
align-self: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.custom-navbar .activity-popup-content .loading .mdi {
|
.custom-navbar .activity-popup-content .loading .mdi,
|
||||||
|
.custom-navbar .bangumi-subscriptions .loading .mdi {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
@ -1734,6 +1739,9 @@ li.nav-item[report-id='playpage_dynamic'] .i-frame,
|
|||||||
height: 500px;
|
height: 500px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
.custom-navbar .bangumi-subscriptions.loading {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.round-corner .custom-navbar .column-card .cover:first-child {
|
.round-corner .custom-navbar .column-card .cover:first-child {
|
||||||
border-top-left-radius: var(--large-corner-radius);
|
border-top-left-radius: var(--large-corner-radius);
|
||||||
|
|||||||
@ -1444,8 +1444,8 @@ class Subscriptions extends NavbarComponent {
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<transition name="subscriptions-content" mode="out-in">
|
<transition name="subscriptions-content" mode="out-in">
|
||||||
<bangumi-subscriptions v-if="bangumi"></bangumi-subscriptions>
|
<bangumi-subscriptions v-if="bangumi" type="bangumi" :key="'bangumi'"></bangumi-subscriptions>
|
||||||
<cinema-subscriptions v-else></cinema-subscriptions>
|
<bangumi-subscriptions v-else type="cinema" :key="'cinema'"></bangumi-subscriptions>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</div>`
|
</div>`
|
||||||
@ -1459,13 +1459,14 @@ class Subscriptions extends NavbarComponent {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'bangumi-subscriptions': {
|
'bangumi-subscriptions': {
|
||||||
|
props: ['type'],
|
||||||
template: /*html*/`
|
template: /*html*/`
|
||||||
<div class="bangumi-subscriptions">
|
<div class="bangumi-subscriptions" :class="{loading}">
|
||||||
<div v-if="loading" class="loading">
|
<div v-if="loading" class="loading">
|
||||||
<i class="mdi mdi-18px mdi-loading mdi-spin"></i>
|
<i class="mdi mdi-18px mdi-loading mdi-spin"></i>
|
||||||
加载中...
|
加载中...
|
||||||
</div>
|
</div>
|
||||||
<a v-else v-for="card of cards" :href="card.playUrl" target="_blank" class="bangumi-subscriptions-card">
|
<a v-else v-for="card of cards" :key="card.id" :href="card.playUrl" target="_blank" class="bangumi-subscriptions-card">
|
||||||
<dpi-img class="cover" :src="card.coverUrl" :size="{height: 64}"></dpi-img>
|
<dpi-img class="cover" :src="card.coverUrl" :size="{height: 64}"></dpi-img>
|
||||||
<div class="card-info">
|
<div class="card-info">
|
||||||
<h1 class="title">{{card.title}}</h1>
|
<h1 class="title">{{card.title}}</h1>
|
||||||
@ -1487,18 +1488,18 @@ class Subscriptions extends NavbarComponent {
|
|||||||
},
|
},
|
||||||
async mounted () {
|
async mounted () {
|
||||||
try {
|
try {
|
||||||
const json = await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/space/bangumi/follow/list?type=1&pn=1&ps=16&vmid=${userInfo.mid}`)
|
const json = await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/space/bangumi/follow/list?type=${this.type !== 'bangumi' ? '2' : '1'}&pn=1&ps=16&vmid=${userInfo.mid}`)
|
||||||
if (json.code !== 0) {
|
if (json.code !== 0) {
|
||||||
logError(`加载追番信息失败: ${json.message}`)
|
logError(`加载订阅信息失败: ${json.message}`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.cards = json.data.list.map(item => {
|
this.cards = json.data.list.map(item => {
|
||||||
console.log(item)
|
|
||||||
return {
|
return {
|
||||||
title: item.title,
|
title: item.title,
|
||||||
coverUrl: item.square_cover.replace('http:', 'https:'),
|
coverUrl: item.square_cover.replace('http:', 'https:'),
|
||||||
latest: item.new_ep.index_show,
|
latest: item.new_ep.index_show,
|
||||||
progress: item.progress,
|
progress: item.progress,
|
||||||
|
id: item.season_id,
|
||||||
playUrl: `https://www.bilibili.com/bangumi/play/ss${item.season_id}`,
|
playUrl: `https://www.bilibili.com/bangumi/play/ss${item.season_id}`,
|
||||||
mediaUrl: `https://www.bilibili.com/bangumi/media/md${item.media_id}`,
|
mediaUrl: `https://www.bilibili.com/bangumi/media/md${item.media_id}`,
|
||||||
}
|
}
|
||||||
@ -1508,17 +1509,6 @@ class Subscriptions extends NavbarComponent {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'cinema-subscriptions': {
|
|
||||||
template: /*html*/``,
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
cards: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mounted () {
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user