liyongli 2 年之前
父節點
當前提交
6164e2dd84

+ 0 - 1
1.text

@@ -1 +0,0 @@
-测试写入问题和log问题

+ 50 - 49
src/view/Soundbyte/index.vue

@@ -13,7 +13,8 @@
           font-size: 16px;
         "
       >
-        由陕西广电融媒体集团(台)官方平台闪视频APP、陕西音乐广播FM98.8、战马能量型维生素饮料联合打造的校园音乐 IP-“战马音浪·校园歌手大赛”将于2022年11月16日-11月26日举办。本次活动以线上直播PK
+        由陕西广电融媒体集团(台)官方平台闪视频APP、陕西音乐广播FM98.8、战马能量型维生素饮料联合打造的校园音乐
+        IP-“战马音浪·校园歌手大赛”将于2022年11月16日-11月26日举办。本次活动以线上直播PK
         为主,结合线上线下丰富有趣的内容设置,依托省台影响力将赛事在全网曝光。
       </p>
       <p
@@ -124,31 +125,31 @@
 </template>
 <script setup>
 // import { onMounted, reactive } from "vue";
-import { ref, reactive } from "vue";
-import { showToast,showLoadingToast, Dialog } from "vant";
-import axios from "axios";
-import soundbyteJpg from "../../assets/img/soundbyte.jpg";
+import { ref, reactive } from 'vue';
+import { showToast, showLoadingToast, showDialog } from 'vant';
+import axios from 'axios';
+import soundbyteJpg from '../../assets/img/soundbyte.jpg';
 /**
  * window.$originData.orginParames.title 页面标题
  * window.$originData.orginParames.parameters 固定参数值
  * window.$originData.urlParames url参数
  */
 const topWidth = ref(window.$originData.orginParames.availWidth);
-const preview = ref("");
+const preview = ref('');
 const previewVideo = ref(null);
 const shanshipin = window.$shanshipin || {};
 const from = reactive({
-  name: shanshipin.UserName || "",
+  name: shanshipin.UserName || '',
   tel:
     !isNaN(shanshipin.Phone) && Number(shanshipin.Phone)
       ? shanshipin.Phone
-      : "",
-  university: "",
-  isOnLine: "线上",
+      : '',
+  university: '',
+  isOnLine: '线上',
   file: [],
 });
 
