上拉刷新空页面wenti

master
2023-02-13 11:57:52 +08:00
parent 8001622be2
commit d5d47ffae5
1 changed files with 2 additions and 52 deletions

View File

@ -484,7 +484,6 @@ export default {
this.goodListData = res.data.result.data this.goodListData = res.data.result.data
}) })
}, },
// (-->bug) // (-->bug)
goPag (kh) { goPag (kh) {
this.retractBox(0, 250) this.retractBox(0, 250)
@ -492,7 +491,6 @@ export default {
if (kh - this.keyHeight > 0) { if (kh - this.keyHeight > 0) {
this.retractBox(this.keyHeight - kh, 250) this.retractBox(this.keyHeight - kh, 250)
} }
} }
}, },
// //
@ -501,11 +499,8 @@ export default {
duration: t, duration: t,
timingFunction: 'linear', timingFunction: 'linear',
}) })
this.animation = animation this.animation = animation
animation.height(x).step() animation.height(x).step()
this.anData = animation.export() this.anData = animation.export()
}, },
// //
@ -552,47 +547,6 @@ export default {
// id,index // id,index
}, },
// sendMessage() {
// //
// if (this.msg == "") {
// return 0;
// }
// // msg,my(,穿)
// let msg = {
// operation_type: "MESSAGE",
// to: this.toUser.userId,
// from: this.user.id,
// message_type: "MESSAGE",
// context: this.msg,
// talk_id: this.params.talkId,
// }
// this.ws.send(JSON.stringify(msg))
// this.msgList.push({
// "text": this.msg,
// "my": true,
// "messageType": 'MESSAGE'
// })
// console.log(this.msgList, 'this.msgListthis.msgListthis.msgListthis.msgListthis.msgList')
// //
// let type = 'down';
// this.msgGo(type)
// //
// // this.msgKf(this.msg)
// //
// this.msg = ""
// },
// msgKf(x) {
// // loading
// // this.msgLoad = true
// //
// //
// // setTimeout(() => {
// // // loading
// // this.msgLoad = false
// // // this.msgGo()
// // }, 2000)
// },
// //
ckAdd () { ckAdd () {
if (!this.showTow) { if (!this.showTow) {
@ -607,16 +561,12 @@ export default {
}, },
// / // /
retractBox (x, t) { retractBox (x, t) {
var animation = uni.createAnimation({ var animation = uni.createAnimation({
duration: t, duration: t,
timingFunction: 'ease', timingFunction: 'ease',
}) })
this.animation = animation this.animation = animation
animation.translateY(x).step() animation.translateY(x).step()
this.animationData = animation.export() this.animationData = animation.export()
}, },
async getTalkMessage () { async getTalkMessage () {
@ -627,7 +577,7 @@ export default {
this.msgList.unshift(...res.data.result) this.msgList.unshift(...res.data.result)
type = 'up' type = 'up'
} else { } else {
this.msgList = res.data.result this.msgList.unshift(...res.data.result)
type = 'down' type = 'down'
} }
this.msgList.forEach(item => { this.msgList.forEach(item => {
@ -640,12 +590,12 @@ export default {
console.log(this.msgList); console.log(this.msgList);
this.msgGo(type) this.msgGo(type)
}, },
//
touchMoreMessage (e) { touchMoreMessage (e) {
if (e.target.scrollTop == 0) { if (e.target.scrollTop == 0) {
this.params.pageNumber = this.params.pageNumber + 1 this.params.pageNumber = this.params.pageNumber + 1
this.getTalkMessage() this.getTalkMessage()
} }
}, },
async getTalk (userId) { async getTalk (userId) {
getTalkByUser(userId).then(res => { getTalkByUser(userId).then(res => {