Skip to content

Commit

Permalink
Fix: newMovieInfo type
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Nov 4, 2023
1 parent 66363d3 commit 3b56f9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
15 changes: 6 additions & 9 deletions src/components/MoviePush.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ const roomToken = localStorage.getItem(`room-${roomID.value}-token`) ?? "";
// 新影片信息
let newMovieInfo = ref<BaseMovieInfo>({
url: "",
name: "",
live: false,
proxy: false,
url: "",
rtmpSource: false,
type: "",
headers: {}
headers: {},
vendorInfo: undefined
});
enum pushType {
Expand Down Expand Up @@ -151,7 +152,7 @@ const updateHeaders = (header: { [key: string]: string }) => {
// 把视频链接添加到列表
const { execute: reqPushMovieApi } = pushMovieApi();
const pushMovie = async (dir: string) => {
const pushMovie = async () => {
if (newMovieInfo.value.live) {
if (newMovieInfo.value.name === "")
return ElNotification({
Expand All @@ -177,9 +178,6 @@ const pushMovie = async (dir: string) => {
strLengthLimit(key, 32);
}
await reqPushMovieApi({
params: {
pos: dir
},
data: newMovieInfo.value,
headers: { Authorization: roomToken }
});
Expand Down Expand Up @@ -266,9 +264,8 @@ onMounted(() => {});
</el-collapse>
</div>

<div class="card-footer flex-wrap pt-3" style="justify-content: space-around">
<button class="btn" @click="pushMovie('front')">添加到列表最<b>前</b>面</button>
<button class="btn" @click="pushMovie('back')">添加到列表最<b>后</b>面</button>
<div class="card-footer pt-3">
<button class="btn" @click="pushMovie()">添加到列表</button>
</div>
</div>

Expand Down
3 changes: 0 additions & 3 deletions src/services/apis/movie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ export const currentMovieApi = useDefineApi<
export const pushMovieApi = useDefineApi<
// request
{
params: {
pos: string;
};
data: BaseMovieInfo;
headers: { Authorization: string };
},
Expand Down

0 comments on commit 3b56f9b

Please sign in to comment.