liyongli 2 жил өмнө
parent
commit
8fca00b2fd

+ 73 - 0
src/components/shanshipin.vue

@@ -0,0 +1,73 @@
+<!-- https://cxzx.smcic.net/topic/qinshufa/assets/logp.png -->
+<template>
+  <van-row class="shanshipin">
+    <van-col span="12" style="padding-left: 5px">
+      <img
+        style="
+          width: 30px;
+          border-radius: 5px;
+          vertical-align: middle;
+          margin-right: 5px;
+        "
+        src="https://cxzx.smcic.net/topic/qinshufa/assets/logp.png"
+        alt=""
+        srcset=""
+      />
+      <span style="vertical-align: middle">闪视频</span>
+    </van-col>
+    <van-col span="12" style="text-align: right; padding-right: 5px">
+      <van-button
+        style="margin-top: -5px"
+        type="danger"
+        size="small"
+        @click="download"
+        >下载</van-button
+      >
+    </van-col>
+  </van-row>
+</template>
+<script setup>
+// import { reactive } from "vue";
+/**
+ * window.$originData.orginParames.title 页面标题
+ * window.$originData.orginParames.parameters 固定参数值
+ * window.$originData.urlParames url参数
+ */
+import { isIpad, isIphone, isIpod, isWechat } from "@/utils/isTerminal.js";
+let time = undefined;
+function getDownloadUrl() {
+  let url = "https://ssp.sxtvs.com.cn/app/shp.apk";
+  if (isIpad || isIpod || isIphone)
+    url =
+      "https://apps.apple.com/cn/app/%E9%97%AA%E8%A7%86%E9%A2%91/id1498056575";
+  return url;
+}
+
+function download() {
+  if (time) clearTimeout(time);
+  time = window.setTimeout(() => {
+    window.SL.Interactive.AppClick({
+      page_name: "官网",
+      event_type: "downloadApp",
+    });
+
+    if (isIpad || isIpod || isIphone) return window.open(getDownloadUrl());
+    if (isWechat)
+      document.querySelector(".weixin").setAttribute("style", "display: block");
+    else window.open(getDownloadUrl());
+  }, 200);
+}
+</script>
+<style scoped>
+.shanshipin {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  height: 50px;
+  line-height: 50px;
+  background: #fff;
+  z-index: 5;
+  font-size: 16px;
+}
+</style>

+ 4 - 4
src/view/WorldCup/index.js

@@ -15,9 +15,9 @@ window.weixin_Share_Init(
   "https://cxzx.smcic.net/topic/highSpeed/img/logo3.png"
 );
 
-var SL = new window.SmcicLogger("shanshipin", "c6124d95");
-SL.Util.SetUrl("https://collect.smcic.net:8443/");
-SL.Systematic.Init({
+window.SL = new window.SmcicLogger("shanshipin", "c6124d95");
+window.SL.Util.SetUrl("https://collect.smcic.net:8443/");
+window.SL.Systematic.Init({
   appid: "c6124d95",
   channel: "shanshipin",
   model: "",
@@ -31,7 +31,7 @@ SL.Systematic.Init({
   build_version: "",
   platform_type: "",
 });
-SL.Content.CommodityDetail({
+window.SL.Content.CommodityDetail({
   commodity_detail_source: "活动",
   commodity_id: "",
   commodity_name: document.title,

+ 37 - 3
src/view/WorldCup/index.vue

@@ -2,9 +2,20 @@
   <div class="WorldCup" :style="'font-size: ' + fontSize + 'px'">
     <div class="up">
       <img class="upbg" :src="require('../../assets/img/upbg.jpg')" />
-      <div class="video">
-        <img src="" alt="" />
-      </div>
+      <van-swipe class="Banner video" :autoplay="3000" indicator-color="white">
+        <van-swipe-item
+          v-for="item in Banner"
+          :key="item.url"
+          @click="() => playVideo(item)"
+        >
+          <van-icon name="play-circle-o" class="play" />
+          <img
+            :src="item.url + '?x-oss-process=video/snapshot,t_100,f_jpg,m_fast'"
+            alt=""
+          />
+        </van-swipe-item>
+      </van-swipe>
+
       <img class="activityTitle" :src="require('../../assets/img/T.png')" />
       <div class="activity">
         <p>
@@ -67,9 +78,16 @@
         投票
       </van-button>
     </div>
+
+    <Shanshipin />
   </div>
 </template>
 <script setup>
+import Shanshipin from "@/components/shanshipin.vue";
+// import { ElCarouselItem, ElCarousel } from "element-plus";
+// import "element-plus/theme-chalk/base.css";
+// import "element-plus/theme-chalk/el-carousel.css";
+// import "element-plus/theme-chalk/el-carousel-item.css";
 import { isShanshipin, isWechat } from "@/utils/isTerminal";
 import { ref, provide, reactive } from "vue";
 import chat from "./components/chat.vue";
@@ -293,6 +311,22 @@ function vote() {
   .up {
     padding-top: 38.8vw;
     position: relative;
+    .Banner {
+      font-size: 0;
+      position: relative;
+      img {
+        width: 100%;
+      }
+      .play {
+        position: absolute;
+        font-size: 40px;
+        color: #fff;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+        z-index: 1;
+      }
+    }
     .upbg {
       position: absolute;
       top: 0;