切换为英文
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
v-model:value="form.startTime"
|
||||
placeholder="请设置您的开始时间"
|
||||
/> -->
|
||||
<a-date-picker @change="startchange" placeholder="请设置您的开始时间" />
|
||||
<a-date-picker show-time :value="form.dateline" @change="startchange" placeholder="请设置您的开始时间" />
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="直播时长"
|
||||
@@ -161,7 +161,8 @@ import RankList from "./RankList.vue";
|
||||
import { previewCover } from "@/utils/common";
|
||||
import { FromSend, ImgInfo } from "@/types/index";
|
||||
import { uploadflie } from "@/utils/vod";
|
||||
import { liveadd } from "@/api";
|
||||
import { liveadd, liveinfo } from "@/api";
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
export default defineComponent({
|
||||
name: "ReleaseWebcast",
|
||||
@@ -173,7 +174,7 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
const form = ref({
|
||||
title: "",
|
||||
img: "",
|
||||
fileid: "",
|
||||
@@ -255,7 +256,7 @@ export default defineComponent({
|
||||
* 表单提交
|
||||
*/
|
||||
|
||||
const subdata = reactive({
|
||||
const subdata = ref({
|
||||
title: "",
|
||||
img: "",
|
||||
fileid: "",
|
||||
@@ -266,7 +267,12 @@ export default defineComponent({
|
||||
livenumber: "",
|
||||
desc: "",
|
||||
});
|
||||
|
||||
const id = useRoute().query.id
|
||||
if(id != null && typeof id == 'string'){
|
||||
liveinfo(parseInt(id)).then((res)=>{
|
||||
form.value = res;
|
||||
})
|
||||
}
|
||||
const onSubmit = (e: FromSend) => {
|
||||
e.preventDefault();
|
||||
validate()
|
||||
@@ -281,7 +287,7 @@ export default defineComponent({
|
||||
console.log("error", err);
|
||||
});
|
||||
};
|
||||
const isEntitled: Ref<boolean> = ref(true);
|
||||
const isEntitled: Ref<boolean> = ref(false);
|
||||
/**
|
||||
* 隐藏无资格提示
|
||||
*/
|
||||
@@ -296,7 +302,7 @@ export default defineComponent({
|
||||
function startchange(e: string): void {
|
||||
const month = new Date(e).getMonth()+1
|
||||
console.log(new Date(e).getFullYear()+"-"+month+'-'+new Date(e).getDate())
|
||||
form.dateline =
|
||||
form.value.dateline =
|
||||
new Date(e).getFullYear() +
|
||||
"-" +
|
||||
month +
|
||||
@@ -324,7 +330,7 @@ export default defineComponent({
|
||||
videofile.value = file.file;
|
||||
videos.value[0].addEventListener("durationchange", () => {
|
||||
console.log(videos.value[0].duration);
|
||||
form.fileduration = videos.value[0].duration;
|
||||
form.value.fileduration = videos.value[0].duration;
|
||||
});
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
console.log(info);
|
||||
@@ -332,8 +338,8 @@ export default defineComponent({
|
||||
});
|
||||
console.log(res);
|
||||
|
||||
form.fileid = res.fileId;
|
||||
form.fileurl = res.video.url;
|
||||
form.value.fileid = res.fileId;
|
||||
form.value.fileurl = res.video.url;
|
||||
}
|
||||
|
||||
async function uploadspic(file: AntUpload) {
|
||||
@@ -345,7 +351,7 @@ export default defineComponent({
|
||||
|
||||
// picinfo.fileId=res.fileId
|
||||
// picinfo.url=res.video.url
|
||||
form.img = res.video.url;
|
||||
form.value.img = res.video.url;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user