修复了个人中心和直播视频item高度
This commit is contained in:
parent
e515b8266d
commit
b0a6592373
@ -36,7 +36,7 @@
|
||||
<style lang="scss" scoped>
|
||||
.videoitem{
|
||||
width: 226px;
|
||||
height: 198px;
|
||||
// height: 198px;
|
||||
background-color: #fff;
|
||||
border-radius: 17px;
|
||||
overflow: hidden;
|
||||
|
@ -37,7 +37,7 @@
|
||||
<style lang="scss" scoped>
|
||||
.videoitem{
|
||||
width: 226px;
|
||||
height: 198px;
|
||||
// height: 198px;
|
||||
background-color: #fff;
|
||||
border-radius: 17px;
|
||||
overflow: hidden;
|
||||
|
@ -83,7 +83,7 @@ export default {
|
||||
xiugai: "modify",
|
||||
shuruxinnicheng: "Please enter a new nickname",
|
||||
jibenxinxi: "Basic information",
|
||||
laiziguojia: "From the country",
|
||||
laiziguojia: "From a country or region",
|
||||
juzhudi: "Place of residence",
|
||||
shurujuzhudi: "Enter residence",
|
||||
wohaihuishuo: "I would also say",
|
||||
|
@ -83,7 +83,7 @@ export default {
|
||||
xiugai:"修改",
|
||||
shuruxinnicheng:"请输入新的昵称",
|
||||
jibenxinxi:"基本信息",
|
||||
laiziguojia:"来自国家",
|
||||
laiziguojia:"来自国家或地区",
|
||||
juzhudi:"居住地",
|
||||
shurujuzhudi:"输入居住地",
|
||||
wohaihuishuo:"我还会说",
|
||||
|
@ -53,3 +53,37 @@ export function getValue(key: string): any{
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证图片是否为对应类型
|
||||
* @param name 图片名字
|
||||
*/
|
||||
|
||||
export function provenimg(name: string): boolean{
|
||||
const type = ['png', 'jpg'];
|
||||
const ntypearr = name.split('.');
|
||||
const ntype = ntypearr[ntypearr.length - 1];
|
||||
for(const i in type){
|
||||
if(type[i] == ntype){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证视频是否为对应类型
|
||||
* @param name 图片名字
|
||||
*/
|
||||
|
||||
export function provenvideo(name: string): boolean{
|
||||
const type = ['flv', 'mp4'];
|
||||
const ntypearr = name.split('.');
|
||||
const ntype = ntypearr[ntypearr.length - 1];
|
||||
for(const i in type){
|
||||
if(type[i] == ntype){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
@ -523,6 +523,7 @@ import {
|
||||
} from "@/api/index";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useI18n } from "@/utils/i18n";
|
||||
import { provenvideo } from '@/utils/common';
|
||||
|
||||
export default defineComponent({
|
||||
name: "Archives",
|
||||
@ -909,6 +910,7 @@ export default defineComponent({
|
||||
}
|
||||
const uploadprogress: Ref<number> = ref(0);
|
||||
async function uploads(file: AntUpload) {
|
||||
|
||||
uploadprogress.value = 0;
|
||||
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
@ -960,6 +962,15 @@ export default defineComponent({
|
||||
// picinfo.url=res.video.url
|
||||
formData.value.img = res.video.url;
|
||||
}
|
||||
|
||||
function beforeVideoUpload(file: any){
|
||||
console.log(file)
|
||||
const type = provenvideo(file.name);
|
||||
if(!type){
|
||||
message.error("文件类型错误,请重新选择")
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// function selguojia(e: any){
|
||||
// userinfo.value.countryValue = e;
|
||||
// console.log(e)
|
||||
@ -1007,7 +1018,8 @@ export default defineComponent({
|
||||
uploadspic,
|
||||
lan,
|
||||
interestslist,
|
||||
isdisabled
|
||||
isdisabled,
|
||||
beforeVideoUpload
|
||||
};
|
||||
},
|
||||
});
|
||||
@ -1068,7 +1080,7 @@ export default defineComponent({
|
||||
align-items: center;
|
||||
margin-bottom: 28px;
|
||||
.label {
|
||||
width: 60px;
|
||||
width: 90px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: #808080;
|
||||
|
@ -131,7 +131,7 @@
|
||||
import { defineComponent, onMounted, reactive, Ref, ref, toRaw } from "vue";
|
||||
import { PlaySquareOutlined, PlusOutlined } from "@ant-design/icons-vue";
|
||||
import NavBottom from "@/components/NavBottom.vue";
|
||||
import { previewCover } from "@/utils/common";
|
||||
import { previewCover, provenimg } from "@/utils/common";
|
||||
import { FromSend, ImgInfo, VideoInfo } from "@/types";
|
||||
import { uploadflie } from "@/utils/vod";
|
||||
import { setvideo, videoadd, videodetail } from "@/api";
|
||||
@ -191,6 +191,10 @@ export default defineComponent({
|
||||
*/
|
||||
const beforeCoverUpload = (file: File): boolean => {
|
||||
console.log(file);
|
||||
const type = provenimg(file.name);
|
||||
if(!type){
|
||||
message.error("请重新选择")
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user