This commit is contained in:
pengxiaolong
2025-07-18 13:06:06 +08:00
parent 6dec463705
commit 31527ba8a6
1853 changed files with 65500 additions and 98288 deletions

View File

@@ -0,0 +1,316 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const components_ChatId = require("../../../components/ChatId.js");
const components_TimeFormatting = require("../../../components/TimeFormatting.js");
const components_goEasyTool_tool = require("../../../components/goEasyTool/tool.js");
const textmessage = () => "./messageComponent/textmessage.js";
const InvitationComponents = () => "./moreMessageComponents/InvitationComponents.js";
const _sfc_main = {
data() {
return {
userId: "",
// 对方用户id
nickname: "",
// 对方用户昵称
triggered: false,
// 下拉刷新状态
avatar: "",
// 对方用户头像
chatList: [],
// 聊天记录
userinfo: {},
// 自己用户信息
ButtonStatus: false,
// 发送按钮状态
MoreStatus: false,
// 更多消息类型弹窗状态
KeyboardHeight: 0,
// 键盘高度
content: "",
// 输入框内容
MoreItemStatus: null,
// 更多消息类型弹窗点击属性
ioshide: 0,
// 隐藏ios键盘
ElementPositioning: null,
// 元素定位
scrollviewheight: 0,
// 滚动视图高度
Elementheight: 0,
// 元素高度
Scrolling: false,
// 滚动状态
scrollTop: 0,
// 滚动高度
judgescrollTop: false,
// 判断滚动高度
onPage: false,
// 是否在页面
timer: null,
// 定时器
lastTimestamp: null,
// 上一次刷新时间戳
popUpList: [
{
name: "邀请",
icon: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chat_invite.png",
type: "Invitation"
}
]
/// 更多消息类型弹窗列表
};
},
onShow() {
this.onPage = true;
},
onHide() {
this.onPage = false;
},
onLoad(options) {
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
this.userinfo = res;
}
});
this.userId = options.userId;
this.nickname = options.nickname;
this.avatar = options.avatar;
components_goEasyTool_tool.getConversationMessages(this.$goeasy, this.userId, null).then((res) => {
this.chatList = res.map((item) => {
item.id = components_ChatId.generateId();
return item;
});
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:209", "获取和对方用户的聊天记录", this.chatList);
setTimeout(() => {
this.ElementPositioning = this.chatList[this.chatList.length - 1].id;
}, 300);
const query = common_vendor.index.createSelectorQuery().in(this);
query.select(".inputComponent").boundingClientRect((res2) => {
this.Elementheight = res2.height * 2;
}).exec();
});
components_goEasyTool_tool.messageRead(this.$goeasy, this.userId).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:223", "已读对方的消息");
});
this.getIOSDeviceType();
var im = this.$goeasy.im;
im.on(common_vendor.jo.IM_EVENT.PRIVATE_MESSAGE_RECEIVED, this.onPrivateMessageReceived);
im.on(common_vendor.jo.IM_EVENT.MESSAGE_READ, this.onMessageRead);
this.getscrollviewheight();
},
methods: {
//时间显示
checkInterval(timestamp) {
if (!this.lastTimestamp) {
this.lastTimestamp = timestamp;
return true;
}
const timeDiff = timestamp - this.lastTimestamp;
if (timeDiff >= 3e5) {
this.lastTimestamp = timestamp;
return true;
}
return false;
},
//时间格式化
TimeFormatting: components_TimeFormatting.TimeFormatting,
//获取容器高度
getscrollviewheight() {
const queryheight = common_vendor.index.createSelectorQuery().in(this);
queryheight.select(".scroll").boundingClientRect((res) => {
this.scrollviewheight = res.height;
}).exec();
},
//滚动事件
onScroll(event) {
if (!this.judgescrollTop) {
this.scrollTop = event.detail.scrollTop;
this.judgescrollTop = true;
} else if (this.scrollTop - event.detail.scrollTop > this.scrollviewheight) {
this.Scrolling = true;
} else if (this.scrollTop - event.detail.scrollTop < this.scrollviewheight) {
this.Scrolling = false;
}
},
//监听已读消息
onMessageRead(message) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:275", "已读消息", message);
},
//监听接受消息
onPrivateMessageReceived(message) {
if (!this.Scrolling) {
this.ElementPositioning = message.id = components_ChatId.generateId();
this.judgescrollTop = false;
} else {
message.id = components_ChatId.generateId();
}
this.chatList.push(message);
if (this.onPage) {
components_goEasyTool_tool.messageRead(this.$goeasy, this.userId).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:288", "已读对方的消息");
});
}
},
//发送消息
onSend() {
if (this.content != "") {
components_goEasyTool_tool.sendMessage(
this.$goeasy,
this.userId,
this.content,
this.avatar,
this.nickname
).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:302", "发送成功", res);
this.ElementPositioning = res.id = components_ChatId.generateId();
this.chatList.push(res);
this.judgescrollTop = false;
});
this.content = "";
this.ButtonStatus = false;
}
},
//ios兼容
getIOSDeviceType() {
const systemInfo = common_vendor.index.getSystemInfoSync();
const model = systemInfo.model;
if (/iPhone X|iPhone11|iPhone12|iPhone13|iPhone14/i.test(model)) {
if (/iPhone X|iPhone XS|iPhone 11 Pro/i.test(model)) {
this.ioshide = 88;
} else if (/iPhone 12|iPhone 13|iPhone 14/i.test(model)) {
this.ioshide = 94;
}
}
},
//更多消息类型弹窗事件
onMore(Status) {
if (!this.Scrolling) {
this.ElementPositioning = null;
setTimeout(() => {
this.ElementPositioning = this.chatList[this.chatList.length - 1].id;
}, 100);
this.judgescrollTop = false;
}
this.getscrollviewheight();
this.MoreStatus = Status;
const query = common_vendor.index.createSelectorQuery().in(this);
query.select(".inputComponent").boundingClientRect((res) => {
this.Elementheight = res.height * 2;
}).exec();
},
//更多消息类型弹窗点击事件
onMoreItem(type) {
this.MoreItemStatus = type;
},
// 获取键盘高度
onFocus(event) {
if (!this.Scrolling) {
this.ElementPositioning = null;
setTimeout(() => {
this.ElementPositioning = this.chatList[this.chatList.length - 1].id;
}, 100);
this.judgescrollTop = false;
}
this.getscrollviewheight();
this.KeyboardHeight = event.detail.height * 2 - this.ioshide;
const query = common_vendor.index.createSelectorQuery().in(this);
query.select(".inputComponent").boundingClientRect((res) => {
this.Elementheight = res.height * 2;
}).exec();
},
//键盘消失
onBlur(event) {
this.KeyboardHeight = 0;
const query = common_vendor.index.createSelectorQuery().in(this);
query.select(".inputComponent").boundingClientRect((res) => {
this.Elementheight = res.height * 2;
}).exec();
this.getscrollviewheight();
},
//按钮切换
SendInput(event) {
const query = common_vendor.index.createSelectorQuery().in(this);
query.select(".inputComponent").boundingClientRect((res) => {
this.Elementheight = res.height * 2;
}).exec();
if (event.target.value != "") {
this.ButtonStatus = true;
} else {
this.ButtonStatus = false;
}
},
// 返回上一页
onBack() {
this.onPage = false;
common_vendor.wx$1.navigateBack({
delta: 1
});
}
},
components: {
textmessage,
InvitationComponents
}
};
if (!Array) {
const _component_InvitationComponents = common_vendor.resolveComponent("InvitationComponents");
_component_InvitationComponents();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o(($event) => $options.onMore(false)),
b: common_vendor.o((...args) => $options.onBack && $options.onBack(...args)),
c: common_vendor.t($data.nickname),
d: common_vendor.o(($event) => $options.onMore(false)),
e: common_vendor.f($data.chatList, (item, index, i0) => {
return common_vendor.e({
a: $options.checkInterval(item.timestamp)
}, $options.checkInterval(item.timestamp) ? {
b: common_vendor.t($options.TimeFormatting(item.timestamp))
} : {}, {
c: item.id,
d: item.id
});
}),
f: common_vendor.o((...args) => _ctx.onRefresherRefresh && _ctx.onRefresherRefresh(...args)),
g: common_vendor.o((...args) => _ctx.onScrollToLower && _ctx.onScrollToLower(...args)),
h: $data.triggered,
i: $data.ElementPositioning,
j: common_vendor.o((...args) => $options.onScroll && $options.onScroll(...args)),
k: common_vendor.o(($event) => $options.onMore(false)),
l: $data.MoreStatus || $data.KeyboardHeight != 0 || $data.Elementheight != 0 ? $data.MoreStatus ? 650 + $data.Elementheight + "rpx" : $data.KeyboardHeight != 0 ? $data.KeyboardHeight + $data.Elementheight + "rpx" : $data.Elementheight + "rpx" : $data.Elementheight + "rpx",
m: common_vendor.o([($event) => $data.content = $event.detail.value, (...args) => $options.SendInput && $options.SendInput(...args)]),
n: common_vendor.o((...args) => $options.onFocus && $options.onFocus(...args)),
o: common_vendor.o((...args) => $options.onBlur && $options.onBlur(...args)),
p: $data.content,
q: !$data.ButtonStatus
}, !$data.ButtonStatus ? {
r: common_vendor.o(($event) => $options.onMore(!$data.MoreStatus))
} : {}, {
s: $data.ButtonStatus
}, $data.ButtonStatus ? {
t: common_vendor.o((...args) => $options.onSend && $options.onSend(...args))
} : {}, {
v: $data.MoreStatus || $data.KeyboardHeight != 0 ? $data.MoreStatus ? "650rpx" : $data.KeyboardHeight != 0 ? $data.KeyboardHeight + "rpx" : "0" : "0",
w: common_vendor.f($data.popUpList, (item, index, i0) => {
return {
a: item.icon,
b: common_vendor.t(item.name),
c: common_vendor.o(($event) => $options.onMoreItem(item.type), index),
d: index
};
}),
x: $data.MoreStatus || $data.KeyboardHeight != 0 ? $data.MoreStatus ? "0" : $data.KeyboardHeight != 0 ? "0" : $data.KeyboardHeight + "rpx" : "-650rpx",
y: $data.MoreItemStatus == "Invitation"
}, $data.MoreItemStatus == "Invitation" ? {} : {}, {
z: common_vendor.o(() => {
}),
A: $data.MoreItemStatus == null ? "-1000rpx" : "0",
B: common_vendor.o(($event) => $options.onMoreItem(null)),
C: $data.MoreItemStatus == null ? "100vh" : "0"
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-f4b42ac4"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/index/chat/chat.js.map

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "聊天页",
"usingComponents": {
"invitation-components": "./moreMessageComponents/InvitationComponents"
}
}

