Commit fbf73fb8 authored by Your Name's avatar Your Name

上传视频改为30M

parent 60fb94c8
This diff is collapsed.
<template> <template>
<div class="list-of-top10"> <div class="list-of-top10">
<triangle> <triangle>
<slot> <slot>
<div class="list-of-top10-title common-title"> <div class="list-of-top10-title common-title">
<img <img
class="icon-title" class="icon-title"
src="@/assets/images/screen/boardsDemand.png" src="@/assets/images/screen/boardsDemand.png"
alt="" alt=""
/> />
<span class="title">{{ title }}</span> <span class="title">{{ title }}</span>
<img class="bg" src="@/assets/images/screen/title01_bg.png" alt="" /> <img class="bg" src="@/assets/images/screen/title01_bg.png" alt="" />
</div> </div>
<div class="list-of-body"> <div class="list-of-body">
<ul class="body-title"> <ul class="body-title">
<li class="f1">排名</li> <li class="f1">排名</li>
<li class="f7">展板名称</li> <li class="f7">展板名称</li>
<li class="f2">播放量</li> <li class="f2">播放量</li>
</ul> </ul>
<div class="body-content" id="bodyContent"> <div class="body-content" id="bodyContent">
<div id="con1"> <div id="con1">
<ul class="body-item" v-for="(item, index) in list" :key="index"> <ul class="body-item" v-for="(item, index) in list" :key="index">
<li class="f1">{{ (index % 10) + 1 }}</li> <li class="f1">{{ (index % 10) + 1 }}</li>
<li class="f7"> <li class="f7">
<div class="title" :title="item.boardName"> <div class="title" :title="item.boardName">
{{ item.boardName }} {{ item.boardName }}
</div> </div>
</li> </li>
<li class="f2">{{ item.playNumber }}</li> <li class="f2">{{ item.playNumber }}</li>
</ul> </ul>
</div> </div>
<div id="con2"></div> <div id="con2"></div>
<div id="con3"></div> <div id="con3"></div>
<div id="con4"></div> <div id="con4"></div>
<div id="con5"></div> <div id="con5"></div>
<div id="con6"></div> <div id="con6"></div>
</div> </div>
</div> </div>
</slot> </slot>
</triangle> </triangle>
</div> </div>
</template> </template>
<script> <script>
import triangle from "../components/slot/triangle"; import triangle from "../components/slot/triangle";
import { getCurDate } from "./util.time.js"; import { getCurDate } from "./util.time.js";
export default { export default {
name: "top10", name: "top10",
data() { data() {
return { return {
title: "全国2021年3月展板点播TOP10", title: "全国2021年3月展板点播TOP10",
timer: null, timer: null,
speed: 50, speed: 50,
box: null, box: null,
con1: null, con1: null,
list: [], list: [],
}; };
}, },
components: { triangle }, components: { triangle },
props: { props: {
data: { data: {
type: Array, type: Array,
default: () => { default: () => {
return []; return [];
}, },
}, },
}, },
mounted() { mounted() {
this.title = this.getTitle(); this.title = this.getTitle();
}, },
methods: { methods: {
clearDom(){ clearDom(){
[2,3,4,5,6].forEach(v=>{ [2,3,4,5,6].forEach(v=>{
document.getElementById(`con${v}`).innerHTML = "" document.getElementById(`con${v}`).innerHTML = ""
}) })
}, },
getTitle() { getTitle() {
let curTime = getCurDate(); let curTime = getCurDate();
return `${curTime.year}${curTime.month}月展板点播TOP10`; return `${curTime.year}${curTime.month}月展板点播TOP10`;
}, },
initScroll() { initScroll() {
let _this = this; let _this = this;
this.box = document.getElementById("bodyContent"); this.box = document.getElementById("bodyContent");
this.con1 = document.getElementById("con1"); this.con1 = document.getElementById("con1");
for (let i = 2; i < 7; i++) { for (let i = 2; i < 7; i++) {
let con = document.getElementById(`con${i}`); let con = document.getElementById(`con${i}`);
con.innerHTML = _this.con1.innerHTML; con.innerHTML = _this.con1.innerHTML;
} }
this.timer = setInterval(_this.scrollUp, _this.speed); this.timer = setInterval(_this.scrollUp, _this.speed);
}, },
scrollUp() { scrollUp() {
if (this.box.scrollTop >= this.con1.scrollHeight) { if (this.box.scrollTop >= this.con1.scrollHeight) {
this.box.scrollTop = 0; this.box.scrollTop = 0;
} else { } else {
this.box.scrollTop++; this.box.scrollTop++;
} }
}, },
Ups() { Ups() {
let _this = this; let _this = this;
this.timer = setInterval(_this.scrollUp, _this.speed); this.timer = setInterval(_this.scrollUp, _this.speed);
}, },
Stops() { Stops() {
clearInterval(this.timer); clearInterval(this.timer);
}, },
}, },
watch: { watch: {
data() { data() {
this.clearDom() this.clearDom()
this.list = this.data; this.list = this.data;
if (this.list.length > 4) { if (this.list.length > 4) {
this.$nextTick(() => { this.$nextTick(() => {
this.initScroll(); this.initScroll();
}); });
} }
}, },
}, },
}; };
</script> </script>
<style lang=scss> <style lang=scss>
</style> </style>
This diff is collapsed.
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<img src="@/assets/images/applets/tip.png" alt /> <img src="@/assets/images/applets/tip.png" alt />
<span> <span>
最多支持上传 最多支持上传
<b>3</b> 段视频,每段大小不能超过 <b>10MB</b> <b>3</b> 段视频,每段大小不能超过 <b>30MB</b>
</span> </span>
</div> </div>
</div> </div>
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
</div> </div>
<div class="field-content"> <div class="field-content">
<van-field <van-field
@input="form.content=form.content.replace(regStr,'');"
required required
class="field-textarea" class="field-textarea"
type="textarea" type="textarea"
...@@ -168,6 +169,7 @@ import util from "@/utils/index.js"; ...@@ -168,6 +169,7 @@ import util from "@/utils/index.js";
export default { export default {
data() { data() {
return { return {
regStr: /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
form: { form: {
username: JSON.parse(sessionStorage.getItem("userInfo")).orgName, username: JSON.parse(sessionStorage.getItem("userInfo")).orgName,
organId: JSON.parse(sessionStorage.getItem("userInfo")).orgId, organId: JSON.parse(sessionStorage.getItem("userInfo")).orgId,
...@@ -325,12 +327,12 @@ export default { ...@@ -325,12 +327,12 @@ export default {
beforeVideo(file) { beforeVideo(file) {
let isOver = true let isOver = true
if(Array.isArray(file)){ if(Array.isArray(file)){
isOver = file.every(item=>item <= 10*1024*1024) isOver = file.every(item=>item <= 30*1024*1024)
}else{ }else{
isOver = file.size <= 10*1024*1024 isOver = file.size <= 30*1024*1024
} }
if(!isOver){ if(!isOver){
this.$toast.fail("上传文件大小不能超过 10MB"); this.$toast.fail("上传文件大小不能超过 30MB");
return false return false
}else{ }else{
return true return true
...@@ -375,6 +377,7 @@ export default { ...@@ -375,6 +377,7 @@ export default {
}) })
}else{ }else{
this.$toast(res.data.message) this.$toast(res.data.message)
// this.deleteInterface()
} }
}) })
.catch(function (err) { .catch(function (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment