master
qier222 4 years ago
parent 5b6619d1de
commit 6ce9055484
No known key found for this signature in database
GPG Key ID: 9C85007ED905F14D

@ -117,7 +117,7 @@ const createRequest = (method, url, data, options) => {
headers: headers, headers: headers,
data: queryString.stringify(data), data: queryString.stringify(data),
httpAgent: new http.Agent({ keepAlive: true }), httpAgent: new http.Agent({ keepAlive: true }),
httpsAgent: new https.Agent({ keepAlive: true }), httpsAgent: new https.Agent({ keepAlive: true, rejectUnauthorized: false }),
} }
if (options.crypto === 'eapi') settings.encoding = null if (options.crypto === 'eapi') settings.encoding = null

@ -46,7 +46,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapState(['showLyrics', 'showLibraryDefault', 'player']), ...mapState(['showLyrics', 'settings', 'player']),
isAccountLoggedIn() { isAccountLoggedIn() {
return isAccountLoggedIn(); return isAccountLoggedIn();
}, },
@ -69,7 +69,7 @@ export default {
}, },
}, },
created() { created() {
this.showLibraryDefault && this.$router.push('/library'); this.settings.showLibraryDefault && this.$router.push('/library');
if (this.isElectron) ipcRenderer(this); if (this.isElectron) ipcRenderer(this);
window.addEventListener('keydown', this.handleKeydown); window.addEventListener('keydown', this.handleKeydown);
this.fetchData(); this.fetchData();

@ -11,7 +11,7 @@
<vue-slider <vue-slider
v-model="player.progress" v-model="player.progress"
:min="0" :min="0"
:max="player.currentTrackDuration + 1" :max="player.currentTrackDuration"
:interval="1" :interval="1"
:drag-on-click="true" :drag-on-click="true"
:duration="0" :duration="0"
@ -19,6 +19,7 @@
:height="2" :height="2"
:tooltip-formatter="formatTrackTime" :tooltip-formatter="formatTrackTime"
:lazy="true" :lazy="true"
:silent="true"
></vue-slider> ></vue-slider>
</div> </div>
<div class="controls"> <div class="controls">

@ -24,18 +24,6 @@ const updatePlayer = () => {
let appVersion = localStorage.getItem('appVersion'); let appVersion = localStorage.getItem('appVersion');
if (appVersion === `"0.2.5"`) parsedData = {}; // 0.2.6版本重构了player if (appVersion === `"0.2.5"`) parsedData = {}; // 0.2.6版本重构了player
const data = { const data = {
_repeatMode: 'off',
_shuffle: false,
_list: [],
_current: 0,
_playlistSource: {},
_volume: 1,
_volumeBeforeMuted: 1,
_currentTrack: {},
_playNextList: [],
_enabled: false,
_shuffledList: [],
_shuffledCurrent: 0,
...parsedData, ...parsedData,
}; };
localStorage.setItem('player', JSON.stringify(data)); localStorage.setItem('player', JSON.stringify(data));

@ -21,7 +21,7 @@
> >
</div> </div>
<div class="buttons"> <div class="buttons">
<ButtonTwoTone :icon-class="play" @click.native="playPopularSongs()"> <ButtonTwoTone icon-class="play" @click.native="playPopularSongs()">
{{ $t('common.play') }} {{ $t('common.play') }}
</ButtonTwoTone> </ButtonTwoTone>
<ButtonTwoTone color="grey" @click.native="followArtist"> <ButtonTwoTone color="grey" @click.native="followArtist">

@ -77,7 +77,7 @@
<vue-slider <vue-slider
v-model="player.progress" v-model="player.progress"
:min="0" :min="0"
:max="player.currentTrackDuration + 1" :max="player.currentTrackDuration"
:interval="1" :interval="1"
:drag-on-click="true" :drag-on-click="true"
:duration="0" :duration="0"
@ -85,6 +85,7 @@
:height="2" :height="2"
:tooltip-formatter="formatTrackTime" :tooltip-formatter="formatTrackTime"
:lazy="true" :lazy="true"
:silent="true"
></vue-slider> ></vue-slider>
</div> </div>
<span>{{ formatTrackTime(player.currentTrackDuration) }}</span> <span>{{ formatTrackTime(player.currentTrackDuration) }}</span>
@ -221,17 +222,6 @@ export default {
bgImageUrl() { bgImageUrl() {
return this.player.currentTrack?.al?.picUrl + '?param=500y500'; return this.player.currentTrack?.al?.picUrl + '?param=500y500';
}, },
progress: {
get() {
return this.playerRef.progress;
},
set(value) {
this.playerRef.setProgress(value);
},
},
progressMax() {
return this.playerRef.progressMax;
},
lyricWithTranslation() { lyricWithTranslation() {
let ret = []; let ret = [];
// //
@ -268,9 +258,6 @@ export default {
fontSize: `${this.$store.state.settings.lyricFontSize || 28}px`, fontSize: `${this.$store.state.settings.lyricFontSize || 28}px`,
}; };
}, },
playerRef() {
return this.$parent.$refs.player ? this.$parent.$refs.player : {};
},
noLyric() { noLyric() {
return this.lyric.length == 0; return this.lyric.length == 0;
}, },

@ -503,7 +503,8 @@ export default {
}, },
enableUnblockNeteaseMusic: { enableUnblockNeteaseMusic: {
get() { get() {
return this.settings.enableUnblockNeteaseMusic || true; const value = this.settings.enableUnblockNeteaseMusic;
return value !== undefined ? value : true;
}, },
set(value) { set(value) {
this.$store.commit('updateSettings', { this.$store.commit('updateSettings', {

Loading…
Cancel
Save