ckt的看板部分
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

405 lines
9.1 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <div class="container">
  3. <div style="width:100%;height: 25%;text-align:center;">
  4. <TimeC></TimeC>
  5. </div>
  6. <div class="tv_home">
  7. <!-- <router-link class="list1" :to="{ path: '/welcome'}">-->
  8. <!-- <span>{{ row2 }}</span>-->
  9. <!-- </router-link>-->
  10. <!-- <router-link class="list2" :to="{ path: '/welcome'}">-->
  11. <!-- <span>功能1</span>-->
  12. <!-- </router-link>-->
  13. <!-- <router-link class="list3" :to="{ path: '/welcome'}">-->
  14. <!-- <span>功能1</span>-->
  15. <!-- </router-link>-->
  16. <!-- <router-link class="list4" :to="{ path: '/welcome'}">-->
  17. <!-- <span>功能1</span>-->
  18. <!-- </router-link>-->
  19. <!-- <router-link class="list5" :to="{ path: '/welcome'}">-->
  20. <!-- <span>功能1</span>-->
  21. <!-- </router-link>-->
  22. <!-- <router-link class="list6" :to="{ path: '/welcome'}">-->
  23. <!-- <span>功能1</span>-->
  24. <!-- </router-link>-->
  25. <!-- <router-link class="list7" :to="{ path: '/welcome'}">-->
  26. <!-- <span>功能1</span>-->
  27. <!-- </router-link>-->
  28. <!-- <router-link class="list8" :to="{ path: '/welcome'}">-->
  29. <!-- <span>功能1</span>-->
  30. <!-- </router-link>-->
  31. <!-- <router-link class="list9" :to="{ path: '/welcome'}">-->
  32. <!-- <span>功能1</span>-->
  33. <!-- </router-link>-->
  34. <!-- <router-link class="list10" :to="{ path: '/welcome'}">-->
  35. <!-- <span>功能1</span>-->
  36. <!-- </router-link>-->
  37. <!-- <a class="list11" href="javascript:void(0);" @click="play">-->
  38. <!-- <span>功能1</span>-->
  39. <!-- </a>-->
  40. <!--<router-link class="list12" :to="{ path: '/welcome'}">-->
  41. <!-- <span>功能1</span>-->
  42. <!-- </router-link>-->
  43. <!-- <router-link class="list13" :to="{ path: '/welcome'}">-->
  44. <!-- <span>功能1</span>-->
  45. <!-- </router-link>-->
  46. <!-- <router-link class="list14" :to="{ path: '/welcome'}">-->
  47. <!-- <span>功能1</span>-->
  48. <!-- -->
  49. <!-- </router-link>-->
  50. </div>
  51. <p class="clientCode">{{ clientCode }}</p>
  52. </div>
  53. </template>
  54. <script>
  55. import TimeC from "./time"
  56. export default {
  57. name: 'Home',
  58. data() {
  59. return {
  60. row: "",
  61. row2: "",
  62. nextPage: null,
  63. countTimer: null,
  64. countTimer2: null,
  65. jumper:null,
  66. }
  67. },
  68. components: {
  69. TimeC
  70. },
  71. methods: {
  72. //查询跳转配置并定时跳转
  73. play() {
  74. let ip=localStorage.getItem("tvIP")
  75. let that = this;
  76. $.ajax({
  77. url: "/board/getJumpConfig",
  78. type: "post",
  79. data: {"boardName": 'home',"ip":ip},
  80. dataType: "json",
  81. success: (data) => {
  82. if (data.rows2 != "" && data.rows2 != null) {
  83. that.nextPage = data.rows2;
  84. if (data.rows != "" && data.rows != null) {
  85. let jumpTime = Number(data.rows);
  86. if (jumpTime > 0) {
  87. that.countTimer = window.setTimeout(() => {
  88. that.jump();
  89. }, 1000 * jumpTime);
  90. }
  91. }
  92. }
  93. }
  94. })
  95. },
  96. toPlay(){
  97. this.countTimer2=window.setInterval(() => {
  98. this.play();
  99. }, 5000 );
  100. },
  101. getIp(){
  102. $.ajax({
  103. url: "/board/getIpFirst",
  104. type: "post",
  105. data: {},
  106. dataType: "json",
  107. success: (data) => {
  108. localStorage.setItem("tvIP",data.row)
  109. }
  110. }).fail(() => {
  111. localStorage.setItem("tvIP","1.1.1.1")
  112. })
  113. },
  114. jump() {
  115. $.ajax({
  116. url: "/board/kanKanYouMeiYouDiaoXian",
  117. type: "post",
  118. data: {},
  119. dataType: "json",
  120. success: (data) => {
  121. this.$router.push(this.nextPage);
  122. }
  123. }).fail(() => {
  124. this.$router.push("/")
  125. })
  126. },
  127. // doThis(){
  128. // let that = this;
  129. // this.jumper = window.setTimeout(() => {that.play()},1000*4.9);
  130. // }
  131. },
  132. mounted() {
  133. this.getIp();
  134. this.play();
  135. this.toPlay();
  136. },
  137. beforeDestroy() {
  138. clearTimeout(this.countTimer);
  139. clearInterval(this.countTimer2);
  140. // console.log("触发钩子函数")
  141. },
  142. };
  143. </script>
  144. <style scoped>
  145. /*.container {*/
  146. /* background: url("http://gnmro-img.oss-cn-shanghai.aliyuncs.com/tvimg/vmi_tv_bg1.jpg!ora")*/
  147. /* #000 no-repeat center center;*/
  148. /* background-size: cover;*/
  149. /* height: 100vh;*/
  150. /* width: 100vw;*/
  151. /* font-size: 16px;*/
  152. /*}*/
  153. .clientCode {
  154. position: absolute;
  155. right: 0;
  156. bottom: 0;
  157. color: white;
  158. font-size: 13px;
  159. padding: 5px;
  160. }
  161. .tv_home {
  162. position: relative;
  163. color: #fff;
  164. font-weight: bold;
  165. text-align: center;
  166. width: 41.5rem;
  167. height: 22.9rem;
  168. margin-left: auto;
  169. margin-right: auto;
  170. top: 50%;
  171. transform: translateY(-50%);
  172. }
  173. .tv_home a {
  174. display: block;
  175. position: absolute;
  176. border-radius: 2px;
  177. transition: transform 0.3s, box-shadow 0.3s;
  178. overflow: hidden;
  179. color: #fff;
  180. text-decoration: none;
  181. box-shadow: 0px 0px 1rem rgba(255, 213, 51, 0);
  182. }
  183. .tv_home a:hover::before,
  184. .tv_home a:focus::before,
  185. .tv_home a:active::before {
  186. background-color: #fff;
  187. position: absolute;
  188. content: "";
  189. width: 100%;
  190. height: 100%;
  191. left: 0;
  192. top: 0;
  193. animation: light 0.3s alternate forwards;
  194. -webkit-animation: light 0.3s alternate forwards;
  195. }
  196. @keyframes light {
  197. 0% {
  198. opacity: 0;
  199. }
  200. 50% {
  201. opacity: 0.8;
  202. }
  203. 100% {
  204. opacity: 0;
  205. }
  206. }
  207. @-webkit-keyframes light {
  208. 0% {
  209. opacity: 0;
  210. }
  211. 50% {
  212. opacity: 0.6;
  213. }
  214. 100% {
  215. opacity: 0;
  216. }
  217. }
  218. .tv_home a span {
  219. position: absolute;
  220. top: 50%;
  221. color: #fff;
  222. transform: translateY(-50%);
  223. display: block;
  224. text-align: center;
  225. width: 100%;
  226. text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5);
  227. }
  228. .tv_home a:focus,
  229. .tv_home a:hover,
  230. .tv_home a:active {
  231. transform: scale(1.15);
  232. /* transition: all 0.2s; */
  233. z-index: 999;
  234. box-shadow: 0px 0px 20px rgba(255, 255, 255, 1);
  235. border: 2px solid #fff;
  236. color: #fff;
  237. text-decoration: none !important;
  238. }
  239. .list1 {
  240. width: 10rem;
  241. height: 9.5rem;
  242. /* background-color: #de4d4d; */
  243. left: 0;
  244. top: 0;
  245. line-height: 1.4;
  246. font-size: 1.4rem;
  247. background: -webkit-linear-gradient(120deg, #de4d4d, #cf3a3c);
  248. background: linear-gradient(120deg, #de4d4d, #cf3a3c);
  249. }
  250. .list2 {
  251. width: 10rem;
  252. height: 9.5rem;
  253. background-color: #c050a0;
  254. background: -webkit-linear-gradient(120deg, #c050a0, #aa378a);
  255. background: linear-gradient(120deg, #c050a0, #aa378a);
  256. left: 10.5rem;
  257. top: 0;
  258. line-height: 1.4;
  259. font-size: 1.4rem;
  260. }
  261. .list3,
  262. .list4,
  263. .list5,
  264. .list6 {
  265. width: 10rem;
  266. height: 4.5rem;
  267. line-height: 1.2;
  268. font-size: 1rem;
  269. }
  270. .list3 {
  271. background: -webkit-linear-gradient(120deg, #4bca99, #39b686);
  272. background: linear-gradient(120deg, #4bca99, #39b686);
  273. /* background-color: #4bca99; */
  274. left: 21rem;
  275. top: 0;
  276. }
  277. .list4 {
  278. /* background-color: #47cc76; */
  279. background: -webkit-linear-gradient(120deg, #47cc76, #31b05e);
  280. background: linear-gradient(120deg, #47cc76, #31b05e);
  281. left: 31.5rem;
  282. top: 0;
  283. }
  284. .list5 {
  285. /* background-color: #4fb251; */
  286. background: -webkit-linear-gradient(120deg, #4fb251, #369a39);
  287. background: linear-gradient(120deg, #4fb251, #369a39);
  288. left: 21rem;
  289. top: 5rem;
  290. }
  291. .list6 {
  292. /* background-color: #66b72a; */
  293. background: -webkit-linear-gradient(120deg, #66b72a, #59a520);
  294. background: linear-gradient(120deg, #66b72a, #59a520);
  295. left: 31.5rem;
  296. top: 5rem;
  297. }
  298. .list7,
  299. .list8,
  300. .list9,
  301. .list10,
  302. .list11 {
  303. width: 7.9rem;
  304. height: 8rem;
  305. top: 10rem;
  306. line-height: 1.4;
  307. font-size: 1.15rem;
  308. }
  309. .list12,
  310. .list13, .list14 {
  311. width: 13.5rem;
  312. height: 4.5rem;
  313. top: 18.5rem;
  314. line-height: 1.4;
  315. font-size: 1.15rem;
  316. }
  317. .list12 {
  318. background: -webkit-linear-gradient(120deg, #3694f8, #704afb);
  319. background: linear-gradient(120deg, #3694f8, #704afb);
  320. left: 0;
  321. }
  322. .list13 {
  323. background: -webkit-linear-gradient(120deg, #704afb, #3694f8);
  324. background: linear-gradient(120deg, #704afb, #3694f8);
  325. left: 14rem;
  326. }
  327. .list14 {
  328. background: -webkit-linear-gradient(120deg, #1cc0f6, #20d9b8);
  329. background: linear-gradient(120deg, #1cc0f6, #20d9b8);
  330. right: 0;
  331. }
  332. .list7 {
  333. /* background-color: #0c5782; */
  334. background: -webkit-linear-gradient(120deg, #1d6c98, #0c5782);
  335. background: linear-gradient(120deg, #1d6c98, #0c5782);
  336. left: 0;
  337. }
  338. .list8 {
  339. /* background-color: #2293d5; */
  340. background: -webkit-linear-gradient(120deg, #2293d5, #0f78b4);
  341. background: linear-gradient(120deg, #2293d5, #0f78b4);
  342. left: 8.4rem;
  343. }
  344. .list9 {
  345. /* background-color: #e8af27; */
  346. background: -webkit-linear-gradient(120deg, #e8af27, #cc9513);
  347. background: linear-gradient(120deg, #e8af27, #cc9513);
  348. left: 16.8rem;
  349. }
  350. .list10 {
  351. /* background-color: #ea8921; */
  352. left: 25.2rem;
  353. background: -webkit-linear-gradient(120deg, #ea8921, #cf7413);
  354. background: linear-gradient(120deg, #ea8921, #cf7413);
  355. }
  356. .list11 {
  357. /* background-color: #4f99b1; */
  358. background: -webkit-linear-gradient(120deg, #4f99b1, #38859e);
  359. background: linear-gradient(120deg, #4f99b1, #38859e);
  360. left: 33.6rem;
  361. }
  362. </style>