feat: 支持配置音乐播放器开关 #209
This commit is contained in:
parent
6c58920f77
commit
be94711dc8
4
.env
4
.env
@ -47,5 +47,5 @@ VITE_SONG_API = "https://api-meting.imsyy.top/api"
|
||||
VITE_SONG_SERVER = "netease"
|
||||
# 播放类型 ( song-歌曲, playlist-播放列表, album-专辑, search-搜索, artist-艺术家 )
|
||||
VITE_SONG_TYPE = "playlist"
|
||||
# 播放 ID
|
||||
VITE_SONG_ID = "7452421335"
|
||||
# 播放 ID ( 若无需播放器,请设为空即可 )
|
||||
VITE_SONG_ID = ""
|
@ -207,7 +207,7 @@ if (type == 0) {
|
||||
* [高德开放平台](https://lbs.amap.com/)
|
||||
* [Hitokoto 一言](https://hitokoto.cn/)
|
||||
* [MetingAPI By 武恩赐](https://api.wuenci.com/meting/api/)
|
||||
*
|
||||
|
||||
## Star History
|
||||
|
||||
[![Star History Chart](https://api.star-history.com/svg?repos=imsyy/home&type=Date)](https://star-history.com/#imsyy/home&Date)
|
||||
|
@ -4,7 +4,7 @@
|
||||
"github": "https://github.com/imsyy/home",
|
||||
"home": "https://imsyy.top",
|
||||
"private": true,
|
||||
"version": "4.1.2",
|
||||
"version": "4.1.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
|
@ -18,10 +18,12 @@
|
||||
</div>
|
||||
</Transition>
|
||||
<!-- 一言内容 -->
|
||||
<div class="content" @click="updateHitokoto">
|
||||
<Transition name="el-fade-in-linear" mode="out-in">
|
||||
<div :key="hitokotoData.text" class="content" @click="updateHitokoto">
|
||||
<span class="text">{{ hitokotoData.text }}</span>
|
||||
<span class="from">-「 {{ hitokotoData.from }} 」</span>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-col :span="12">
|
||||
<div class="left">
|
||||
<Hitokoto />
|
||||
<Music />
|
||||
<Music v-if="playerHasId" />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -41,6 +41,9 @@ const store = mainStore();
|
||||
const currentTime = ref({});
|
||||
const timeInterval = ref(null);
|
||||
|
||||
// 播放器 id
|
||||
const playerHasId = import.meta.env.VITE_SONG_ID;
|
||||
|
||||
// 更新时间
|
||||
const updateTimeData = () => {
|
||||
currentTime.value = getCurrentTime();
|
||||
|
Loading…
Reference in New Issue
Block a user