liyongli 2 năm trước cách đây
mục cha
commit
1664b00d35

+ 6 - 0
src/assets/style/BigScreenHome.css

@@ -237,3 +237,9 @@
 .newMdia {
   width: 100%;
 }
+
+
+.center{
+    overflow: hidden;
+    position: relative;
+}

+ 1 - 1
src/pages/CommonBigScreen/components/Column_g2.jsx

@@ -119,7 +119,7 @@ function Column(prop) {
                 formatter: n => {
                     const nl = n.split(""), len = nl.length > 6 ? 5 : nl.length, out = [];
                     for (let i = 0; i < len; i++) {
-                        if (i % 3 !== 2 || i === len - 1) {
+                        if (i % 2 !== 1 || i === len - 1) {
                             out.push(nl[i]);
                             continue
                         }

+ 20 - 5
src/pages/bigScreen/Home.jsx

@@ -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}

+ 1 - 1
src/pages/bigScreen/components/Column_g2.jsx

@@ -119,7 +119,7 @@ function Column(prop) {
                 formatter: n => {
                     const nl = n.split(""), len = nl.length > 6 ? 5 : nl.length, out = [];
                     for (let i = 0; i < len; i++) {
-                        if (i % 3 !== 2 || i === len - 1) {
+                        if (i % 2 !== 1 || i === len - 1) {
                             out.push(nl[i]);
                             continue
                         }

+ 0 - 1
src/pages/bigScreen/components/Map-l7.jsx

@@ -218,7 +218,6 @@ function Map(prop) {
     function timeout() {
         // scene.setCenter([source[index].lng, source[index].lat])
         for (let index = 0; index < source.length; index++) {
-            console.log(source[index])
             // anchorLayer && scene.removeAllMakers();
             // textLayer && scene.removeLayer(textLayer);
             var el = document.createElement('div'), son = document.createElement('div');