mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-14 14:50:50 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b18d9eba3 |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,18 +1,9 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
## v3.9.0
|
## v3.9.1
|
||||||
### ✨ 新功能
|
|
||||||
- 添加歌曲右键菜单功能,支持添加到歌单、创建歌单、取消收藏等操作
|
|
||||||
- 添加下一首播放功能(右键歌曲)
|
|
||||||
- 添加自动播放和自动保存正在播放列表功能(设置->播放设置->自动播放)
|
|
||||||
- 优化歌词滚动体验
|
|
||||||
|
|
||||||
### ⚡ 优化
|
|
||||||
- 升级 Electron 版本和相关依赖包
|
|
||||||
- 优化播放体验和代码结构
|
|
||||||
|
|
||||||
### 🐞 修复
|
### 🐞 修复
|
||||||
- 修复我的收藏查看更多跳转空白页的问题
|
- 修复登录状态问题 修复播放退出登录的问题
|
||||||
|
|
||||||
|
|
||||||
## 咖啡☕️
|
## 咖啡☕️
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "AlgerMusicPlayer",
|
"name": "AlgerMusicPlayer",
|
||||||
"version": "3.9.0",
|
"version": "3.9.1",
|
||||||
"description": "Alger Music Player",
|
"description": "Alger Music Player",
|
||||||
"author": "Alger <algerkc@qq.com>",
|
"author": "Alger <algerkc@qq.com>",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
|
|||||||
@@ -14,16 +14,20 @@ export const getMusicQualityDetail = (id: number) => {
|
|||||||
|
|
||||||
// 根据音乐Id获取音乐播放URl
|
// 根据音乐Id获取音乐播放URl
|
||||||
export const getMusicUrl = async (id: number) => {
|
export const getMusicUrl = async (id: number) => {
|
||||||
|
// 判断是否登录
|
||||||
|
if (store.state.user) {
|
||||||
const res = await request.get('/song/download/url/v1', {
|
const res = await request.get('/song/download/url/v1', {
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
level: store.state.setData.musicQuality || 'higher'
|
level: store.state.setData.musicQuality || 'higher',
|
||||||
|
cookie: `${localStorage.getItem('token')} os=pc;`
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.data.data.url) {
|
if (res.data.data.url) {
|
||||||
return { data: { data: [{ ...res.data.data }] } };
|
return { data: { data: [{ ...res.data.data }] } };
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return await request.get('/song/url/v1', {
|
return await request.get('/song/url/v1', {
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
4
src/renderer/components.d.ts
vendored
4
src/renderer/components.d.ts
vendored
@@ -27,14 +27,11 @@ declare module 'vue' {
|
|||||||
NInput: typeof import('naive-ui')['NInput']
|
NInput: typeof import('naive-ui')['NInput']
|
||||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||||
NLayout: typeof import('naive-ui')['NLayout']
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
NList: typeof import('naive-ui')['NList']
|
|
||||||
NListItem: typeof import('naive-ui')['NListItem']
|
|
||||||
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
|
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
|
||||||
NModal: typeof import('naive-ui')['NModal']
|
NModal: typeof import('naive-ui')['NModal']
|
||||||
NPopover: typeof import('naive-ui')['NPopover']
|
NPopover: typeof import('naive-ui')['NPopover']
|
||||||
NProgress: typeof import('naive-ui')['NProgress']
|
NProgress: typeof import('naive-ui')['NProgress']
|
||||||
NRadio: typeof import('naive-ui')['NRadio']
|
NRadio: typeof import('naive-ui')['NRadio']
|
||||||
NRadioButton: typeof import('naive-ui')['NRadioButton']
|
|
||||||
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
|
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
|
||||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||||
NSelect: typeof import('naive-ui')['NSelect']
|
NSelect: typeof import('naive-ui')['NSelect']
|
||||||
@@ -46,7 +43,6 @@ declare module 'vue' {
|
|||||||
NTabs: typeof import('naive-ui')['NTabs']
|
NTabs: typeof import('naive-ui')['NTabs']
|
||||||
NTag: typeof import('naive-ui')['NTag']
|
NTag: typeof import('naive-ui')['NTag']
|
||||||
NTooltip: typeof import('naive-ui')['NTooltip']
|
NTooltip: typeof import('naive-ui')['NTooltip']
|
||||||
NTransfer: typeof import('naive-ui')['NTransfer']
|
|
||||||
NVirtualList: typeof import('naive-ui')['NVirtualList']
|
NVirtualList: typeof import('naive-ui')['NVirtualList']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ request.interceptors.request.use(
|
|||||||
};
|
};
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
if (token) {
|
if (token) {
|
||||||
config.params.cookie = `${token} os=pc;`;
|
config.params.cookie = config.params.cookie || token;
|
||||||
}
|
}
|
||||||
if (isElectron) {
|
if (isElectron) {
|
||||||
const proxyConfig = setData?.proxyConfig;
|
const proxyConfig = setData?.proxyConfig;
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ onBeforeUnmount(() => {
|
|||||||
const checkLoginStatus = () => {
|
const checkLoginStatus = () => {
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
const userData = localStorage.getItem('user');
|
const userData = localStorage.getItem('user');
|
||||||
|
console.log('触发了', token, userData);
|
||||||
|
|
||||||
if (!token || !userData) {
|
if (!token || !userData) {
|
||||||
router.push('/login');
|
router.push('/login');
|
||||||
@@ -152,6 +153,10 @@ const loadPage = async () => {
|
|||||||
// 检查登录状态
|
// 检查登录状态
|
||||||
if (!checkLoginStatus()) return;
|
if (!checkLoginStatus()) return;
|
||||||
|
|
||||||
|
await loadData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const loadData = async () => {
|
||||||
try {
|
try {
|
||||||
infoLoading.value = true;
|
infoLoading.value = true;
|
||||||
|
|
||||||
@@ -188,10 +193,10 @@ const loadPage = async () => {
|
|||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value.path,
|
() => router.currentRoute.value.path,
|
||||||
(newPath) => {
|
(newPath) => {
|
||||||
|
console.log('newPath', newPath);
|
||||||
if (newPath === '/user') {
|
if (newPath === '/user') {
|
||||||
checkLoginStatus();
|
checkLoginStatus();
|
||||||
} else {
|
loadData();
|
||||||
loadPage();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user