支持查看评论
This commit is contained in:
Binary file not shown.
+1
-1
@@ -2,7 +2,7 @@
|
||||
import * as bilirequest_imported from './bilirequest'
|
||||
|
||||
export default {
|
||||
emu_mode: false, //发布真机版本时关闭
|
||||
emu_mode: true, //发布真机版本时关闭
|
||||
folders_info: "", // 用户收藏夹信息 这应在home初始化流程中被设置
|
||||
bilirequest: bilirequest_imported,
|
||||
onCreate() {
|
||||
|
||||
@@ -148,6 +148,9 @@ export async function InitBiliRequest(JumpToHomePage){
|
||||
},
|
||||
fail: function(data, code) {
|
||||
console.log(`brequest.init.sid > handling fail, code = ${code}`)
|
||||
router.push({
|
||||
uri: "pages/login"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
},
|
||||
"pages/networkerror":{
|
||||
"component": "networkerror"
|
||||
},
|
||||
"pages/videoreplies":{
|
||||
"component": "videoreplies"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="videodetail-page">
|
||||
<image src="{{img_src}}@300w_168h" class="vid-pic"></image>
|
||||
<image src="{{img_src}}@300w_168h" class="vid-pic" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="vid-title">{{vid_title}}</text>
|
||||
<div class="entry_item" style="margin-top: 305px" @click="OpenAiSummary()">
|
||||
<text class="entry_item_text">AI视频总结</text>
|
||||
@@ -11,7 +11,7 @@
|
||||
<image class="third_click_btn" src={{coinsrc}} style="margin-left: 45px" @click="CoinClick()"></image>
|
||||
<image class="third_click_btn" src={{starsrc}} style="margin-left: 45px" @click="FavClick()"></image>
|
||||
</div>
|
||||
<div class="entry_item" style="margin-top: 515px" @click="">
|
||||
<div class="entry_item" style="margin-top: 515px" @click="ShowReplies()">
|
||||
<text class="entry_item_text">评论区</text>
|
||||
<text class="entry_item_arrow">></text>
|
||||
</div>
|
||||
@@ -78,6 +78,15 @@ export default{
|
||||
}
|
||||
})
|
||||
},
|
||||
ShowReplies(){
|
||||
router.push({
|
||||
uri: "pages/videoreplies",
|
||||
params: {
|
||||
typeid: 1,
|
||||
oid: this.id
|
||||
}
|
||||
})
|
||||
},
|
||||
async LikeClick(){
|
||||
prompt.showToast({
|
||||
message: "由于B站风控,点赞暂不可用",
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<div class="videoreplies-page">
|
||||
<div class="reply" style="margin-top: 50px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[0].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[0].member.uname}} (Lv.{{reply_info.data.replies[0].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[0].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[0].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[0].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 240px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[1].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[1].member.uname}} (Lv.{{reply_info.data.replies[1].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[1].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[1].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[1].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 430px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[2].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[2].member.uname}} (Lv.{{reply_info.data.replies[2].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[2].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[2].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[2].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 620px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[3].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[3].member.uname}} (Lv.{{reply_info.data.replies[3].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[3].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[3].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[3].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 810px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[4].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[4].member.uname}} (Lv.{{reply_info.data.replies[4].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[4].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[4].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[4].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 1000px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[5].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[5].member.uname}} (Lv.{{reply_info.data.replies[5].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[5].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[5].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[5].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 1190px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[6].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[6].member.uname}} (Lv.{{reply_info.data.replies[6].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[6].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[6].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[6].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 1380px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[7].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[7].member.uname}} (Lv.{{reply_info.data.replies[7].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[7].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[7].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[7].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 1570px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[8].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[8].member.uname}} (Lv.{{reply_info.data.replies[8].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[8].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[8].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[8].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="reply" style="margin-top: 1760px">
|
||||
<image class="reply_profile_img" src="{{reply_info.data.replies[9].member.avatar}}@40w_40h" alt="/common/icons8-loading-96.png"></image>
|
||||
<text class="reply_uname">{{reply_info.data.replies[9].member.uname}} (Lv.{{reply_info.data.replies[9].member.level_info.current_level}})</text>
|
||||
<text class="reply_content">{{reply_info.data.replies[9].content.message}}</text>
|
||||
<image class="like_img" src="/common/icons8-facebook-like-96.png"></image>
|
||||
<text class="like_num">{{reply_info.data.replies[9].like}}</text>
|
||||
<text class="click_to_show_more_text">评论详情与{{reply_info.data.replies[9].rcount}}条回复 ></text>
|
||||
</div>
|
||||
<div class="pagecontrol">
|
||||
<input type="button" value="上一页" style="font-size: 22px; width: 90px; height: 40px" @click="BackPage()"></input>
|
||||
<text style="width: 30px;"> </text>
|
||||
<text style="color: white; font-size: 24px">{{pn}}/{{maxpn}}</text>
|
||||
<text style="width: 30px;"> </text>
|
||||
<input type="button" value="下一页" style="font-size: 22px; width: 90px; height: 40px" @click="NextPage()"></input>
|
||||
</div>
|
||||
<text style="margin-top: 2100px; height: 50px;"></text>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import prompt from '@system.prompt'
|
||||
export default{
|
||||
public: {
|
||||
oid: "",
|
||||
typeid: 1
|
||||
},
|
||||
private: {
|
||||
reply_info: null,
|
||||
sort: 1,
|
||||
pn: 1,
|
||||
maxpn: 1,
|
||||
ifInterval: null,
|
||||
async UpdateReplies(){
|
||||
this.reply_info = await this.$app.$def.bilirequest.SendBiliGET("https://api.bilibili.com/x/v2/reply?type=" + this.typeid + "&oid=" + this.oid + "&sort=" + this.sort + "&ps=10&pn=" + this.pn,"json")
|
||||
},
|
||||
BackPage(){
|
||||
if(this.pn < 2){
|
||||
prompt.showToast({
|
||||
message: "已经到头啦!"
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.pn = this.pn - 1
|
||||
this.UpdateReplies()
|
||||
}
|
||||
},
|
||||
NextPage(){
|
||||
if(this.pn >= this.maxpn){
|
||||
prompt.showToast({
|
||||
message: "已经到底啦!"
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.pn = this.pn + 1
|
||||
this.UpdateReplies()
|
||||
}
|
||||
}
|
||||
},
|
||||
onInit(){
|
||||
this.UpdateReplies()
|
||||
this.ifInterval = setInterval(() => {
|
||||
if(this.reply_info != null && this.reply_info != undefined){
|
||||
if(this.reply_info.data.page.count < 10 || this.reply_info.data.page.size < 10){
|
||||
prompt.showToast({
|
||||
message: "评论条数较少,如果在一条正常的评论下发现接下来的所有评论全部没加载出来,就是没评论啦!"
|
||||
})
|
||||
}
|
||||
this.maxpn = Math.ceil(this.reply_info.data.page.acount / 10)
|
||||
clearInterval(this.ifInterval)
|
||||
}
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.videoreplies-page{
|
||||
justify-content: center;
|
||||
}
|
||||
.reply{
|
||||
background-color: rgba(255, 255, 255, 0.178);
|
||||
width: 75%;
|
||||
height: 180px;
|
||||
border-radius: 15px;
|
||||
position: absolute;
|
||||
}
|
||||
.reply_profile_img{
|
||||
margin-top: 20px;
|
||||
margin-left: 20px;
|
||||
min-width: 40px;
|
||||
min-height: 40px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.reply_uname{
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 28px;
|
||||
margin-left: 80px;
|
||||
height: 22px;
|
||||
width: 70%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.reply_content{
|
||||
color: white;
|
||||
font-size: 18px;
|
||||
margin-top: 65px;
|
||||
margin-left: 25px;
|
||||
width: 85%;
|
||||
height: 75px;
|
||||
justify-content: flex-start;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.like_img{
|
||||
margin-top: 145px;
|
||||
margin-left: 25px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.like_num{
|
||||
margin-top: 145px;
|
||||
margin-left: 50px;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
color: white
|
||||
}
|
||||
|
||||
.click_to_show_more_text{
|
||||
margin-top: 145px;
|
||||
margin-left: 180px;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
color: white
|
||||
}
|
||||
|
||||
.pagecontrol{
|
||||
position: absolute;
|
||||
margin-top: 1980px;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user