View File

@@ -0,0 +1 @@
<view class="chat data-v-f4b42ac4"><view class="bg data-v-f4b42ac4" bindtap="{{a}}"><image class="bgImg data-v-f4b42ac4" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-f4b42ac4" bindtap="{{b}}"><image class="ReturnImg data-v-f4b42ac4" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-f4b42ac4" bindtap="{{d}}">{{c}}</view><view class="content data-v-f4b42ac4" bindtap="{{k}}" style="{{'bottom:' + l}}"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-f4b42ac4" refresher-enabled="true" refresher-threshold="40" bindrefresherrefresh="{{f}}" lower-threshold="100" bindscrolltolower="{{g}}" refresher-triggered="{{h}}" scroll-into-view="{{i}}" bindscroll="{{j}}"><view wx:for="{{e}}" wx:for-item="item" wx:key="c" class="chat-card data-v-f4b42ac4" id="{{item.d}}"><view wx:if="{{item.a}}" class="chat-time data-v-f4b42ac4">{{item.b}}</view><view class="chat-avatar data-v-f4b42ac4"></view></view></scroll-view></view><view class="inputComponent data-v-f4b42ac4" id:inputComponent style="{{'bottom:' + v}}"><view class="textareacomponent data-v-f4b42ac4"><block wx:if="{{r0}}"><textarea bindinput="{{m}}" auto-height class="input data-v-f4b42ac4" maxlength="{{500}}" cursor-spacing="20" bindfocus="{{n}}" bindblur="{{o}}" adjust-position="{{false}}" value="{{p}}"></textarea></block></view><view class="sendComponent data-v-f4b42ac4"><image wx:if="{{q}}" class="MoreImg data-v-f4b42ac4" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chat_add.png" mode="scaleToFill" bindtap="{{r}}"/><button wx:if="{{s}}" class="send data-v-f4b42ac4" bindtap="{{t}}">发送</button></view></view><view class="MoreComponent data-v-f4b42ac4" style="{{'bottom:' + x}}"><view class="Morecontent data-v-f4b42ac4"><view wx:for="{{w}}" wx:for-item="item" wx:key="d" class="MoreList data-v-f4b42ac4"><view class="MoreItem data-v-f4b42ac4" bindtap="{{item.c}}"><image class="Moreicon data-v-f4b42ac4" src="{{item.a}}" mode="scaleToFill"/><text class="MoreName data-v-f4b42ac4">{{item.b}}</text></view></view></view></view><view class="popUpInvitation data-v-f4b42ac4" bindtap="{{B}}" style="{{'top:' + C}}"><view class="popUpInvitationContent data-v-f4b42ac4" catchtap="{{z}}" style="{{'bottom:' + A}}"><invitation-components wx:if="{{y}}" class="data-v-f4b42ac4" u-i="f4b42ac4-0" bind:__l="__l"></invitation-components></view></view></view>

