liyongli 2 anni fa
parent
commit
cfedab0314

+ 1 - 1
package.json

@@ -3,7 +3,7 @@
   "version": "0.0.0",
   "description": "",
   "scripts": {
-    "dev": "vite --mode development",
+    "dev": "vite --mode development --open",
     "build": "vite build --mode production",
     "serve": "vite preview"
   },

+ 4 - 0
src/assets/style/CommonBigScreenHome.css

@@ -247,3 +247,7 @@
   cursor: pointer;
   font-weight: 500;
 }
+
+.ismore{
+    width: 1em;
+}

+ 13 - 2
src/pages/CommonBigScreen/Home.jsx

@@ -45,10 +45,12 @@ function BigScreenHome() {
             if (r.code != 0) return
             const d = r.data || {};
             setoriData(d || {})
+            console.log(d)
             setHeadTitle([
                 {
                     title: "传统媒体-覆盖终端",
                     color: "rgb(153,204,255)",
+                    isMore: d.media_overview.data.totalUser > d.media_overview.data.yesterday.totalUser,
                     value: d.media_overview.data.totalUser,
                     path: [
                         {
@@ -60,6 +62,7 @@ function BigScreenHome() {
                 {
                     title: "传统媒体-日活跃用户",
                     color: "rgb(0,255,0)",
+                    isMore: d.media_overview.data.activeUser > d.media_overview.data.yesterday.activeUser,
                     value: d.media_overview.data.activeUser,
                     path: [
                         {
@@ -95,6 +98,7 @@ function BigScreenHome() {
                 {
                     title: "传统媒体-日收视次数",
                     color: "rgb(153,204,0)",
+                    isMore: d.media_overview.data.timeCount > d.media_overview.data.yesterday.timeCount,
                     value: d.media_overview.data.timeCount,
                     key: '次',
                     path: [
@@ -107,7 +111,8 @@ function BigScreenHome() {
                 {
                     title: "传统媒体-日收视时长",
                     color: "rgb(0,153,255)",
-                    value: (d.media_overview.data.watchCount).toFixed(0),
+                    isMore: d.media_overview.data.watchCount > d.media_overview.data.yesterday.watchCount,
+                    value: d.media_overview.data.watchCount,
                     key: '小时',
                     path: [
                         {
@@ -252,7 +257,13 @@ function BigScreenHome() {
                                     </svg>
                                 </div>
                                 <div class="text">
-                                    <span class="textNum" style={{color: title.color}}>{utils.formatNumber(title.value, 2) + (title.key || "")}</span>
+                                    <span class="textNum" style={{ color: title.color }}>{utils.formatNumber(title.value, 2) + (title.key || "")}</span>
+                                    <Show when={title.isMore != undefined && title.isMore}>
+                                        <img class='ismore' src="http://113.142.79.114:8088/webroot/decision/view/form?id=__ImageCache__6EC5222330C7FC9FAF3990694813298C&cache=true&op=fr_attach&cmd=ah_image" alt="" />
+                                    </Show>
+                                    <Show when={title.isMore != undefined && !title.isMore}>
+                                        <img class='ismore' src="http://113.142.79.114:8088/webroot/decision/view/form?id=__ImageCache__9BDF358E558CEB46CAEE84D3F097E798&cache=true&op=fr_attach&cmd=ah_image" alt="" />
+                                    </Show>
                                     <br />
                                     {title.title}
                                 </div>

+ 31 - 24
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,7 +33,7 @@ function setTQ(TQ) {
 
 function BigScreenHome() {
     const [HeadTitle, setHeadTitle] = createSignal();
-    const [Changeindex, setChangeindex] = createSignal(true);
+    // const [Changeindex, setChangeindex] = createSignal(true);
     const [proTv, setproTv] = createSignal([
         {
             text: "陕台频道收视率",
@@ -52,10 +52,6 @@ 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))
@@ -216,7 +212,10 @@ function BigScreenHome() {
                     value: d.cm_tv_overview.data.loyalty
                 },
             ])
+
+            // new window.Swiper('.selfSwiper')
         })
+
         // TODO: 浏览器获取定位权限
         // const location = navigator.geolocation || false;
         // if (!location) return
@@ -346,25 +345,33 @@ function BigScreenHome() {
                             />
                         </Show>
                         <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}
-                                    list={oriData.media_read_trend.data}
-                                    width={Math.floor($ele.offsetWidth - 20)}
-                                    height={(mainHeight - 104) / 3}
-                                />
-                            </Show>
+                            {/* <div class="swiper-container selfSwiper">
+                                <div class="swiper-wrapper">
+                                    <div class="swiper-slide"> */}
+                                        <Show when={oriData.media_read_trend && oriData.media_read_trend.name}>
+                                            <SelfPlatform
+                                                styleCss={{ marginBottom: '6px' }}
+                                                title={oriData.media_read_trend.name}
+                                                list={oriData.media_read_trend.data}
+                                                width={Math.floor($ele.offsetWidth - 20)}
+                                                height={(mainHeight - 104) / 3}
+                                            />
+                                        </Show>
+                                    {/* </div>
+                                    <div class="swiper-slide">
+                                        <Show when={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>
+                                </div>
+                            </div> */}
 
-                            <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

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

@@ -269,16 +269,12 @@ function Map(prop) {
         TrendChart()
     })
 
-    const openBigData = () => {
-        window.open("http://djweb.smcic.net/centerRelay/center.html?" + Date.now())
-    }
     return (
         <div class="livRang map" style={{
             width: `${prop.width}px`
         }}>
             <div class="head">
                 {prop.title}
-                <div onClick={openBigData} class="btn">大数据平台登录入口</div>
             </div>
             <div ref={$canvas} style={{
                 width: `${prop.width}px`,