liyongli 2 tahun lalu
induk
melakukan
446b464255

+ 26 - 2
src/api/worldCup.js

@@ -10,7 +10,7 @@ export function getMatch(data) {
 
 export function getChat(data) {
   return ajax({
-    url: "chat/list",
+    url: "chat/scroll",
     method: "get",
     noLoad: true,
     data,
@@ -21,7 +21,31 @@ export function setChat(data) {
   return ajax({
     url: "chat/store",
     method: "get",
-    noLoad: true,
     data,
   });
 }
+
+export function voteList(data) {
+  return ajax({
+    url: "list",
+    method: "get",
+    data,
+  });
+}
+
+export function Detail(data) {
+  return ajax({
+    url: "mine",
+    method: "get",
+    data,
+  });
+}
+
+export function votpSave(data) {
+  return ajax({
+    url: "vote",
+    method: "get",
+    data,
+  });
+}
+

TEMPAT SAMPAH
src/assets/img/1.png


TEMPAT SAMPAH
src/assets/img/2.png


TEMPAT SAMPAH
src/assets/img/3.png


TEMPAT SAMPAH
src/assets/img/kuang.png


TEMPAT SAMPAH
src/assets/img/upbg.jpg


TEMPAT SAMPAH
src/assets/img/worldCup.png


+ 1 - 1
src/config/index.js

@@ -1,5 +1,5 @@
 export default {
   base: {
-    ajax: "https://topic.smcic.net/operate/world-cup/",
+    ajax: "http://topic.smcic.net/operate/world-cup/",
   },
 };

+ 17 - 50
src/view/WorldContribution/index.vue

@@ -13,9 +13,7 @@
           font-size: 16px;
         "
       >
-        由陕西广电融媒体集团(台)官方平台闪视频APP、陕西音乐广播FM98.8、战马能量型维生素饮料联合打造的校园音乐
-        IP-“战马音浪·校园歌手大赛”将于2022年11月16日-11月26日举办。本次活动以线上直播PK
-        为主,结合线上线下丰富有趣的内容设置,依托省台影响力将赛事在全网曝光。
+        尽管曾经的比赛已成过眼云烟,但总有些经典瞬间无法忘却。那些年的世界杯名场面、那些与挚友一同熬夜看比赛的日子,那些因为足球而欣喜、落寞、激动、感伤的时刻,会永远铭记心中。
       </p>
       <p
         style="
@@ -26,7 +24,7 @@
           font-size: 16px;
         "
       >
-        直播间不仅有暖冬定制大礼包、笔记本、U型枕、战马饮料,还有千元现金大奖、总决赛门票等你来拿!
+        用户可在下方“我要投稿”上传自己与足球相关的视频,题材包含:足球技巧展示、喜爱的球队/球星、球衣收藏、印象深刻的比赛等各种足球、世界杯相关的视频,并点击“我的投稿”分享邀请好友助威。参赛作品严禁抄袭、搬运等非原创内容、涉嫌违规内容
       </p>
     </van-cell-group>
     <br />
@@ -40,19 +38,6 @@
           placeholder="请输入用户名"
           :rules="[{ validator: isString, message: '请输入正确内容' }]"
         />
-        <van-field
-          name="radio"
-          label="参赛方式"
-          required
-          :rules="[{ validator: isString, message: '请输入正确内容' }]"
-        >
-          <template #input>
-            <van-radio-group v-model="from.isOnLine" direction="horizontal">
-              <van-radio name="线上" checked-color="#ff2c2c">线上</van-radio>
-              <van-radio name="线下" checked-color="#ff2c2c">线下</van-radio>
-            </van-radio-group>
-          </template>
-        </van-field>
         <van-field
           required
           v-model="from.tel"
@@ -128,16 +113,24 @@
 import { ref, reactive } from "vue";
 import { Toast, Dialog } from "vant";
 import axios from "axios";
-import soundbyteJpg from "../../assets/img/soundbyte.jpg";
+import config from "@/config/index.js";
+import soundbyteJpg from "../../assets/img/upbg.jpg";
 /**
  * window.$originData.orginParames.title 页面标题
  * window.$originData.orginParames.parameters 固定参数值
  * window.$originData.urlParames url参数
  */
+console.log("--|>", window.$originData.urlParames);
 const topWidth = ref(window.$originData.orginParames.availWidth);
 const preview = ref("");
 const previewVideo = ref(null);
 const shanshipin = window.$shanshipin || {};
+shanshipin.Phone =
+  window.$originData.urlParames.phone || shanshipin.Phone || "";
+shanshipin.UserName =
+  decodeURI(window.$originData.urlParames.userName || "") ||
+  shanshipin.UserName ||
+  "";
 const from = reactive({
   name: shanshipin.UserName || "",
   tel:
@@ -145,7 +138,6 @@ const from = reactive({
       ? shanshipin.Phone
       : "",
   university: "",
-  isOnLine: "线上",
   file: [],
 });
 
@@ -178,31 +170,10 @@ const showGuize = () => {
     confirmButtonText: "关闭",
     message: () => (
       <div class="art">
-        <p>1、报名时间:即日起至2022年11月25日。</p>
-        <p>2、参与对象:陕西各高校学生。</p>
-        <p>3、参赛要求:曲风不限,自行准备演唱伴奏。</p>
-        <p>4、嘉宾评委:陕西广播电视台音乐类主播/西安知名音乐人/歌手。</p>
-        <p>
-          5、评比规则:唱功为基本要求,结合现场表现、演唱发挥进行综合评分,优秀选手将直接进入总决赛(决赛时间:2022年11月26日),线上将评出人气选手。
-        </p>
-        <p>
-          6、线上比赛时间:
-          <p style="text-indent: 2em;">11月16日 19:00--21:00</p>
-          <p style="text-indent: 2em;">11月23日 19:00--21:00</p>
-        </p>
-        <p>
-          7、线下比赛时间:
-          <p style="text-indent: 2em;">11月12日 14:00--16:00</p>
-          <p style="text-indent: 2em;">11月13日 14:00--16:00</p>
-          <p style="text-indent: 2em;">11月19日 14:00--16:00</p>
-          <p style="text-indent: 2em;">11月20日 14:00--16:00</p>
-        </p>
-        <p>8、线上PK赛奖品:战马定制大礼包、笔记本、U型枕、战马饮料。</p>
+        <p>1、报名时间:2022年11月20日—2022年12月20日。</p>
+        <p>2、视频投稿,视频帖不短于30秒,作品原创</p>
         <p>
-          9、11月26日总决赛奖品:
-          <p style="text-indent: 2em;">冠军:3000元奖金 + 战马饮料4箱;</p>
-          <p style="text-indent: 2em;">亚军:2000元奖金 + 战马饮料3箱</p>
-          <p style="text-indent: 2em;">季军:1000元奖金 + 战马饮料2箱</p>
+          3、闪视频官方将会选择优秀作品奖X名,人气选手X名,获奖选手根据投稿时填写手机号进行联系领取奖品。
         </p>
       </div>
     ),
@@ -220,17 +191,12 @@ const isNumber = () => {
   return /1[0-9]{10}/g.test(from.tel);
 };
 
-window.appLoginSuccess = () => {
-  console.log("登录");
-};
-
 const onSubmit = () => {
   if (!isFile) Toast("请上传作品");
   const oriData = new FormData();
   oriData.append("name", from.name);
   oriData.append("phone", from.tel);
   oriData.append("university", from.university);
-  oriData.append("isOnLine", from.isOnLine);
   oriData.append("file", from.file[0].file);
 
   Toast.loading({
@@ -240,7 +206,7 @@ const onSubmit = () => {
   });
   axios({
     method: "post",
-    url: "https://topic.smcic.net/xian-song/store",
+    url: config.base.ajax + "store",
     headers: {
       "Content-Type": "multipart/form-data",
     },
@@ -271,7 +237,8 @@ const onSubmit = () => {
 .WorldContribution {
   width: 100vw;
   min-height: 100vh;
-  background-color: #0c0000;
+  background-image: url(../../assets/img/bg.jpg);
+  background-size: 100% 100%;
   font-weight: 400;
 }
 .WorldContribution .art {

+ 17 - 14
src/view/WorldCup/components/chat.vue

@@ -46,31 +46,34 @@ const chat = ref("");
 const mT = ref(0);
 let time = undefined;
 let time1 = undefined;
-let page = 1;
+let id = -1;
 const AnimationFrame = requestAnimationFrame();
 time = setTimeout(() => {
   clearTimeout(time);
-  getChat({
-    page,
-    pagesize: 10,
-  }).then(formmater);
+  getChat().then(formmater);
   time = setInterval(() => {
-    if (page == -1) return clearTimeout(time);
-    getChat({
-      page,
-      pagesize: 10,
-    }).then(formmater);
+    if (id == -1) return clearTimeout(time);
+    getChat({ id }).then(formmater);
   }, 5000);
 }, 200);
 
 function formmater(li) {
-  const list = li ? li.records || [] : [];
+  const list = li ? li || [] : [];
   chatList.value.push(...list);
-  page++;
-  if (chatList.value.length >= li.total) page = -1;
   nextTick(() => {
     AnimationFrame(scorllFun);
   });
+  if(!chatList.value.length) return;
+  let max = -1;
+  let index = -1;
+  for (let i = 0; i < chatList.value.length; i++) {
+    const v = chatList.value[i];
+    if(v.id > max){
+        max= Math.max(max, v.id);
+        index = i;
+    }
+  }
+  id = chatList.value[index].id;
 }
 function scorllFun() {
   if (time1) clearTimeout(time1);
@@ -96,7 +99,7 @@ function onSearch() {
   }).then(r => {
     console.log(r);
     chat.value = "";
-    Toast("发送成功")
+    Toast("发送成功");
   });
 }
 </script>

+ 94 - 36
src/view/WorldCup/components/ranking.vue

@@ -4,60 +4,70 @@
     <div class="subTitle">123</div>
     <div class="topThree">
       <div class="topUser">
-        <div class="flexEnd">
+        <div
+          class="flexEnd"
+          v-if="vote[0][1]"
+          @click="() => toNewPage(vote[0][1].phone)"
+        >
           <div class="userImg">
             <img
-              :src="require('../../../assets/img/hg.png')"
+              :src="require('../../../assets/img/2.png')"
               alt=""
               class="hg"
             />
           </div>
-          <div class="userName">这是一个姓名</div>
-          <div class="userP">29403</div>
+          <div class="userName" v-text="vote[0][1].name"></div>
+          <div class="userP" v-text="vote[0][1].votes"></div>
         </div>
       </div>
       <div class="topUser">
-        <div class="flexEnd flexCenter">
+        <div
+          class="flexEnd flexCenter"
+          v-if="vote[0][0]"
+          @click="() => toNewPage(vote[0][0].phone)"
+        >
           <div class="userImg">
             <img
-              :src="require('../../../assets/img/hg.png')"
+              :src="require('../../../assets/img/1.png')"
               alt=""
               class="hg"
             />
           </div>
-          <div class="userName">这是一个姓名</div>
-          <div class="userP">29403</div>
+          <div class="userName" v-text="vote[0][0].name"></div>
+          <div class="userP" v-text="vote[0][0].votes"></div>
         </div>
       </div>
       <div class="topUser">
-        <div class="flexEnd">
+        <div
+          class="flexEnd"
+          v-if="vote[0][2]"
+          @click="() => toNewPage(vote[0][2].phone)"
+        >
           <div class="userImg">
             <img
-              :src="require('../../../assets/img/hg.png')"
+              :src="require('../../../assets/img/3.png')"
               alt=""
               class="hg"
             />
           </div>
-          <div class="userName">这是一个姓名</div>
-          <div class="userP">29403</div>
+          <div class="userName" v-text="vote[0][2].name"></div>
+          <div class="userP" v-text="vote[0][2].votes"></div>
         </div>
       </div>
     </div>
-    <van-cell-group class="list" inset>
-      <van-row justify="center" class="van-hairline--bottom">
+    <van-cell-group class="list" inset v-if="vote[1] && vote[1].length">
+      <van-row
+        justify="center"
+        class="van-hairline--bottom"
+        v-for="(i, o) in (vote[1] || [])"
+        :key="o"
+        @click="() => toNewPage(i.phone)"
+      >
         <van-col span="2">
-          <div class="jp">1</div>
+          <div class="jp" v-text="i.top"></div>
         </van-col>
-        <van-col span="7">朔州</van-col>
-        <van-col span="8">1980票</van-col>
-        <van-col span="7">详情</van-col>
-      </van-row>
-      <van-row justify="center" class="van-hairline--bottom">
-        <van-col span="2">
-          <div class="jp">2</div>
-        </van-col>
-        <van-col span="7">朔州</van-col>
-        <van-col span="8">1980票</van-col>
+        <van-col span="7" v-text="i.name"></van-col>
+        <van-col span="8" v-text="i.votes + '票'"></van-col>
         <van-col span="7">详情</van-col>
       </van-row>
     </van-cell-group>
@@ -66,12 +76,15 @@
       left-icon=""
       right-icon="search"
       v-model="search"
+      @search="searchuser"
       placeholder="搜索感兴趣的选手"
     />
   </div>
 </template>
 <script setup>
 import { ref } from "vue";
+import { voteList } from "@/api/worldCup.js";
+import { Dialog } from "vant";
 // import { onMounted, reactive } from "vue";
 // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
 /**
@@ -79,8 +92,58 @@ import { ref } from "vue";
  * window.$originData.orginParames.parameters 固定参数值
  * window.$originData.urlParames url参数
  */
-console.log(window.$originData);
 const search = ref("");
+const vote = ref([[], []]);
+voteList().then(r => {
+  const list = r || [];
+  const top3 = [];
+  const orther = [];
+  for (let i = 0; i < list.length; i++) {
+    const v = list[i];
+    if (i < 3) top3.push(v);
+    else orther.push(v);
+  }
+  vote.value = [top3, orther];
+});
+
+function toNewPage(phone) {
+  location.href = "./WorldCupDetail.html?phone=" + phone;
+}
+
+function searchuser() {
+  console.log(search.value);
+  voteList({
+    name: search.value,
+  }).then(r => {
+    console.log(r);
+    const searchDetail = [];
+    for (let i = 0; i < (r || []).length; i++) {
+      const v = (r || [])[i];
+      searchDetail.push(
+        <van-row
+          justify="center"
+          class="van-hairline--bottom"
+          onclick={() => toNewPage(v.phone)}
+        >
+          <van-col span="9">{v.name}</van-col>
+          <van-col span="8">{v.votes + '票'}</van-col>
+          <van-col span="7">详情</van-col>
+        </van-row>
+      );
+    }
+
+    Dialog.alert({
+      title: "",
+      messageAlign: "left",
+      confirmButtonText: "关闭查询结果",
+      message: () => (
+        <van-cell-group class="list" inset>
+          {searchDetail}
+        </van-cell-group>
+      ),
+    });
+  });
+}
 </script>
 <style lang="scss">
 .ranking {
@@ -108,22 +171,17 @@ const search = ref("");
       }
       .userImg {
         width: 70px;
-        height: 70px;
-        border-radius: 50%;
+        height: 95px;
         margin: 0 auto;
-        background-color: #000;
-        position: relative;
+        overflow: hidden;
         .hg {
-          width: 35px;
-          height: 25px;
-          position: absolute;
-          top: -15px;
-          right: 0;
+          width: 100%;
+          height: 100%;
         }
       }
       .userName {
         font-size: 12px;
-        padding: 10px;
+        padding: 5px 0 5px 0;
         font-family: PingFang SC;
         font-weight: 400;
         color: #ffffff;

+ 5 - 13
src/view/WorldCup/index.vue

@@ -2,7 +2,6 @@
   <div class="WorldCup" :style="'font-size: ' + fontSize + 'px'">
     <div class="up">
       <img class="upbg" :src="require('../../assets/img/upbg.jpg')" />
-      <img class="topad" :src="require('../../assets/img/worldCup.png')" />
       <video class="video" src=""></video>
       <img class="activityTitle" :src="require('../../assets/img/T.png')" />
       <div class="activity"></div>
@@ -145,10 +144,10 @@ function setTeam(teamIndex, item) {
 }
 
 function toNewPage(url) {
-    if(!url) return;
-    let U = url || "";
-    if (window.$shanshipin.Phone) U += "?phone=" + window.$shanshipin.Phone;
-    location.href = U;
+  if (!url) return;
+  let U = url || "";
+  if (window.$shanshipin.Phone) U += "?phone=" + window.$shanshipin.Phone;
+  location.href = U;
 }
 </script>
 <style lang="scss">
@@ -172,7 +171,7 @@ function toNewPage(url) {
     margin: 0 auto;
   }
   .up {
-    padding-top: 25px;
+    padding-top: 38.8vw;
     position: relative;
     .upbg {
       position: absolute;
@@ -180,13 +179,6 @@ function toNewPage(url) {
       z-index: 0;
       width: 100%;
     }
-    .topad {
-      position: relative;
-      z-index: 1;
-      width: 83vw;
-      display: block;
-      margin: 0 auto 22px auto;
-    }
     .video {
       position: relative;
       z-index: 1;

+ 0 - 1
src/view/WorldCupDetail/index.js

@@ -7,7 +7,6 @@ import { getPageParameters, environment } from "../../config/pageConfig";
 environment();
 window.$originData = getPageParameters();
 document.title = window.$originData.orginParames.title || "";
-createApp(App).mount("#app");
 // 分享
 window.weixin_Share_Init(
   "世界杯",

+ 33 - 16
src/view/WorldCupDetail/index.vue

@@ -1,9 +1,8 @@
 <template>
   <div class="WorldCupDetail">
     <img class="upbg" :src="require('../../assets/img/upbg.jpg')" />
-    <img class="topad" :src="require('../../assets/img/worldCup.png')" />
-    <video class="video" src=""></video>
-    <p class="title">选手名称</p>
+    <video class="video" :src="detailUse.file || ''"></video>
+    <p class="title" v-text="detailUse.name"></p>
     <van-cell-group inset>
       <van-row>
         <van-col span="8">
@@ -22,7 +21,7 @@
         </van-col>
         <van-col span="8">
           <div class="user">
-            <p class="number">22011</p>
+            <p class="number" v-text="detailUse.votes"></p>
             <div class="key">
               <van-image
                 width="14"
@@ -36,7 +35,7 @@
         </van-col>
         <van-col span="8">
           <div class="user">
-            <p class="number">1</p>
+            <p class="number" v-text="detailUse.top"></p>
             <div class="key">
               <van-image
                 width="14"
@@ -65,11 +64,14 @@
       class="saveP"
       block
       style="font-size: 18px;"
+      @click="saveVote"
       >投票</van-button
     >
   </div>
 </template>
 <script setup>
+import {ref} from "vue";
+import {votpSave} from "@/api/worldCup.js";
 // import { onMounted, reactive } from "vue";
 // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
 /**
@@ -77,13 +79,36 @@
  * window.$originData.orginParames.parameters 固定参数值
  * window.$originData.urlParames url参数
  */
-console.log(window.$originData);
+import {Detail} from "@/api/worldCup.js";
+const detailUse = ref({});
+const shanshipin = window.$shanshipin || {};
+shanshipin.Phone =
+  window.$originData.urlParames.phone || shanshipin.Phone || "";
+shanshipin.UserName =
+  decodeURI(window.$originData.urlParames.userName || "") ||
+  shanshipin.UserName ||
+  "";
+Detail({
+    phone: shanshipin.Phone
+}).then(r=>{
+    console.log(r);
+    detailUse.value = r || {};
+})
+
+function saveVote(){
+    votpSave({
+        target: shanshipin.Phone,
+        source: ""
+    }).then(r=>{
+        console.log(r)
+    })
+}
 </script>
 <style lang="scss">
 .WorldCupDetail {
   width: 100vw;
-  height: 100vh;
-  padding-top: 25px;
+  padding-top: 38.8vw;
+  padding-bottom: 50px;
   font-family: PingFangSC-Regular, PingFang SC;
   position: relative;
   .upbg {
@@ -92,13 +117,6 @@ console.log(window.$originData);
     z-index: 0;
     width: 100%;
   }
-  .topad {
-    position: relative;
-    z-index: 1;
-    width: 83vw;
-    display: block;
-    margin: 0 auto 22px auto;
-  }
   .video {
     position: relative;
     z-index: 1;
@@ -127,7 +145,6 @@ console.log(window.$originData);
     }
   }
   .line {
-    width: 56px;
     height: 20px;
     font-size: 14px;
     font-weight: 500;