View File

@@ -0,0 +1,163 @@
.bg.data-v-f4b42ac4 {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: -1;
}
.bgImg.data-v-f4b42ac4 {
width: 100%;
height: 100%;
}
.Return.data-v-f4b42ac4 {
position: fixed;
left: 35rpx;
top: 120rpx;
width: 46rpx;
height: 46rpx;
z-index: 1;
}
.title.data-v-f4b42ac4 {
position: fixed;
top: 120rpx;
left: 325rpx;
font-size: 34rpx;
color: #100e0f;
font-weight: bold;
z-index: 1;
}
.ReturnImg.data-v-f4b42ac4 {
width: 100%;
height: 100%;
}
.content.data-v-f4b42ac4 {
position: absolute;
top: 200rpx;
left: 0rpx;
right: 0rpx;
}
.scroll.data-v-f4b42ac4 {
width: 96%;
height: 100%;
padding: 0% 2% 0% 2%;
}
.inputComponent.data-v-f4b42ac4 {
position: absolute;
left: 0;
right: 0;
height: auto;
background-color: #f0f0f0;
padding: 15rpx 15rpx 37.5rpx 15rpx;
display: flex;
align-items: flex-end;
transition: bottom 0.1s ease;
}
.chat-card.data-v-f4b42ac4 {
width: 100%;
height: auto;
margin-bottom: 20rpx;
margin-top: 20rpx;
padding: 10rpx;
}
.chat-time.data-v-f4b42ac4 {
width: 100%;
height: 50rpx;
text-align: center;
font-size: 24rpx;
color: #999999;
line-height: 50rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
background-color: #00000000;
}
.chat-avatar.data-v-f4b42ac4 {
width: 100%;
height: auto;
}
.textareacomponent.data-v-f4b42ac4 {
width: 570rpx;
height: auto;
}
.input.data-v-f4b42ac4 {
width: 95%;
background-color: #ffffff;
min-height: 60rpx;
max-height: 200rpx;
border-radius: 10rpx;
padding: 10rpx;
overflow-wrap: break-word;
margin-left: 30rpx;
}
.sendComponent.data-v-f4b42ac4 {
margin-left: 40rpx;
}
.send.data-v-f4b42ac4 {
width: 100rpx;
height: 75rpx;
background-color: #539c00;
border-radius: 10rpx;
color: #ffffff;
font-size: 20rpx;
text-align: center;
line-height: 75rpx;
}
.MoreImg.data-v-f4b42ac4 {
margin-left: 20rpx;
height: 80rpx;
width: 80rpx;
margin-bottom: -10rpx;
border-radius: 50rpx;
}
.MoreComponent.data-v-f4b42ac4 {
position: fixed;
left: 0;
right: 0;
height: 650rpx;
transition: bottom 0.1s ease;
background-color: #ffffff;
}
.Morecontent.data-v-f4b42ac4 {
width: 100%;
height: 100%;
display: flex;
align-content: baseline;
flex-wrap: wrap;
}
.MoreList.data-v-f4b42ac4 {
width: 150rpx;
height: 150rpx;
background-color: #f1f1f1;
border-radius: 20rpx;
margin: 18.75rpx;
}
.MoreItem.data-v-f4b42ac4 {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.Moreicon.data-v-f4b42ac4 {
width: 80rpx;
height: 80rpx;
}
.popUpInvitation.data-v-f4b42ac4 {
position: fixed;
left: 0;
right: 0;
bottom: 0;
transition: top 0.1s ease;
}
.popUpInvitationContent.data-v-f4b42ac4 {
position: absolute;
left: 0;
right: 0;
height: 1000rpx;
transition: bottom 0.1s ease;
background-color: #ffffff;
border-top-left-radius: 40rpx;
border-top-right-radius: 40rpx;
}

View File

@@ -0,0 +1,26 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
data() {
return {};
},
onLoad() {
},
props: {
messagetext: {
type: String,
default: ""
}
},
methods: {
// 方法定义
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t($props.messagetext)
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b62657a0"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/pages/index/chat/messageComponent/textmessage.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="messagetext data-v-b62657a0">{{a}}</view>

View File

@@ -0,0 +1,5 @@
.messagetext.data-v-b62657a0{
font-size: 16px;
color: #333;
}

View File

@@ -0,0 +1,18 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
data() {
return {};
},
onLoad() {
},
methods: {
// 方法定义
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a505124c"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/pages/index/chat/moreMessageComponents/InvitationComponents.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="chat-more-message-invitation data-v-a505124c"></view>

View File

@@ -0,0 +1,6 @@
.chat-more-message-invitation.data-v-a505124c {
width: 100%;
height: 100%;
border-radius: 40rpx;
}

View File

@@ -1,19 +1,73 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const components_TimeFormatting = require("../../components/TimeFormatting.js");
const components_goEasyTool_tool = require("../../components/goEasyTool/tool.js");
const tabBar = () => "../../components/tabBar/tabBar.js";
const _sfc_main = {
data() {
return {
title: "Hello"
Conversationobj: {}
};
},
onLoad() {
components_goEasyTool_tool.getConversationList(this.$goeasy).then((res) => {
common_vendor.index.__f__("log", "at pages/index/index.vue:70", res);
this.Conversationobj = res;
});
var im = this.$goeasy.im;
im.on(common_vendor.jo.IM_EVENT.CONVERSATIONS_UPDATED, this.onConversationsUpdated);
},
methods: {
// 方法定义
//监听会话列表变化
onConversationsUpdated(conversations) {
this.Conversationobj = conversations;
},
TimeFormatting: components_TimeFormatting.TimeFormatting,
//跳转聊天页面
goChat(userId, nickname, avatar) {
common_vendor.wx$1.navigateTo({
url: `/pages/index/chat/chat?userId=${userId}&nickname=${nickname}&avatar=${avatar}`
});
}
},
components: {
tabBar
}
};
if (!Array) {
const _easycom_uni_swipe_action_item2 = common_vendor.resolveComponent("uni-swipe-action-item");
const _easycom_uni_swipe_action2 = common_vendor.resolveComponent("uni-swipe-action");
const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar");
(_easycom_uni_swipe_action_item2 + _easycom_uni_swipe_action2 + _easycom_tabBar2)();
}
const _easycom_uni_swipe_action_item = () => "../../uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.js";
const _easycom_uni_swipe_action = () => "../../uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.js";
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
if (!Math) {
(_easycom_uni_swipe_action_item + _easycom_uni_swipe_action + _easycom_tabBar)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {};
return {
a: common_vendor.f($data.Conversationobj.conversations, (item, k0, i0) => {
return common_vendor.e({
a: item.data.avatar,
b: item.unread > 0
}, item.unread > 0 ? {
c: common_vendor.t(item.unread > 99 ? "99+" : item.unread)
} : {}, {
d: common_vendor.t(item.data.nickname),
e: common_vendor.t($options.TimeFormatting(item.lastMessage.timestamp)),
f: common_vendor.t(item.lastMessage.payload.text),
g: common_vendor.o(($event) => $options.goChat(item.userId, item.data.nickname, item.data.avatar), item.userId),
h: "1cf27b2a-1-" + i0 + "," + ("1cf27b2a-0-" + i0),
i: "1cf27b2a-0-" + i0,
j: item.userId
});
}),
b: common_vendor.p({
tabIndex: 3
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]);
wx.createPage(MiniProgramPage);

View File

@@ -1,4 +1,8 @@
{
"navigationBarTitleText": "聊天",
"usingComponents": {}
"navigationBarTitleText": "聊天列表",
"usingComponents": {
"tab-bar": "../../components/tabBar/tabBar",
"uni-swipe-action-item": "../../uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item",
"uni-swipe-action": "../../uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action"
}
}

View File

@@ -0,0 +1 @@
<view class="forum data-v-1cf27b2a"><view class="bg data-v-1cf27b2a"><image class="bgImg data-v-1cf27b2a" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="title data-v-1cf27b2a">消息</view></view><view class="content data-v-1cf27b2a"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-1cf27b2a"><view wx:for="{{a}}" wx:for-item="item" wx:key="j" class="card data-v-1cf27b2a"><uni-swipe-action class="data-v-1cf27b2a" u-s="{{['d']}}" u-i="{{item.i}}" bind:__l="__l"><uni-swipe-action-item class="data-v-1cf27b2a" u-s="{{['right','d']}}" u-i="{{item.h}}" bind:__l="__l"><view class="cardContent data-v-1cf27b2a" bindtap="{{item.g}}"><image class="cardImg data-v-1cf27b2a" src="{{item.a}}" mode="scaleToFill"/><view wx:if="{{item.b}}" class="cardUnread data-v-1cf27b2a">{{item.c}}</view><view class="cardnameandtimeandNews data-v-1cf27b2a"><view class="cardnameandtime data-v-1cf27b2a"><view class="cardname data-v-1cf27b2a">{{item.d}}</view><view class="cardtime data-v-1cf27b2a">{{item.e}}</view></view><view class="cardNews data-v-1cf27b2a">{{item.f}}</view></view></view><view class="rightPosition data-v-1cf27b2a" slot="right"><view class="topPosition data-v-1cf27b2a">置顶</view><view class="Delete data-v-1cf27b2a">删除</view></view></uni-swipe-action-item></uni-swipe-action></view></scroll-view></view><view class="tabBar data-v-1cf27b2a"><tab-bar wx:if="{{b}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" u-p="{{b}}"></tab-bar></view>

View File

@@ -1,2 +1,116 @@
/* 样式定义 */
.bg.data-v-1cf27b2a {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.bgImg.data-v-1cf27b2a {
width: 100%;
height: 100%;
}
.title.data-v-1cf27b2a {
position: absolute;
top: 120rpx;
left: 335rpx;
font-size: 34rpx;
color: #100e0f;
font-weight: bold;
}
.content.data-v-1cf27b2a {
position: absolute;
top: 200rpx;
left: 0rpx;
right: 0rpx;
bottom: 100rpx;
}
.scroll.data-v-1cf27b2a {
width: 90%;
height: 100%;
padding: 0% 5% 0% 5%;
}
.card.data-v-1cf27b2a {
width: 100%;
height: 150rpx;
background-color: #fff;
border-radius: 20rpx;
margin-top: 20rpx;
}
.cardContent.data-v-1cf27b2a{
height: 150rpx;
width: 100%;
display: flex;
align-items: center;
}
.cardImg.data-v-1cf27b2a{
height: 110rpx;
width: 110rpx;
border-radius: 20rpx;
margin-left: 20rpx;
}
.cardUnread.data-v-1cf27b2a{
width: 30rpx;
height: 30rpx;
border-radius: 15rpx;
font-size: 18rpx;
color: #ffffff;
background-color: #f53123;
text-align: center;
line-height: 30rpx;
margin-top: -100rpx;
margin-left: -15rpx;
}
.cardnameandtimeandNews.data-v-1cf27b2a{
width: 500rpx;
height: 110rpx;
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.cardnameandtime.data-v-1cf27b2a{
width: 100%;
display: flex;
justify-content: space-between;
}
.cardNews.data-v-1cf27b2a{
width: 500rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 10rpx;
font-size: 28rpx;
color: #333;
}
.cardname.data-v-1cf27b2a{
font-size: 30rpx;
color: #100e0f;
font-weight: bold;
}
.cardtime.data-v-1cf27b2a{
font-size: 24rpx;
color: #999;
}
.rightPosition.data-v-1cf27b2a{
height: 150rpx;
width: 300rpx;
display: flex;
}
.topPosition.data-v-1cf27b2a{
height: 150rpx;
width: 150rpx;
background-color: #f5a623;
text-align: center;
line-height: 150rpx;
}
.Delete.data-v-1cf27b2a{
height: 150rpx;
width: 150rpx;
background-color: #f54323;
text-align: center;
line-height: 150rpx;
border-top-right-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}