+
+
{{ info.nickName }}
@@ -272,7 +272,7 @@
-
+
@@ -788,7 +793,6 @@ function reminderDialogConfirm() {
nickname: info.value.nickName,
};
goEasySendPKMessage(data).then((res) => {
- console.log(res);
messageslist.value.push(res);
reminder.value = false;
resets();
@@ -885,17 +889,14 @@ function handleClick(time) {
handleClickdata.value = time;
isPage.value = true;
messageRead();
- console.log(time);
getUserInfo({
id: handleClickdata.value.senderId,
}).then((res) => {
- console.log(res);
info.value = res;
goEasyGetMessages({
id: String(handleClickdata.value.senderId),
timestamp: null,
}).then((res) => {
- console.log(res);
messageslist.value = res;
nextTick(() => {
if (chatlistContainer.value) {
@@ -993,14 +994,19 @@ function scrollHandler() {
// 获取pk列表
-function PkList(body) {
+function PkList(body,type) {
+ console.log("body", body);
getPkList(body).then((res) => {
+ console.log("res", res);
+ if (type == "load" && res.length == []) {
+ page.value--;
+ }
if (body.condition.type == 2 || body.condition.type == undefined) {
HallList.value.push(...res);
if (PKistodayorhall.value) {
list.value = HallList.value;
}
- } else {
+ } else if (body.condition.type == 1) {
TodayList.value.push(...res);
if (!PKistodayorhall.value) {
list.value = TodayList.value;
@@ -1008,13 +1014,13 @@ function PkList(body) {
}
});
}
+
// 加载更多
function load() {
- page.value++;
if (searchStatus.value) {
const body = {
status: 0,
- page: page.value,
+ page: page.value++,
size: 10,
userId: user.value.id,
condition: {},
@@ -1023,7 +1029,7 @@ function load() {
if (PKistodayorhall.value) {
body.condition.type = 2;
} else {
- body.condition.type = 2;
+ body.condition.type = 1;
}
} else {
if (PKistodayorhall.value) {
@@ -1065,7 +1071,7 @@ function load() {
} else {
const body = {
status: 0,
- page: page.value,
+ page: page.value++,
size: 10,
userId: user.value.id,
condition: {},
@@ -1074,7 +1080,7 @@ function load() {
if (PKistodayorhall.value) {
body.condition.type = 2;
} else {
- body.condition.type = 2;
+ body.condition.type = 1;
}
} else {
if (PKistodayorhall.value) {
@@ -1082,7 +1088,7 @@ function load() {
body.condition.type = 1;
}
}
- PkList(body);
+ PkList(body,"load");
}
}
@@ -1090,6 +1096,7 @@ function load() {
function Switch() {
searchStatus.value = false;
PKistodayorhall.value = !PKistodayorhall.value;
+ handleClickdata.value = null;
if (PKistodayorhall.value) {
list.value = HallList.value;
} else {
@@ -1099,17 +1106,19 @@ function Switch() {
//搜索按钮
function search(data) {
+ handleClickdata.value = null;
const body = {
status: 0,
size: 10,
userId: user.value.id,
condition: {},
};
+
if (timevalue.value == null) {
if (PKistodayorhall.value) {
body.condition.type = 2;
} else {
- body.condition.type = 2;
+ body.condition.type = 1;
}
} else {
if (PKistodayorhall.value) {
@@ -1117,6 +1126,7 @@ function search(data) {
body.condition.type = 1;
}
}
+
if (countryvalue.value != null) {
body.condition.country = countryvalue.value;
}
@@ -1147,11 +1157,13 @@ function search(data) {
end: timevalue.value[1] / 1000,
};
}
- if (PKistodayorhall) {
+
+ if (PKistodayorhall.value) {
HallList.value = [];
} else {
TodayList.value = [];
}
+
body.page = 0;
page.value = 0;
list.value = [];
@@ -1161,7 +1173,9 @@ function search(data) {
searchStatus.value = true;
}
PkList(body);
+ page.value = 1;
}
+
//重置按钮
function reset() {
searchStatus.value = false;
@@ -1204,7 +1218,7 @@ onMounted(() => {
user.value = res;
PkList({
status: 0,
- page: 1,
+ page: 0,
size: 10,
userId: user.value.id,
condition: {
@@ -1213,13 +1227,14 @@ onMounted(() => {
});
PkList({
status: 0,
- page: 1,
+ page: 0,
size: 10,
userId: user.value.id,
condition: {
type: 2,
},
});
+ page.value = 1;
})
.catch((err) => {
console.log(err);
@@ -1396,7 +1411,8 @@ onBeforeUnmount(() => {
.infinite-list {
width: 100%;
height: 100%;
- border-radius: 16px;
+ border-top-left-radius: 16px;
+ border-bottom-right-radius: 16px;
background-color: #ffffff;
}
.infinite-list-item {
@@ -1519,6 +1535,21 @@ onBeforeUnmount(() => {
border-top-right-radius: 16px;
border-left: 1px solid #03aba82f;
}
+.chatNotDeta{
+ width: 100%;
+ height: 100%;
+ background-color: #ffffff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border-top-right-radius: 16px;
+ border-left: 1px solid #03aba82f;
+}
+.chatNotDeta-text{
+ font-size: 20px;
+ color: #03aba8;
+ font-weight: bold;
+}
.chat-name {
width: 100%;
height: 50px;