mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-12 20:21:21 +08:00
加入转账和音视频通话的前端
This commit is contained in:
parent
7099ce35cd
commit
6d1a4d1e2a
@ -569,6 +569,128 @@ input {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* 转账 */
|
||||
|
||||
.transfer-box {
|
||||
width: 200px;
|
||||
height: 80px;
|
||||
margin-left: 18px;
|
||||
margin-right: 18px;
|
||||
border-radius: 3px;
|
||||
padding-left: 11px;
|
||||
padding-right: 11px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.transfer-box[paysubtype="1"], .transfer-box[paysubtype="1"]::before {
|
||||
background: #f79c46;
|
||||
}
|
||||
|
||||
.transfer-box[paysubtype="1"] i {
|
||||
background-image: url(./icon/transfer1.png);
|
||||
}
|
||||
|
||||
.transfer-box:not([paysubtype="1"]), .transfer-box:not([paysubtype="1"])::before {
|
||||
background: #f8e2c6;
|
||||
}
|
||||
|
||||
.transfer-box[paysubtype="3"] i {
|
||||
background-image: url(./icon/transfer2.png);
|
||||
}
|
||||
|
||||
.transfer-box[paysubtype="4"] i {
|
||||
background-image: url(./icon/transfer3.png);
|
||||
}
|
||||
|
||||
.transfer-box::before {
|
||||
content: "";
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
position: absolute;
|
||||
transform: rotate(45deg);
|
||||
top: 18px;
|
||||
}
|
||||
|
||||
.transfer-box[issend="0"]::before {
|
||||
left: -3px;
|
||||
}
|
||||
|
||||
.transfer-box[issend="1"]::before {
|
||||
left: 218px;
|
||||
}
|
||||
|
||||
.trans-content {
|
||||
display: flex;
|
||||
height: 60px;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.trans-content>i {
|
||||
display: block;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.transfer-texts {
|
||||
margin-left: 7px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.transfer-texts>span, .transfer-texts>font, .trans-bottom>span {
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.transfer-texts>span {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.transfer-texts>font {
|
||||
font-size: 12px;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.transfer {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.trans-bottom {
|
||||
height: 16px;
|
||||
margin-top: 1px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.trans-bottom>span {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/* 音视频通话 */
|
||||
|
||||
.call i{
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.call[calltype='1'] i {
|
||||
background-image: url(./icon/phone.png);
|
||||
}
|
||||
|
||||
.call[calltype='0'] i {
|
||||
background-image: url(./icon/video.png);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.button-row,
|
||||
.jump-row,
|
||||
@ -1406,6 +1528,26 @@ function renderPage(page) {
|
||||
}
|
||||
return messageMusicAudioTag;
|
||||
}
|
||||
function messageTransfer(message) {
|
||||
const transfer_box = document.createElement("div");
|
||||
transfer_box.className = "transfer-box";
|
||||
transfer_box.setAttribute("issend", message.is_send);
|
||||
transfer_box.setAttribute("paysubtype", message.paysubtype);
|
||||
transfer_box.innerHTML = `<div class="transfer">
|
||||
<div class="trans-content"><i></i>
|
||||
<div class="transfer-texts"><span>${message.feedesc}</span><font>${message.text}</font></div>
|
||||
</div>
|
||||
<div class="trans-bottom"><span>聊天转账</span></div>
|
||||
</div>`;
|
||||
return transfer_box;
|
||||
}
|
||||
function messageVideoAudioCall(message, side) {
|
||||
const message_call_box = document.createElement('div');
|
||||
message_call_box.className = `bubble bubble-${side} call`;
|
||||
message_call_box.setAttribute("calltype", message.call_type)
|
||||
message_call_box.innerHTML = `<i></i><span>${message.text}<span>`;
|
||||
return message_call_box;
|
||||
}
|
||||
|
||||
// 从数据列表中取出对应范围的元素并添加到容器中
|
||||
for (let i = startIndex; i < endIndex && i < chatMessages.length; i++) {
|
||||
@ -1502,6 +1644,18 @@ function renderPage(page) {
|
||||
}
|
||||
messageContent.appendChild(messageCard(message));
|
||||
|
||||
// 整合
|
||||
messageElement.className = `item item-${side}`;
|
||||
messageElement.appendChild(message.is_send ? messageContent : avatarTag);
|
||||
messageElement.appendChild(message.is_send ? avatarTag : messageContent);
|
||||
} else if (message.sub_type == 2000) {
|
||||
// displayname 和 messageTransfer
|
||||
messageContent.className = `content-wrapper content-wrapper-${side}`;
|
||||
if (message.is_chatroom && !message.is_send) {
|
||||
messageContent.appendChild(displayNameBox(message));
|
||||
}
|
||||
messageContent.appendChild(messageTransfer(message));
|
||||
|
||||
// 整合
|
||||
messageElement.className = `item item-${side}`;
|
||||
messageElement.appendChild(message.is_send ? messageContent : avatarTag);
|
||||
@ -1519,6 +1673,18 @@ function renderPage(page) {
|
||||
}
|
||||
messageContent.appendChild(messageAudioBox(message));
|
||||
|
||||
// 整合
|
||||
messageElement.className = `item item-${side}`;
|
||||
messageElement.appendChild(message.is_send ? messageContent : avatarTag);
|
||||
messageElement.appendChild(message.is_send ? avatarTag : messageContent);
|
||||
} else if (message.type == 50) {
|
||||
// displayname 和 转的文字 和 audio
|
||||
messageContent.className = `content-wrapper content-wrapper-${side}`;
|
||||
if (message.is_chatroom && !message.is_send) {
|
||||
messageContent.appendChild(displayNameBox(message));
|
||||
}
|
||||
messageContent.appendChild(messageVideoAudioCall(message, side));
|
||||
|
||||
// 整合
|
||||
messageElement.className = `item item-${side}`;
|
||||
messageElement.appendChild(message.is_send ? messageContent : avatarTag);
|
||||
|
@ -49,8 +49,8 @@ class ExportDialog(QDialog, Ui_Dialog):
|
||||
if file_type == 'html':
|
||||
self.export_type = Output.HTML
|
||||
self.export_choices = {"文本": True, "图片": True, "语音": False, "视频": False, "表情包": False,
|
||||
'音乐与音频': False, '分享卡片': False, '文件': False,
|
||||
'拍一拍等系统消息': True} # 定义导出的数据类型,默认全部选择
|
||||
'音乐与音频': False, '分享卡片': False, '文件': False, '转账': False, '音视频通话': False,
|
||||
'转账': False, '音视频通话': False,'拍一拍等系统消息': True} # 定义导出的数据类型,默认全部选择
|
||||
elif file_type == 'csv':
|
||||
self.export_type = Output.CSV
|
||||
self.export_choices = {"文本": True, "图片": True, "视频": True, "表情包": True} # 定义导出的数据类型,默认全部选择
|
||||
|
@ -64,7 +64,7 @@ class ExportDialog(QDialog, Ui_Dialog):
|
||||
self.textBrowser.setVerticalScrollBar(scroll_bar)
|
||||
self.export_choices = {"文本": True, "图片": True, "语音": False, "视频": False, "表情包": False,
|
||||
'音乐与音频': False, '分享卡片': False, '文件': False,
|
||||
'拍一拍等系统消息': True} # 定义导出的数据类型
|
||||
'转账': False, '音视频通话': False,'拍一拍等系统消息': True} # 定义导出的数据类型
|
||||
self.setWindowTitle(title)
|
||||
self.checkBox_word.setEnabled(False)
|
||||
self.checkBox_word.setText('Docx(暂时不可用)')
|
||||
|
Loading…
Reference in New Issue
Block a user