-const filesize = () => showToast("超出文件大小限制");
+const filesize = () => showToast('超出文件大小限制');
 const previewClick = () => {
   let getUrl = null;
   const file = from.file[0].file;
@@ -167,16 +168,16 @@ const previewClick = () => {
   previewVideo.value.play();
 };
 const closePreview = () => {
-  preview.value = "";
+  preview.value = '';
 };
 
 const showGuize = () => {
-  Dialog.alert({
-    title: "活动规则",
-    messageAlign: "left",
-    confirmButtonText: "关闭",
+  showDialog({
+    title: '活动规则',
+    messageAlign: 'left',
+    confirmButtonText: '关闭',
     message: () => (
-      <div class="art">
+      <div class='art'>
         <p>1、报名时间:即日起至2022年11月22日11时。</p>
         <p>2、参与对象:陕西各高校学生。</p>
         <p>3、参赛要求:曲风不限,自行准备演唱伴奏。</p>
@@ -186,22 +187,22 @@ const showGuize = () => {
         </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 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 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>
           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>
+          <p style='text-indent: 2em;'>冠军:3000元奖金 + 战马饮料4箱;</p>
+          <p style='text-indent: 2em;'>亚军:2000元奖金 + 战马饮料3箱</p>
+          <p style='text-indent: 2em;'>季军:1000元奖金 + 战马饮料2箱</p>
         </p>
       </div>
     ),
@@ -209,59 +210,59 @@ const showGuize = () => {
 };
 
 const isString = v => {
-  return !!v && typeof v == "string" && isNaN(v);
+  return !!v && typeof v == 'string' && isNaN(v);
 };
 const isFile = () => {
   return from.file && from.file.length;
 };
 const isNumber = () => {
-    console.log(from)
-    return /1[0-9]{10}/g.test(from.tel);
-}
+  console.log(from);
+  return /1[0-9]{10}/g.test(from.tel);
+};
 
 window.appLoginSuccess = () => {
-  console.log("登录");
+  console.log('登录');
 };
 
 const onSubmit = () => {
-  if (!isFile) showToast("请上传作品");
+  if (!isFile) showToast('请上传作品');
   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);
+  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);
 
   showLoadingToast({
-    message: "报名中...",
+    message: '报名中...',
     forbidClick: true,
     duration: 0,
   });
   axios({
-    method: "post",
-    url: "https://topic.smcic.net/xian-song/store",
+    method: 'post',
+    url: 'https://topic.smcic.net/xian-song/store',
     headers: {
-      "Content-Type": "multipart/form-data",
+      'Content-Type': 'multipart/form-data',
     },
     data: oriData,
   })
     .then(r => {
       console.log(r);
       showLoadingToast.clear();
-      Dialog.alert({
-        title: "报名成功",
-        messageAlign: "left",
-        confirmButtonText: "关闭",
+      showDialog({
+        title: '报名成功',
+        messageAlign: 'left',
+        confirmButtonText: '关闭',
         message: () => (
           <img
-            src="https://cxzx.smcic.net/topic/tool/img/er.jpg"
-            style="width: 100%"
+            src='https://cxzx.smcic.net/topic/tool/img/er.jpg'
+            style='width: 100%'
           />
         ),
       });
     })
     .catch(() => {
-      showToast("报名失败");
+      showToast('报名失败');
     });
 };
 </script>
@@ -282,7 +283,7 @@ const onSubmit = () => {
   border-bottom-width: 0px;
 }
 .Soundbyte .van-nav-bar__content {
-  background-image: url("../../assets/img/title.png");
+  background-image: url('../../assets/img/title.png');
   background-size: 100% 100%;
   background-repeat: no-repeat;
   overflow: hidden;

+ 34 - 34
src/view/WorldContribution/index.vue

@@ -117,38 +117,38 @@
 </template>
 <script setup>
 // import { onMounted, reactive } from "vue";
-import { ref, reactive } from "vue";
-import { showToast, Dialog } from "vant";
-import axios from "axios";
-import config from "@/config/index.js";
-import soundbyteJpg from "../../assets/img/upbg.jpg";
+import { ref, reactive } from 'vue';
+import { showToast, showDialog } from 'vant';
+import axios from 'axios';
+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);
+console.log('--|>', window.$originData.urlParames);
 const topWidth = ref(window.$originData.orginParames.availWidth);
-const preview = ref("");
+const preview = ref('');
 const previewVideo = ref(null);
 const shanshipin = window.$shanshipin || {};
 shanshipin.Phone =
-  window.$originData.urlParames.phone || shanshipin.Phone || "";
+  window.$originData.urlParames.phone || shanshipin.Phone || '';
 shanshipin.UserName =
-  decodeURI(window.$originData.urlParames.userName || "") ||
+  decodeURI(window.$originData.urlParames.userName || '') ||
   shanshipin.UserName ||
-  "";
+  '';
 const from = reactive({
-  name: shanshipin.UserName || "",
+  name: shanshipin.UserName || '',
   tel:
     !isNaN(shanshipin.Phone) && Number(shanshipin.Phone)
       ? shanshipin.Phone
-      : "",
-  university: "",
+      : '',
+  university: '',
   file: [],
 });
 
-const filesize = () => showToast("超出文件大小限制");
+const filesize = () => showToast('超出文件大小限制');
 const previewClick = () => {
   let getUrl = null;
   const file = from.file[0].file;
@@ -167,16 +167,16 @@ const previewClick = () => {
   previewVideo.value.play();
 };
 const closePreview = () => {
-  preview.value = "";
+  preview.value = '';
 };
 
 const showGuize = () => {
-  Dialog.alert({
-    title: "活动规则",
-    messageAlign: "left",
-    confirmButtonText: "关闭",
+  showDialog({
+    title: '活动规则',
+    messageAlign: 'left',
+    confirmButtonText: '关闭',
     message: () => (
-      <div class="art">
+      <div class='art'>
         <p>1、报名时间:2022年11月20日—2022年12月20日。</p>
         <p>2、视频投稿,视频帖不短于30秒,作品原创</p>
         <p>
@@ -188,7 +188,7 @@ const showGuize = () => {
 };
 
 const isString = v => {
-  return !!v && typeof v == "string" && isNaN(v);
+  return !!v && typeof v == 'string' && isNaN(v);
 };
 const isFile = () => {
   return from.file && from.file.length;
@@ -199,32 +199,32 @@ const isNumber = () => {
 };
 
 const onSubmit = () => {
-  if (!isFile) showToast("请上传作品");
+  if (!isFile) showToast('请上传作品');
   const oriData = new FormData();
-  oriData.append("name", from.name);
-  oriData.append("phone", from.tel);
-  oriData.append("description", from.description);
-  oriData.append("university", from.university);
-  oriData.append("file", from.file[0].file);
+  oriData.append('name', from.name);
+  oriData.append('phone', from.tel);
+  oriData.append('description', from.description);
+  oriData.append('university', from.university);
+  oriData.append('file', from.file[0].file);
 
   showToast.loading({
-    message: "报名中...",
+    message: '报名中...',
     forbidClick: true,
     duration: 0,
   });
   axios({
-    method: "post",
-    url: config.base.ajax + "store",
+    method: 'post',
+    url: config.base.ajax + 'store',
     headers: {
-      "Content-Type": "multipart/form-data",
+      'Content-Type': 'multipart/form-data',
     },
     data: oriData,
   })
     .then(() => {
-      showToast("报名成功");
+      showToast('报名成功');
     })
     .catch(() => {
-      showToast("报名失败");
+      showToast('报名失败');
     });
 };
 </script>
@@ -246,7 +246,7 @@ const onSubmit = () => {
   border-bottom-width: 0px;
 }
 .WorldContribution .van-nav-bar__content {
-  background-image: url("../../assets/img/title.png");
+  background-image: url('../../assets/img/title.png');
   background-size: 100% 100%;
   background-repeat: no-repeat;
   overflow: hidden;

+ 2 - 2
src/view/WorldCup/components/ranking.vue

@@ -88,7 +88,7 @@
 <script setup>
 import { ref } from "vue";
 import { voteList } from "@/api/worldCup.js";
-import { Dialog } from "vant";
+import { showDialog } from "vant";
 // import { onMounted, reactive } from "vue";
 // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
 /**
@@ -136,7 +136,7 @@ function searchuser() {
       );
     }
 
-    Dialog.alert({
+    showDialog({
       title: "",
       messageAlign: "left",
       confirmButtonText: "关闭查询结果",

+ 46 - 52
src/view/WorldCup/index.vue

@@ -68,13 +68,7 @@
     <div class="playVideo" v-if="play.phone">
       <van-icon @click="() => playVideo({})" name="close" class="close" />
       <video :src="play.url" controls></video>
-      <van-button
-        round
-        class="btn"
-        block
-        color="#c11616"
-        @click="saveVote"
-      >
+      <van-button round class="btn" block color="#c11616" @click="saveVote">
         投票
       </van-button>
     </div>
@@ -83,19 +77,19 @@
   </div>
 </template>
 <script setup>
-import Shanshipin from "@/components/shanshipin.vue";
+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";
-import ranking from "./components/ranking.vue";
-import match from "./components/match.vue";
-import { showToast, Dialog } from "vant";
+import { isShanshipin, isWechat } from '@/utils/isTerminal';
+import { ref, provide, reactive } from 'vue';
+import chat from './components/chat.vue';
+import ranking from './components/ranking.vue';
+import match from './components/match.vue';
+import { showToast, showDialog } from 'vant';
 
-import { getMatch, getBannerAndVideo, votpSave } from "@/api/worldCup.js";
+import { getMatch, getBannerAndVideo, votpSave } from '@/api/worldCup.js';
 
 const availWidth =
   window.$originData.orginParames.availWidth > 1440
@@ -109,14 +103,14 @@ const maxcol = [8, 4, 2, 1, 1, 1, 2, 4, 8];
 let team = reactive([]);
 const shanshipin = window.$shanshipin || {};
 const from = reactive({
-  name: shanshipin.UserName || localStorage.getItem("worldCupName") || "",
-  phone: shanshipin.Phone || localStorage.getItem("worldCupPhone") || "",
+  name: shanshipin.UserName || localStorage.getItem('worldCupName') || '',
+  phone: shanshipin.Phone || localStorage.getItem('worldCupPhone') || '',
 });
-provide("fontSize", fontSize); // 配置全域参数
-provide("availWidth", availWidth); // 配置全域参数
-provide("maxcol", maxcol); // 配置全域参数
-provide("team", team); // 配置全域参数
-provide("user", from); // 配置全域参数
+provide('fontSize', fontSize); // 配置全域参数
+provide('availWidth', availWidth); // 配置全域参数
+provide('maxcol', maxcol); // 配置全域参数
+provide('team', team); // 配置全域参数
+provide('user', from); // 配置全域参数
 // import { onMounted, reactive } from "vue";
 // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
 /**
@@ -124,11 +118,11 @@ provide("user", from); // 配置全域参数
  * window.$originData.orginParames.parameters 固定参数值
  * window.$originData.urlParames url参数
  */
-const p = isWechat ? "微信" : isShanshipin ? "闪视频" : "其它";
+const p = isWechat ? '微信' : isShanshipin ? '闪视频' : '其它';
 
 function setStorage() {
-  localStorage.setItem("worldCupPhone", from.phone || "");
-  localStorage.setItem("worldCupName", from.name || "");
+  localStorage.setItem('worldCupPhone', from.phone || '');
+  localStorage.setItem('worldCupName', from.name || '');
 }
 
 /**
@@ -147,7 +141,7 @@ Promise.all([
 function upWay() {
   getMatch({
     phone: from.phone,
-  }).then(r=>{
+  }).then(r => {
     formmateMatch(r || []);
   });
 }
@@ -161,10 +155,10 @@ function formmateMatch(matchList) {
   const isForeast = !!matchList[14].winner;
   for (let i = 0; i < matchList.length; i++) {
     const v = matchList[i];
-    if (v.rounds === "1/8决赛") setRow(0, v, isForeast); // 16进8
-    else if (v.rounds === "1/4决赛") setRow(1, v, isForeast); // 8进4
-    else if (v.rounds === "半决赛") setRow(2, v); // 4进2
-    else if (v.rounds === "决赛") {
+    if (v.rounds === '1/8决赛') setRow(0, v, isForeast); // 16进8
+    else if (v.rounds === '1/4决赛') setRow(1, v, isForeast); // 8进4
+    else if (v.rounds === '半决赛') setRow(2, v); // 4进2
+    else if (v.rounds === '决赛') {
       // 2进1
       team[3] = [
         {
@@ -192,14 +186,14 @@ function formmateMatch(matchList) {
       ];
       team[Math.ceil((maxcol.length - 1) / 2)] = [
         {
-          team: v.winner || "",
+          team: v.winner || '',
           isWinner: true,
           teamlogo:
             v.winner === v.home
               ? v.homeLogo
               : v.winner === v.away
               ? v.awayLogo
-              : "",
+              : '',
           isHome: true,
           isForeast,
           isED: !!v.winner,
@@ -229,9 +223,9 @@ function setRow(index, v) {
 function setTeam(teamIndex, item, isForeast) {
   if (!team[teamIndex]) team[teamIndex] = [];
   team[teamIndex].push({
-    team: item.home || "",
+    team: item.home || '',
     isWinner: item.winner === item.home,
-    teamlogo: item.homeLogo || "",
+    teamlogo: item.homeLogo || '',
     isED: !!item.winner,
     isForeast,
     isHome: true,
@@ -239,9 +233,9 @@ function setTeam(teamIndex, item, isForeast) {
     pSelectId: item.homePid,
   });
   team[teamIndex].push({
-    team: item.away || "",
+    team: item.away || '',
     isWinner: item.winner === item.away,
-    teamlogo: item.awayLogo || "",
+    teamlogo: item.awayLogo || '',
     isED: !!item.winner,
     isForeast,
     isHome: false,
@@ -251,44 +245,44 @@ function setTeam(teamIndex, item, isForeast) {
 }
 
 function login(next) {
-  Dialog.alert({
-    title: "",
-    messageAlign: "left",
-    theme: "round-button",
-    confirmButtonText: "登录",
+  showDialog({
+    title: '',
+    messageAlign: 'left',
+    theme: 'round-button',
+    confirmButtonText: '登录',
     message: () => (
       <div>
         <van-field
           required
           v-model={from.name}
-          label="姓名"
-          placeholder="请输入用户名"
+          label='姓名'
+          placeholder='请输入用户名'
         />
         <van-field
           required
           v-model={from.phone}
-          label="联系方式"
-          type="tel"
-          placeholder="请输入手机号"
+          label='联系方式'
+          type='tel'
+          placeholder='请输入手机号'
         />
       </div>
     ),
   }).then(() => {
-    if(!from.phone) return showToast("登录后才能看到自己的作品哦~")
+    if (!from.phone) return showToast('登录后才能看到自己的作品哦~');
     setStorage();
     next && next();
   });
 }
 
 function verification() {
-  if (!from.phone) return login(() => toNewPage("./WorldCupDetail.html"));
-  toNewPage("./WorldCupDetail.html");
+  if (!from.phone) return login(() => toNewPage('./WorldCupDetail.html'));
+  toNewPage('./WorldCupDetail.html');
 }
 
 function toNewPage(url) {
   if (!url) return;
-  let U = url || "";
-  if (window.$shanshipin.Phone) U += "?phone=" + window.$shanshipin.Phone;
+  let U = url || '';
+  if (window.$shanshipin.Phone) U += '?phone=' + window.$shanshipin.Phone;
   location.href = U;
 }
 
@@ -303,7 +297,7 @@ function vote() {
     client: p,
   }).then(r => {
     console.log(r);
-    showToast("感谢您的支持!");
+    showToast('感谢您的支持!');
   });
 }
 </script>

+ 22 - 22
src/view/WorldCupDetail/index.vue

@@ -64,10 +64,10 @@
   </div>
 </template>
 <script setup>
-import { isShanshipin,isWechat } from "@/utils/isTerminal";
-import { ref, reactive } from "vue";
-import { votpSave } from "@/api/worldCup.js";
-import { showToast, Dialog } from "vant";
+import { isShanshipin, isWechat } from '@/utils/isTerminal';
+import { ref, reactive } from 'vue';
+import { votpSave } from '@/api/worldCup.js';
+import { showToast, showDialog } from 'vant';
 // import { onMounted, reactive } from "vue";
 // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
 /**
@@ -75,42 +75,42 @@ import { showToast, Dialog } from "vant";
  * window.$originData.orginParames.parameters 固定参数值
  * window.$originData.urlParames url参数
  */
-import { Detail } from "@/api/worldCup.js";
+import { Detail } from '@/api/worldCup.js';
 
-const p = isWechat?'微信': isShanshipin? '闪视频' : '其它';
+const p = isWechat ? '微信' : isShanshipin ? '闪视频' : '其它';
 const detailUse = ref({});
 const shanshipin = window.$shanshipin || {};
 const from = reactive({
-  name: shanshipin.UserName || localStorage.getItem("worldCupName") || "",
-  phone: shanshipin.Phone || localStorage.getItem("worldCupPhone") || "",
+  name: shanshipin.UserName || localStorage.getItem('worldCupName') || '',
+  phone: shanshipin.Phone || localStorage.getItem('worldCupPhone') || '',
 });
 
 function login(next) {
-  Dialog.alert({
-    title: "",
-    messageAlign: "left",
-    theme: "round-button",
-    confirmButtonText: "登录",
+  showDialog({
+    title: '',
+    messageAlign: 'left',
+    theme: 'round-button',
+    confirmButtonText: '登录',
     message: () => (
       <div>
         <van-field
           required
           v-model={from.name}
-          label="姓名"
-          placeholder="请输入用户名"
+          label='姓名'
+          placeholder='请输入用户名'
         />
         <van-field
           required
           v-model={from.phone}
-          label="联系方式"
-          type="tel"
-          placeholder="请输入手机号"
+          label='联系方式'
+          type='tel'
+          placeholder='请输入手机号'
         />
       </div>
     ),
   }).then(() => {
-    localStorage.setItem("worldCupPhone", from.phone || "");
-    localStorage.setItem("worldCupName", from.name || "");
+    localStorage.setItem('worldCupPhone', from.phone || '');
+    localStorage.setItem('worldCupName', from.name || '');
     next && next();
   });
 }
@@ -129,10 +129,10 @@ function vote() {
   votpSave({
     target: target,
     source: from.phone,
-    client: p
+    client: p,
   }).then(r => {
     console.log(r);
-    showToast("感谢您的支持!");
+    showToast('感谢您的支持!');
   });
 }
 </script>