|
@@ -14,7 +14,7 @@ import Activity from "./components/Activity";
|
|
|
import Map from "./components/Map-l7";
|
|
|
// import Map from "./components/Map";
|
|
|
import NewMedia from "./components/NewMedia";
|
|
|
-// import NewMediaTrend from "./components/NewMediaTrend"
|
|
|
+import NewMediaTrend from "./components/NewMediaTrend"
|
|
|
|
|
|
import { getWeather, getData } from "../../api/bigScreen"
|
|
|
const [TimeDate, setTimeDate] = createSignal("");
|
|
@@ -33,6 +33,7 @@ function setTQ(TQ) {
|
|
|
|
|
|
function BigScreenHome() {
|
|
|
const [HeadTitle, setHeadTitle] = createSignal();
|
|
|
+ const [Changeindex, setChangeindex] = createSignal(true);
|
|
|
const [proTv, setproTv] = createSignal([
|
|
|
{
|
|
|
text: "陕台频道收视率",
|
|
@@ -51,6 +52,10 @@ function BigScreenHome() {
|
|
|
let $ele = undefined, mainHeight = document.body.offsetHeight * 0.925 - 124;
|
|
|
|
|
|
onMount(() => {
|
|
|
+ setInterval(() => {
|
|
|
+ setChangeindex(!Changeindex);
|
|
|
+ }, 2000);
|
|
|
+
|
|
|
setTimeDate(dayjs().format('YYYY-MM-DD'));
|
|
|
seteHeight(Math.floor($ele.offsetWidth / 16 * 9) + 70);
|
|
|
getWeather().then(r => setTQ(r.data))
|
|
@@ -340,8 +345,8 @@ function BigScreenHome() {
|
|
|
height={(mainHeight - 104) / 3 + 20}
|
|
|
/>
|
|
|
</Show>
|
|
|
- <Show when={eHeight() > 0 && oriData.media_read_trend && oriData.media_read_trend.name}>
|
|
|
- <div style={{ "margin-bottom": "6px", "margin-top": "6px" }}>
|
|
|
+ <div class="center" style={{ width: Math.floor($ele.offsetWidth - 20) + 'px', height: (mainHeight - 104) / 3 + 30 + 'px', "margin-bottom": "6px", "margin-top": "6px" }}>
|
|
|
+ <Show when={Changeindex && oriData.media_read_trend && oriData.media_read_trend.name}>
|
|
|
<SelfPlatform
|
|
|
styleCss={{ marginBottom: '6px' }}
|
|
|
title={oriData.media_read_trend.name}
|
|
@@ -349,8 +354,18 @@ function BigScreenHome() {
|
|
|
width={Math.floor($ele.offsetWidth - 20)}
|
|
|
height={(mainHeight - 104) / 3}
|
|
|
/>
|
|
|
- </div>
|
|
|
- </Show>
|
|
|
+ </Show>
|
|
|
+
|
|
|
+ <Show when={!Changeindex && oriData.media_spread_trend && oriData.media_spread_trend.name}>
|
|
|
+ <NewMediaTrend
|
|
|
+ styleCss={{ marginBottom: '6px' }}
|
|
|
+ title={oriData.media_spread_trend.name}
|
|
|
+ list={oriData.media_spread_trend.data}
|
|
|
+ width={Math.floor($ele.offsetWidth - 20)}
|
|
|
+ height={(mainHeight - 104) / 3}
|
|
|
+ />
|
|
|
+ </Show>
|
|
|
+ </div>
|
|
|
<Show when={eHeight() > 0 && oriData.media_spread && oriData.media_spread.name}>
|
|
|
<NewMedia
|
|
|
title={oriData.media_spread.name}
|