|
@@ -45,6 +45,42 @@
|
|
|
filter: blur(20px);
|
|
|
z-index: 2;
|
|
|
}
|
|
|
+.tu-title {
|
|
|
+ margin-left: -12px;
|
|
|
+ margin-right: -7px;
|
|
|
+ padding-left: 210px;
|
|
|
+ background: url(//static.yximgs.com/s1/i/qr-bg.77ae5df.jpg) no-repeat;
|
|
|
+ background-size: auto;
|
|
|
+ background-size: 210px;
|
|
|
+ height: 245px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.qr-title {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ position: relative;
|
|
|
+ .img-big {
|
|
|
+ width: 200px;
|
|
|
+ height: 200px;
|
|
|
+ border: 1px solid #f2f2f2;
|
|
|
+ }
|
|
|
+ .reset {
|
|
|
+ width: 200px;
|
|
|
+ height: 200px;
|
|
|
+ position: absolute;
|
|
|
+ background: rgba(255, 255, 255, 0.9);
|
|
|
+ text-align: center;
|
|
|
+ padding: 60px 15px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.back-top {
|
|
|
+ position: fixed;
|
|
|
+ width: 50px;
|
|
|
+ height: 100px;
|
|
|
+ right: 0;
|
|
|
+ bottom: 100px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
.ant-comment-content-detail {
|
|
@@ -71,6 +107,9 @@
|
|
|
.ant-comment-content-author-name {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+.xiaoshi .ant-modal-footer {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
</style>
|
|
|
<template>
|
|
|
<div class="vm-video-list">
|
|
@@ -204,33 +243,19 @@
|
|
|
</a-card>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- <div
|
|
|
- style="position:fixed;width:50px;height:100px;right:0;bottom:100px;cursor: pointer;"
|
|
|
- v-show="scollTop>300"
|
|
|
- @click="backTop"
|
|
|
- >
|
|
|
+ <div class="back-top" v-show="scollTop>300" @click="backTop">
|
|
|
<a-icon type="arrow-up" style="font-size:30px" />
|
|
|
</div>
|
|
|
- <a-modal title="扫描二维码登录" v-model="showCode" @cancel="showCode = false">
|
|
|
- <div style="display:flex;
|
|
|
- justify-content: space-around">
|
|
|
- <div
|
|
|
- style="margin-left: -12px;margin-right: -7px;padding-left: 210px;background: url(//static.yximgs.com/s1/i/qr-bg.77ae5df.jpg) no-repeat;
|
|
|
- background-size: auto;
|
|
|
-background-size: 210px;
|
|
|
-height: 245px;
|
|
|
-text-align: center;"
|
|
|
- ></div>
|
|
|
- <div style="display: flex;justify-content: center;position:relative">
|
|
|
- <img :src="qrcode" alt style="width:200px;height:200px;border:1px solid #f2f2f2" />
|
|
|
+ <a-modal title="扫描二维码登录" v-model="showCode" @cancel="showCode = false" class="xiaoshi">
|
|
|
+ <div style="display:flex;justify-content: space-around">
|
|
|
+ <div class="tu-title"></div>
|
|
|
+ <div class="qr-title">
|
|
|
+ <img :src="qrcode" alt class="img-big" />
|
|
|
<div style="position:absolute;bottom:10px">
|
|
|
请使用
|
|
|
<span style="color:#ff5000">快手APP</span>扫码登录
|
|
|
</div>
|
|
|
- <div
|
|
|
- style="width:200px;height:200px;position:absolute;background:rgba(255,255,255,.9);text-align:center;padding:60px 15px"
|
|
|
- v-show="showShare"
|
|
|
- >
|
|
|
+ <div class="reset" style v-show="showShare">
|
|
|
<div style="margin-bottom:5px">
|
|
|
<img :src="url" alt />
|
|
|
</div>
|
|
@@ -314,7 +339,8 @@ export default {
|
|
|
scrollGet(item, i, e) {
|
|
|
var b = document.getElementsByClassName('scrollBox')[i]
|
|
|
if (b.scrollHeight - b.scrollTop < 250 && item.pcursor != 'no_more') {
|
|
|
- if (b.scrollHeight - b.scrollTop > 235) {
|
|
|
+ if (b.scrollHeight - b.scrollTop > 235 && item.pcursor != 'no_more') {
|
|
|
+ alert(1)
|
|
|
this.getCommentList(this.ksid, this.dataShow[i].photoId, item.pcursor).then(dataOne => {
|
|
|
this.dataShow[i].loading = false
|
|
|
if (dataOne && this.dataShow[i]) {
|
|
@@ -327,11 +353,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.dataShow[i].commentList.push(...dataNew)
|
|
|
+ this.dataShow[i].pcursor = pcursor
|
|
|
} else {
|
|
|
this.dataShow[i].commentList = []
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ } else {
|
|
|
+ return
|
|
|
}
|
|
|
},
|
|
|
handleChange(value) {
|
|
@@ -383,7 +412,6 @@ export default {
|
|
|
})
|
|
|
this.pcursor = res.result.data.publicFeeds.pcursor
|
|
|
this.dataShow.push(...data)
|
|
|
- var i = 0
|
|
|
for (let i = 0; i < that.dataShow.length; i++) {
|
|
|
that.dataShow[i].loading = false
|
|
|
if (that.dataShow[i].commentCount > 0) {
|
|
@@ -391,13 +419,13 @@ export default {
|
|
|
that.dataShow[i].loading = false
|
|
|
if (dataOne && that.dataShow[i]) {
|
|
|
var pcursor = dataOne.pcursor
|
|
|
+ that.dataShow[i].pcursor = pcursor
|
|
|
that.dataShow[i].commentList = dataOne.commentList.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
|
show: false
|
|
|
}
|
|
|
})
|
|
|
- that.dataShow[i].pcursor = pcursor
|
|
|
} else {
|
|
|
that.dataShow[i].commentList = []
|
|
|
}
|
|
@@ -423,25 +451,30 @@ export default {
|
|
|
return new Promise(resolve => setTimeout(resolve, d))
|
|
|
},
|
|
|
remove(allItem, item, index) {
|
|
|
- console.log(allItem, item)
|
|
|
- commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
|
|
|
- this.getCommentList(this.ksid, allItem.photoId, null).then(dataOne => {
|
|
|
- this.dataShow[index].loading = false
|
|
|
- this.dataShow[index].commentList = []
|
|
|
- if (dataOne && this.dataShow[index]) {
|
|
|
- var pcursor = dataOne.pcursor
|
|
|
- this.dataShow[index].pcursor = pcursor
|
|
|
- this.dataShow[index].commentList = dataOne.commentList.map(item => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- show: false
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
+ allItem.loading = true
|
|
|
+ if (res.result.result == 109) {
|
|
|
+ this.$message.error('授权已过期,请重新扫码登录')
|
|
|
+ allItem.loading = false
|
|
|
+ } else {
|
|
|
+ commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
|
|
|
+ this.getCommentList(this.ksid, allItem.photoId, null).then(dataOne => {
|
|
|
+ allItem.loading = false
|
|
|
this.dataShow[index].commentList = []
|
|
|
- }
|
|
|
+ if (dataOne && this.dataShow[index]) {
|
|
|
+ var pcursor = dataOne.pcursor
|
|
|
+ this.dataShow[index].pcursor = pcursor
|
|
|
+ this.dataShow[index].commentList = dataOne.commentList.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.dataShow[index].commentList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
},
|
|
|
getScrollTop: function() {
|
|
|
var scrollTop = 0,
|
|
@@ -505,9 +538,8 @@ export default {
|
|
|
document.documentElement.scrollTop = 0
|
|
|
},
|
|
|
addComment(item, index) {
|
|
|
- console.log(item)
|
|
|
var word = item.keyword.substring(this.length)
|
|
|
- console.log(word)
|
|
|
+ item.loading = true
|
|
|
var params = {
|
|
|
ksid: this.ksid,
|
|
|
photoId: item.photoId,
|
|
@@ -516,29 +548,35 @@ export default {
|
|
|
repltTo: this.repltTo
|
|
|
}
|
|
|
commentAdd(params).then(res => {
|
|
|
- console.log(res)
|
|
|
if (res.code == 0) {
|
|
|
- this.getCommentList(this.ksid, item.photoId, null).then(dataOne => {
|
|
|
- this.dataShow[index].loading = false
|
|
|
- this.dataShow[index].commentList = []
|
|
|
- if (dataOne && this.dataShow[index]) {
|
|
|
- this.dataShow[index].commentList = dataOne.commentList.map(item => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- show: false
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
+ if (res.result.result == 109) {
|
|
|
+ this.$message.error('授权已过期,请重新扫码登录')
|
|
|
+ item.loading = false
|
|
|
+ } else {
|
|
|
+ this.getCommentList(this.ksid, item.photoId, null).then(dataOne => {
|
|
|
+ item.loading = false
|
|
|
this.dataShow[index].commentList = []
|
|
|
- }
|
|
|
- })
|
|
|
+ if (dataOne && this.dataShow[index]) {
|
|
|
+ var pcursor = dataOne.pcursor
|
|
|
+ this.dataShow[index].pcursor = pcursor
|
|
|
+ this.dataShow[index].commentList = dataOne.commentList.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.dataShow[index].commentList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.length = 0
|
|
|
item.keyword = ''
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
backAdd(item, items) {
|
|
|
- console.log(item, items)
|
|
|
// authorId commentId
|
|
|
item.keyword = '回复' + items.authorName + ':'
|
|
|
this.length = item.keyword.length
|
|
@@ -579,7 +617,6 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
showCode(n, o) {
|
|
|
- console.log(n, o)
|
|
|
if (!n) {
|
|
|
window.clearInterval(objTimer)
|
|
|
} else {
|