直播禁止点击

This commit is contained in:
luyuan 2020-11-18 14:41:52 +08:00
parent 5c7ff10cc8
commit cc18504959
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -7,6 +7,7 @@
size="small"
v-model:value="form.title"
:placeholder="lan.$t('shuruzhibobiaoti')"
@click="isEntitled = jinzhi"
/>
</a-form-item>
<a-form-item :label="lan.$t('zhibofengmian')" class="item-cover" :rules="{ required: true, message: 'Please input Activity name', trigger: 'blur'}">
@ -110,7 +111,7 @@
</p>
</div> -->
</a-form-item>
<a-form-item :label="lan.$t('kaishishijian')" :rules="{ required: true, message: 'Please input Activity name', trigger: 'blur'}">
<a-form-item :label="lan.$t('kaishishijian')" @click="isEntitled = jinzhi" :rules="{ required: true, message: 'Please input Activity name', trigger: 'blur'}">
<!-- <a-input
size="small"
@ -123,6 +124,7 @@
format="YYYY-MM-DD HH:mm"
:value="form.dateline"
:disabled-date="disabledDate"
@click="isEntitled = jinzhi"
@change="startchange"
:placeholder="lan.$t('shezhikaishishijian')"
:getCalendarContainer="
@ -139,6 +141,7 @@
<a-input
size="small"
v-model:value="form.livetime"
@click="isEntitled = jinzhi"
:placeholder="lan.$t('shuruzhiboshijian')"
type="number"
/>
@ -153,6 +156,7 @@
<a-input
size="small"
v-model:value="form.livenumber"
@click="isEntitled = jinzhi"
:placeholder="lan.$t('shuruzhiborenshu')"
type="number"
/>
@ -162,6 +166,7 @@
<a-form-item :label="lan.$t('zhibojianjie')" class="brief">
<a-textarea
v-model:value="form.desc"
@click="isEntitled = jinzhi"
:autoSize="true"
class="brief-textarea"
:maxlength="200"
@ -274,6 +279,9 @@ export default defineComponent({
const videofile = ref<File>();
const videos = ref<Array<any>>([]);
const lives = ref<any>({});
const jinzhi = ref(false)
const isEntitled: Ref<boolean> = ref(false);
/**
* 验证直播时间
*/
@ -365,6 +373,10 @@ export default defineComponent({
}
const seting = computed(() => store.state.seting)
const onSubmit = (e: FromSend) => {
if(jinzhi.value){
isEntitled.value = true;
}
if(!issum){
message.error(lan.$t("shangchuanwancheng"))
return;
@ -426,7 +438,6 @@ export default defineComponent({
console.log("error", err);
});
};
const isEntitled: Ref<boolean> = ref(false);
/**
* 隐藏无资格提示
*/
@ -517,11 +528,11 @@ export default defineComponent({
// picinfo.url=res.video.url
form.value.img = res.video.url;
}
getlivest().then((res) => {
if (res) {
isEntitled.value = true;
lives.value = res;
jinzhi.value = true;
}
});
function beforeUploadpic(info?: any) {
@ -552,9 +563,17 @@ export default defineComponent({
}
}
function video(file: any){
if(jinzhi.value){
isEntitled.value = true;
return false;
}
return provenvideo(file)
}
function imgs(file: any){
if(jinzhi.value){
isEntitled.value = true;
return false;
}
return provenimg(file)
}
@ -593,7 +612,8 @@ export default defineComponent({
onquxiao,
isquxiao,
video,
imgs
imgs,
jinzhi
};
},
});