Commit 729d826c by levlin

Merge branch 'test' into dev

parents c46b0feb d4e43f36
......@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.9.1](https://gitlab.aodianyun.com/live/web-radio/compare/v1.9.0...v1.9.1) (2025-01-02)
### Features
* 路由参数支持query ([08c9369](https://gitlab.aodianyun.com/live/web-radio/commit/08c93697083069d5cb01c2fa3a115476d493fc4e))
## [1.9.0](https://gitlab.aodianyun.com/live/web-radio/compare/v1.8.0...v1.9.0) (2024-12-26)
......
{
"name": "ssr-program-radio",
"version": "1.9.0",
"version": "1.9.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ssr-program-radio",
"version": "1.9.0",
"version": "1.9.1",
"dependencies": {
"@gdyfe/config": "^1.5.9",
"@gdyfe/rop-client": "1.1.10",
{
"name": "ssr-program-radio",
"version": "1.9.0",
"version": "1.9.1",
"description": "C端电台直播",
"author": "1006903445@qq.com",
"private": true,
......
......@@ -29,6 +29,7 @@
</template>
<script>
import { mapGetters } from "vuex";
export default {
name: "Timeline",
props: {
......@@ -44,6 +45,7 @@ export default {
};
},
computed: {
...mapGetters({ channelInfo: "channelInfo" }),
timeData() {
let timeArr = [];
const WEEK_CONFIG = {
......@@ -57,8 +59,9 @@ export default {
};
const oneDayTime = 86400000;
const { currentTime } = this;
const playbackDay = this.channelInfo?.playbackDay || 7;
// 创建时间轴数据
for (let i = 0; i <= 7; i++) {
for (let i = 0; i <= playbackDay; i++) {
const leftTimestamp = currentTime - i * oneDayTime;
const leftDate = new Date(leftTimestamp);
const timeData = {
......@@ -88,15 +91,21 @@ export default {
mounted() {
// 老版
this.$nextTick(() => {
// 默认激活第7个tab,也就是“今天”
// 查找"今天"的索引
const todayIndex = this.timeData.findIndex(item => item.week === '今天');
if (todayIndex !== -1) {
this.activeTab = todayIndex;
}
// 默认激活找到的tab
this.scrollTo("activatedItem", this.activeTab);
});
// 新版
this.$Bus.$on('first-playBill', () => {
this.$Bus.$on("first-playBill", () => {
this.$nextTick(() => {
// 同样,在新版逻辑中也查找"今天"的索引
this.scrollTo("activatedItem", this.activeTab);
});
})
});
},
methods: {
changeTab(info, index) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment