2024-06-04 21:40:25 +08:00
|
|
|
<!-- 消息通知 -->
|
|
|
|
<template>
|
2024-06-15 11:25:51 +08:00
|
|
|
|
|
|
|
<view style="position: fixed; top: 0;bottom: 0; left: 0; right: 0;background:#ffffff; z-index: -2;"></view>
|
|
|
|
|
2024-06-12 12:29:17 +08:00
|
|
|
<view class="box">
|
|
|
|
<view class="boxview" @click="handerTo('./Interactivemessage')">
|
|
|
|
<view class="boxmessge"></view>
|
|
|
|
<image class="boximage" src="../../static/images/sign/message2.png"></image>
|
|
|
|
<text class="boxtext">互动消息</text>
|
|
|
|
</view>
|
|
|
|
<view class="boxview" @click="handerTo('./systemnotification?id=1')">
|
|
|
|
<view class="boxmessge"></view>
|
|
|
|
<image class="boximage" src="../../static/images/sign/message.png"></image>
|
|
|
|
<text class="boxtext">系统通知</text>
|
|
|
|
</view>
|
|
|
|
<view class="boxview" @click="handerTo('./systemnotification?id=2')">
|
|
|
|
<view class="boxmessge"></view>
|
|
|
|
<image class="boximage" src="../../static/images/sign/message1.png"></image>
|
|
|
|
<text class="boxtext">审核通知</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 内容 -->
|
2024-06-04 21:40:25 +08:00
|
|
|
<view>
|
2024-06-15 11:25:51 +08:00
|
|
|
<up-swipe-action v-for="item in arrlist" :key="index"
|
|
|
|
style="margin-left: 32rpx; margin-right: 32rpx;margin-top: 48rpx;">
|
2024-06-18 19:06:14 +08:00
|
|
|
<up-swipe-action-item :options="options1" v-if="item.sysUserInfo.userId != myuserid">
|
|
|
|
<view class="contentbox, swipe-action__content__text" style="display: flex;"
|
|
|
|
@click="gotoAddr(item.sysUserInfo.userId,item.sysUserInfo.infoName)">
|
2024-06-12 12:29:17 +08:00
|
|
|
<view>
|
2024-06-18 19:06:14 +08:00
|
|
|
<view class="contentboxtop" v-if="myuserid.value == item.notificationHistorical.senderId.value && item.notificationHistorical.sattic == 0 " ></view>
|
2024-06-12 12:29:17 +08:00
|
|
|
<image class="contentboximage" src="../../static/images/icon/tu4-1.jpg"></image>
|
|
|
|
</view>
|
|
|
|
<view style="margin-left: 26rpx;width: 612rpx;">
|
2024-06-18 19:06:14 +08:00
|
|
|
<text class="contentboxtexttop">{{item.sysUserInfo.infoName}}</text>
|
|
|
|
|
|
|
|
<text
|
|
|
|
v-if="myuserid.value == item.notificationHistorical.senderId.value && item.notificationHistorical.sendTime != null "
|
|
|
|
class="contentboxtextmiddle">{{item.notificationHistorical.sendTime}}</text>
|
|
|
|
<text v-else class="contentboxtextmiddle">{{new Date().getMonth()+1 +"-"+ new Date().getDate()}}</text>
|
|
|
|
|
|
|
|
<text
|
|
|
|
v-if="myuserid.value == item.notificationHistorical.senderId.value && item.notificationHistorical.messageType == 1"
|
|
|
|
class="contentboxtextbottom">{{item.notificationHistorical.messageText}}</text>
|
|
|
|
<text
|
|
|
|
v-else-if="myuserid.value == item.notificationHistorical.senderId.value && item.notificationHistorical.messageType == 0"
|
|
|
|
class="contentboxtextbottom">[图片]</text>
|
|
|
|
|
2024-06-12 12:29:17 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</up-swipe-action-item>
|
|
|
|
</up-swipe-action>
|
2024-06-04 21:40:25 +08:00
|
|
|
</view>
|
2024-06-12 12:29:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-04 21:40:25 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-06-12 12:29:17 +08:00
|
|
|
import {
|
2024-06-18 19:06:14 +08:00
|
|
|
onMounted,
|
|
|
|
ref,
|
2024-06-15 11:25:51 +08:00
|
|
|
reactive,
|
|
|
|
getCurrentInstance
|
2024-06-12 12:29:17 +08:00
|
|
|
} from 'vue';
|
2024-06-18 19:06:14 +08:00
|
|
|
import {
|
|
|
|
listFriendShip,
|
|
|
|
getFriendShip,
|
|
|
|
delFriendShip,
|
|
|
|
addFriendShip,
|
|
|
|
updateFriendShip,
|
|
|
|
listFriendShipId,
|
|
|
|
} from "@/api/signln/FriendShip/FriendShip";
|
2024-06-12 12:29:17 +08:00
|
|
|
|
2024-06-18 19:06:14 +08:00
|
|
|
import {
|
|
|
|
GetListid
|
|
|
|
} from "@/api/signln/SignTa/SignTa";
|
|
|
|
|
|
|
|
import {
|
|
|
|
listLatestarticle
|
|
|
|
} from "@/api/signln/NotificationHistorical/NotificationHistorical";
|
2024-06-15 11:25:51 +08:00
|
|
|
const {
|
|
|
|
proxy
|
|
|
|
} = getCurrentInstance();
|
|
|
|
|
2024-06-18 19:06:14 +08:00
|
|
|
const arrlist = ref([
|
|
|
|
// {
|
|
|
|
// id: 1,
|
|
|
|
// name: "恋爱60秒",
|
|
|
|
// time: "12:00",
|
|
|
|
// content: "你有空把上次布置得任务交一下"
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// id: 2,
|
|
|
|
// name: "恋爱60秒1",
|
|
|
|
// time: "12:00",
|
|
|
|
// content: "你有空把上次布置得任务交一下"
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// id: 3,
|
|
|
|
// name: "恋爱60秒2",
|
|
|
|
// time: "12:00",
|
|
|
|
// content: "你有空把上次布置得任务交一下"
|
|
|
|
// },
|
2024-06-15 11:25:51 +08:00
|
|
|
])
|
|
|
|
|
2024-06-12 12:29:17 +08:00
|
|
|
// 使用 reactive 创建响应式对象
|
|
|
|
const options1 = reactive([{
|
2024-06-18 19:06:14 +08:00
|
|
|
text: '已读',
|
2024-06-12 12:29:17 +08:00
|
|
|
style: {
|
|
|
|
backgroundColor: '#3c9cff'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2024-06-18 19:06:14 +08:00
|
|
|
// {
|
|
|
|
// text: '',
|
|
|
|
// style: {
|
|
|
|
// backgroundColor: '#f56c6c'
|
|
|
|
// }
|
|
|
|
// }
|
2024-06-12 12:29:17 +08:00
|
|
|
|
|
|
|
]);
|
|
|
|
// 前面的跳转
|
2024-06-15 11:25:51 +08:00
|
|
|
function handerTo(url) {
|
2024-06-12 12:29:17 +08:00
|
|
|
uni.navigateTo({
|
|
|
|
url: url
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//聊天的跳转
|
2024-06-18 19:06:14 +08:00
|
|
|
function gotoAddr(id,name) {
|
|
|
|
proxy.$tab.navigateTo("/pages/Friend/messagechat?id=" + id +"&name="+name)
|
2024-06-12 12:29:17 +08:00
|
|
|
}
|
2024-06-18 19:06:14 +08:00
|
|
|
|
|
|
|
const form = {
|
|
|
|
// pageNum: 1,
|
|
|
|
// pageSize: 10,
|
|
|
|
userId: null,
|
|
|
|
friendId: null,
|
|
|
|
actionUserId: null,
|
|
|
|
actionTime: null,
|
|
|
|
status: null
|
|
|
|
}
|
|
|
|
const myuserid = ref(0);
|
|
|
|
onMounted(() => {
|
|
|
|
//获取$("#")
|
|
|
|
const getuser = GetListid().then(res => {
|
|
|
|
myuserid.value = res;
|
|
|
|
console.log("党情登录用户" + myuserid.value)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
//获取所有的好友
|
|
|
|
function GetList() {
|
|
|
|
listFriendShipId(form.value).then(response => {
|
|
|
|
arrlist.value = response.rows;
|
|
|
|
// console.log(arrlist.value)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
GetList();
|
2024-06-04 21:40:25 +08:00
|
|
|
</script>
|
|
|
|
|
2024-06-12 12:29:17 +08:00
|
|
|
<style scoped>
|
|
|
|
.swipe-action__content__text {
|
|
|
|
padding: 0rpx !important;
|
|
|
|
margin: 0rpx !important;
|
|
|
|
height: 82rpx !important;
|
|
|
|
}
|
|
|
|
|
2024-06-18 19:06:14 +08:00
|
|
|
:deep(.u-index-list__letter[data-v-5e193795]) {
|
|
|
|
top: 90.5px !important;
|
|
|
|
}
|
|
|
|
|
2024-06-12 12:29:17 +08:00
|
|
|
.box {
|
|
|
|
height: 208rpx;
|
|
|
|
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
2024-06-15 11:25:51 +08:00
|
|
|
background-color: #ffffff;
|
2024-06-12 12:29:17 +08:00
|
|
|
display: flex;
|
|
|
|
margin-left: 32rpx;
|
|
|
|
margin-right: 32rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.boxmessge {
|
|
|
|
width: 24rpx;
|
|
|
|
height: 24rpx;
|
|
|
|
background: #fa3939;
|
|
|
|
border-radius: 24rpx;
|
|
|
|
position: relative;
|
|
|
|
left: 96rpx;
|
|
|
|
top: 24rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.boximage {
|
|
|
|
width: 120rpx;
|
|
|
|
height: 120rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.boxview {
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.boxtext {
|
|
|
|
font-weight: 600;
|
|
|
|
/* width: 112rpx; */
|
|
|
|
height: 28rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
text-align: left;
|
|
|
|
color: #000000;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentbox {
|
|
|
|
/* width: 750rpx; */
|
|
|
|
height: 82rpx;
|
|
|
|
/* margin-top: -24rpx; */
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentboximage {
|
|
|
|
width: 82rpx;
|
|
|
|
height: 82rpx;
|
|
|
|
border-radius: 82rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentboxtop {
|
|
|
|
width: 24rpx;
|
|
|
|
height: 24rpx;
|
|
|
|
background: #fa3939;
|
|
|
|
border-radius: 24rpx;
|
|
|
|
position: fixed;
|
|
|
|
left: 56rpx;
|
|
|
|
/* top: 24rpx; */
|
|
|
|
z-index: 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.u-page {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.u-demo-block__title {
|
|
|
|
padding: 10px 0 2px 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.swipe-action {
|
|
|
|
&__content {
|
|
|
|
padding: 25rpx 0;
|
|
|
|
|
|
|
|
&__text {
|
|
|
|
font-size: 15px;
|
|
|
|
color: $u-main-color;
|
|
|
|
padding-left: 30rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentboxtexttop {
|
|
|
|
font-weight: 600;
|
|
|
|
/* width: 125rpx; */
|
|
|
|
height: 30rpx;
|
|
|
|
font-size: 30rpx;
|
|
|
|
text-align: left;
|
|
|
|
color: #000000;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentboxtextmiddle {
|
|
|
|
font-weight: Regular;
|
|
|
|
/* width: 50rpx; */
|
|
|
|
height: 17rpx;
|
|
|
|
font-size: 20rpx;
|
|
|
|
text-align: right;
|
|
|
|
color: #999999;
|
|
|
|
vertical-align: middle;
|
|
|
|
float: right;
|
|
|
|
display: block;
|
|
|
|
/* margin-left: 381rpx; */
|
|
|
|
margin-right: 24rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentboxtextbottom {
|
|
|
|
font-weight: Regular;
|
|
|
|
/* width: 364rpx; */
|
|
|
|
height: 26rpx;
|
|
|
|
font-size: 26rpx;
|
|
|
|
text-align: left;
|
|
|
|
color: #999999;
|
|
|
|
vertical-align: middle;
|
|
|
|
display: block;
|
|
|
|
line-height: 26rpx;
|
|
|
|
margin-top: 12rpx;
|
|
|
|
}
|
|
|
|
</style>
|