mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bugs
This commit is contained in:
parent
254731badf
commit
c9fbdd8e28
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.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -918,7 +918,10 @@ const getActivityTabComponent = ({ dataObject, apiUrl, name, handleJson, templat
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
setInterval(() => this.fetchData(true), Activities.updateInterval)
|
this.interval = setInterval(() => this.fetchData(true), Activities.updateInterval)
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
clearInterval(this.interval)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1032,21 +1035,27 @@ class Activities extends NavbarComponent {
|
|||||||
name: '视频',
|
name: '视频',
|
||||||
component: 'video-activity',
|
component: 'video-activity',
|
||||||
moreUrl: 'https://t.bilibili.com/?tab=8',
|
moreUrl: 'https://t.bilibili.com/?tab=8',
|
||||||
notifyApi: `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${userInfo.mid}&update_num_dy_id=${latestID}&type_list=8`,
|
get notifyApi () {
|
||||||
|
return `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${userInfo.mid}&update_num_dy_id=${Activities.getLatestID()}&type_list=8`
|
||||||
|
},
|
||||||
notifyCount: null,
|
notifyCount: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '番剧',
|
name: '番剧',
|
||||||
component: 'bangumi-activity',
|
component: 'bangumi-activity',
|
||||||
moreUrl: 'https://t.bilibili.com/?tab=512',
|
moreUrl: 'https://t.bilibili.com/?tab=512',
|
||||||
notifyApi: `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${userInfo.mid}&update_num_dy_id=${latestID}&type_list=512`,
|
get notifyApi () {
|
||||||
|
return `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${userInfo.mid}&update_num_dy_id=${Activities.getLatestID()}&type_list=512`
|
||||||
|
},
|
||||||
notifyCount: null,
|
notifyCount: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '专栏',
|
name: '专栏',
|
||||||
component: 'column-activity',
|
component: 'column-activity',
|
||||||
moreUrl: 'https://t.bilibili.com/?tab=64',
|
moreUrl: 'https://t.bilibili.com/?tab=64',
|
||||||
notifyApi: `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${userInfo.mid}&update_num_dy_id=${latestID}&type_list=64`,
|
get notifyApi () {
|
||||||
|
return `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${userInfo.mid}&update_num_dy_id=${Activities.getLatestID()}&type_list=64`
|
||||||
|
},
|
||||||
notifyCount: null,
|
notifyCount: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1277,7 +1286,7 @@ class Activities extends NavbarComponent {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
setInterval(() => {
|
this.interval = setInterval(() => {
|
||||||
for (const tab of this.tabs) {
|
for (const tab of this.tabs) {
|
||||||
if (tab.notifyApi) {
|
if (tab.notifyApi) {
|
||||||
Ajax.getJsonWithCredentials(tab.notifyApi).then(json => {
|
Ajax.getJsonWithCredentials(tab.notifyApi).then(json => {
|
||||||
@ -1290,6 +1299,9 @@ class Activities extends NavbarComponent {
|
|||||||
}
|
}
|
||||||
}, Activities.updateInterval)
|
}, Activities.updateInterval)
|
||||||
},
|
},
|
||||||
|
destroyed() {
|
||||||
|
clearInterval(this.interval)
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedTab (name) {
|
selectedTab (name) {
|
||||||
this.tabs.find(t => t.name === name).notifyCount = null
|
this.tabs.find(t => t.name === name).notifyCount = null
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user