切换为英文
This commit is contained in:
parent
8dbc19250b
commit
7f2d980da6
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="zh_CN">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
<router-link to="/">Home</router-link> |
|
<router-link to="/">Home</router-link> |
|
||||||
<router-link to="/about">About</router-link>
|
<router-link to="/about">About</router-link>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<a-config-provider :locale="locale">
|
||||||
<router-view/>
|
<router-view/>
|
||||||
|
</a-config-provider>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
@ -12,6 +14,8 @@ import store from './store';
|
|||||||
import { getValue } from './utils/common';
|
import { getValue } from './utils/common';
|
||||||
import { provideI18n } from "@/utils/i18n"
|
import { provideI18n } from "@/utils/i18n"
|
||||||
import i18ninit from "@/i18n/init"
|
import i18ninit from "@/i18n/init"
|
||||||
|
import enUS from 'ant-design-vue/es/locale/en_US';
|
||||||
|
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
setup(){
|
setup(){
|
||||||
@ -22,6 +26,9 @@ export default defineComponent({
|
|||||||
}else{
|
}else{
|
||||||
router.push("/")
|
router.push("/")
|
||||||
}
|
}
|
||||||
|
return{
|
||||||
|
locale: zhCN
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -902,3 +902,19 @@ export async function usersig(userid: number) {
|
|||||||
}
|
}
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function liveinfo(id: number): Promise<any>{
|
||||||
|
const liveinfo = (await get<LiveInfo>(`live/${id}`)).data;
|
||||||
|
return {
|
||||||
|
liveid: liveinfo.liveid,
|
||||||
|
title: liveinfo.title,
|
||||||
|
img: liveinfo.img,
|
||||||
|
fileid: liveinfo.fileid,
|
||||||
|
fileurl: liveinfo.fileurl,
|
||||||
|
fileduration: liveinfo.fileduration,
|
||||||
|
dateline: liveinfo.dateline,
|
||||||
|
livetime: liveinfo.livetime,
|
||||||
|
livenumber: liveinfo.livenumber,
|
||||||
|
desc: liveinfo.desc
|
||||||
|
}
|
||||||
|
}
|
10
src/import-png.d.ts
vendored
10
src/import-png.d.ts
vendored
@ -2,3 +2,13 @@ declare module "*.png" {
|
|||||||
const value: any;
|
const value: any;
|
||||||
export default value;
|
export default value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module "ant-design-vue/es/locale/en_US" {
|
||||||
|
const value: any;
|
||||||
|
export default value;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module "ant-design-vue/es/locale/zh_CN" {
|
||||||
|
const value: any;
|
||||||
|
export default value;
|
||||||
|
}
|
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
@ -94,3 +94,5 @@ export interface LivelistInfo {
|
|||||||
msg: string;
|
msg: string;
|
||||||
total: number;
|
total: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
v-model:value="form.startTime"
|
v-model:value="form.startTime"
|
||||||
placeholder="请设置您的开始时间"
|
placeholder="请设置您的开始时间"
|
||||||
/> -->
|
/> -->
|
||||||
<a-date-picker @change="startchange" placeholder="请设置您的开始时间" />
|
<a-date-picker show-time :value="form.dateline" @change="startchange" placeholder="请设置您的开始时间" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="直播时长"
|
label="直播时长"
|
||||||
@ -161,7 +161,8 @@ import RankList from "./RankList.vue";
|
|||||||
import { previewCover } from "@/utils/common";
|
import { previewCover } from "@/utils/common";
|
||||||
import { FromSend, ImgInfo } from "@/types/index";
|
import { FromSend, ImgInfo } from "@/types/index";
|
||||||
import { uploadflie } from "@/utils/vod";
|
import { uploadflie } from "@/utils/vod";
|
||||||
import { liveadd } from "@/api";
|
import { liveadd, liveinfo } from "@/api";
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ReleaseWebcast",
|
name: "ReleaseWebcast",
|
||||||
@ -173,7 +174,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const form = reactive({
|
const form = ref({
|
||||||
title: "",
|
title: "",
|
||||||
img: "",
|
img: "",
|
||||||
fileid: "",
|
fileid: "",
|
||||||
@ -255,7 +256,7 @@ export default defineComponent({
|
|||||||
* 表单提交
|
* 表单提交
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const subdata = reactive({
|
const subdata = ref({
|
||||||
title: "",
|
title: "",
|
||||||
img: "",
|
img: "",
|
||||||
fileid: "",
|
fileid: "",
|
||||||
@ -266,7 +267,12 @@ export default defineComponent({
|
|||||||
livenumber: "",
|
livenumber: "",
|
||||||
desc: "",
|
desc: "",
|
||||||
});
|
});
|
||||||
|
const id = useRoute().query.id
|
||||||
|
if(id != null && typeof id == 'string'){
|
||||||
|
liveinfo(parseInt(id)).then((res)=>{
|
||||||
|
form.value = res;
|
||||||
|
})
|
||||||
|
}
|
||||||
const onSubmit = (e: FromSend) => {
|
const onSubmit = (e: FromSend) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
validate()
|
validate()
|
||||||
@ -281,7 +287,7 @@ export default defineComponent({
|
|||||||
console.log("error", err);
|
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 {
|
function startchange(e: string): void {
|
||||||
const month = new Date(e).getMonth()+1
|
const month = new Date(e).getMonth()+1
|
||||||
console.log(new Date(e).getFullYear()+"-"+month+'-'+new Date(e).getDate())
|
console.log(new Date(e).getFullYear()+"-"+month+'-'+new Date(e).getDate())
|
||||||
form.dateline =
|
form.value.dateline =
|
||||||
new Date(e).getFullYear() +
|
new Date(e).getFullYear() +
|
||||||
"-" +
|
"-" +
|
||||||
month +
|
month +
|
||||||
@ -324,7 +330,7 @@ export default defineComponent({
|
|||||||
videofile.value = file.file;
|
videofile.value = file.file;
|
||||||
videos.value[0].addEventListener("durationchange", () => {
|
videos.value[0].addEventListener("durationchange", () => {
|
||||||
console.log(videos.value[0].duration);
|
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) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
@ -332,8 +338,8 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
form.fileid = res.fileId;
|
form.value.fileid = res.fileId;
|
||||||
form.fileurl = res.video.url;
|
form.value.fileurl = res.video.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function uploadspic(file: AntUpload) {
|
async function uploadspic(file: AntUpload) {
|
||||||
@ -345,7 +351,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
// picinfo.fileId=res.fileId
|
// picinfo.fileId=res.fileId
|
||||||
// picinfo.url=res.video.url
|
// picinfo.url=res.video.url
|
||||||
form.img = res.video.url;
|
form.value.img = res.video.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user