|
@@ -11,27 +11,27 @@
|
|
|
</div>
|
|
|
<div class="nav_box">
|
|
|
<div class="nav" :class="{ active: navActive == 0 }" @click="navClick(0)">综合排序</div>
|
|
|
- <div class="nav" :class="{ active: navActive == 1 }" @click="navClick(1)">最多播放</div>
|
|
|
- <div class="nav" :class="{ active: navActive == 2 }" @click="navClick(2)">最新发布</div>
|
|
|
- <div class="nav" :class="{ active: navActive == 3 }" @click="navClick(3)">最多弹幕</div>
|
|
|
- <div class="nav" :class="{ active: navActive == 4 }" @click="navClick(4)">最多收藏</div>
|
|
|
+ <div class="nav" :class="{ active: navActive == 1 }" @click="navClick(1)">相关程度</div>
|
|
|
+ <div class="nav" :class="{ active: navActive == 2 }" @click="navClick(2)">上传日期</div>
|
|
|
+ <div class="nav" :class="{ active: navActive == 3 }" @click="navClick(3)">观看次数</div>
|
|
|
+ <div class="nav" :class="{ active: navActive == 4 }" @click="navClick(4)">评分</div>
|
|
|
</div>
|
|
|
<div class="Box">
|
|
|
<div class="video_box video_box2" v-for="(item, index) in data" :key="index">
|
|
|
<!-- <img :src="item.pic" /> -->
|
|
|
<span class="name" v-html="item.title"></span>
|
|
|
- <span class="author">作者:{{ item.author }}</span>
|
|
|
+ <span class="author">作者:{{ item.channel.title }}</span>
|
|
|
<span class="detail">{{ item.description }}</span>
|
|
|
- <div class="tag" v-if="item.tag.split(',').length > 0">
|
|
|
- <el-tooltip :content="tag" placement="top" effect="dark" v-for="(tag, index) in item.tag.split(',').slice(0, 5)" :key="index">
|
|
|
+ <div class="tag" v-if="item.badges && item.badges.length > 0">
|
|
|
+ <el-tooltip :content="tag" placement="top" effect="dark" v-for="(tag, index) in item.badges.slice(0, 5)" :key="index">
|
|
|
<!-- content to trigger tooltip here -->
|
|
|
<span >{{ tag }}</span>
|
|
|
</el-tooltip>
|
|
|
|
|
|
</div>
|
|
|
- <div class="btn">
|
|
|
- <span @click="openUrl(item.bvid)">查看</span>
|
|
|
- <span @click="checkUrl(item.title, item.bvid)">加入</span>
|
|
|
+ <div class="btn" :style="{marginTop: item.badges && item.badges.length > 0 ? '0' : 'auto'}">
|
|
|
+ <span @click="openUrl(item.id)">查看</span>
|
|
|
+ <span @click="checkUrl(item.title, item.id)">加入</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="data.length == 0" class="no_data">暂无数据</div>
|
|
@@ -110,15 +110,15 @@ export default {
|
|
|
this.$emit('update:dialogVisibleAiCreateVideo', false)
|
|
|
},
|
|
|
openUrl(url) {
|
|
|
- // window.open('https://www.youtube.com/embed/'+url)
|
|
|
- window.open(`//www.bilibili.com/video/${url}`)
|
|
|
+ window.open('https://www.youtube.com/embed/'+url)
|
|
|
+ // window.open(`//www.bilibili.com/video/${url}`)
|
|
|
},
|
|
|
checkUrl(name, id) {
|
|
|
let json = {
|
|
|
name: "链接",
|
|
|
title: name.replace(/<[^>]*>?/gm, ''),
|
|
|
- // url: 'https://www.youtube.com/embed/'+id,
|
|
|
- url: `//player.bilibili.com/player.html?isOutside=true&bvid=${id}`,
|
|
|
+ url: 'https://www.youtube.com/embed/'+id,
|
|
|
+ // url: `//player.bilibili.com/player.html?isOutside=true&bvid=${id}`,
|
|
|
type: 8,
|
|
|
}
|
|
|
this.$emit('createAiVideo', json)
|
|
@@ -188,12 +188,12 @@ export default {
|
|
|
let _this = this
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.ajax.post(`https://gpt4.cocorobo.cn/get_network_search`, {
|
|
|
- engine: "bilibiliNew",
|
|
|
+ engine: "youtubeNew",
|
|
|
keyword: msg,
|
|
|
- page: 1,
|
|
|
- page_size: 20,
|
|
|
+ // page: 1,
|
|
|
+ // page_size: 20,
|
|
|
order: this.navActive,
|
|
|
- duration: 0,
|
|
|
+ // duration: 0,
|
|
|
}).then(response => {
|
|
|
console.log(response);
|
|
|
// _this.data = [..._this.data,...response.data.FunctionResponse]
|
|
@@ -305,10 +305,10 @@ export default {
|
|
|
let _this = this
|
|
|
_this.loading = true
|
|
|
let message = `ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
|
|
|
-针对以下视频数组内容,删除其中不适合k12年级的学生在教室里看到的条目,返回以下视频数组不符合的视频的aid,视频数组:${JSON.stringify(_this.data)}
|
|
|
+针对以下视频数组内容,删除其中不适合k12年级的学生在教室里看到的条目,返回以下视频数组不符合的视频的id,视频数组:${JSON.stringify(_this.data)}
|
|
|
|
|
|
# Format example
|
|
|
-[{aid:""},{aid:""}]
|
|
|
+[{id:""},{id:""}]
|
|
|
`
|
|
|
let parm = {
|
|
|
model: 'gpt-4o-2024-08-06',
|
|
@@ -346,12 +346,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- let aid = []
|
|
|
+ let id = []
|
|
|
for(var i = 0; i < dArray.length; i++){
|
|
|
- aid.push(dArray[i].aid)
|
|
|
+ id.push(dArray[i].id)
|
|
|
}
|
|
|
_this.data = _this.data.filter(el => {
|
|
|
- return aid.indexOf(el.aid) === -1
|
|
|
+ return id.indexOf(el.id) === -1
|
|
|
})
|
|
|
_this.$forceUpdate()
|
|
|
}
|