Commit 1be7f755 authored by 罗超's avatar 罗超

优化聊天,修改样式

parent 8aec6819
{ {
"pages": [ "pages": [
"pages/index/index",
"pages/msg/index/index", "pages/msg/index/index",
"pages/index/index",
"pages/welcome/welcome", "pages/welcome/welcome",
"pages/validateForm/validate/validate", "pages/validateForm/validate/validate",
"pages/validateForm/validateEnd/validateEnd", "pages/validateForm/validateEnd/validateEnd",
......
.emoji-wrapper { .emoji-wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #fff; background-color: #f1f1f1;
} }
/*内容 */ /*内容 */
.emoji-content { .emoji-content {
...@@ -31,30 +31,34 @@ ...@@ -31,30 +31,34 @@
.emoji-album { .emoji-album {
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
border: 2rpx solid #999; /* border: 2rpx solid #999; */
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #f1f1f1;
} }
.emoji-album-left { .emoji-album-left {
display: inline-block; display: inline-block;
height: 100%; height: 100%;
} }
.emoji-album-left-img { .emoji-album-left-img {
width:88rpx; width:60rpx;
height:100%; height:60rpx;
padding:8rpx 10rpx; margin: 14rpx;
box-sizing:border-box; box-sizing:border-box;
border-right:2rpx soild #999 /* border-right:2rpx soild #999 */
} }
.emoji-send { .emoji-send {
width: 88rpx; height: 60rpx;
height: 100%; line-height: 60rpx;
line-height:88rpx; background-color: #EA005E;
background-color: #0091e4;
text-align: center; text-align: center;
float: right; float: right;
color: #fff; color: #fff;
padding: 0 30rpx;
margin-right: 20rpx;
margin-top: 8px;
border-radius: 10rpx;
} }
.album-active { .album-active {
background-color: #aaa; background-color: #eee;
} }
images/add.png

1.86 KB | W: | H:

images/add.png

1.77 KB | W: | H:

images/add.png
images/add.png
images/add.png
images/add.png
  • 2-up
  • Swipe
  • Onion skin
images/emoji.png

1.95 KB | W: | H:

images/emoji.png

1.87 KB | W: | H:

images/emoji.png
images/emoji.png
images/emoji.png
images/emoji.png
  • 2-up
  • Swipe
  • Onion skin
images/keyboard.png

1.57 KB | W: | H:

images/keyboard.png

1.53 KB | W: | H:

images/keyboard.png
images/keyboard.png
images/keyboard.png
images/keyboard.png
  • 2-up
  • Swipe
  • Onion skin
images/location.png

2.43 KB | W: | H:

images/location.png

3.61 KB | W: | H:

images/location.png
images/location.png
images/location.png
images/location.png
  • 2-up
  • Swipe
  • Onion skin
images/more.png

1.55 KB | W: | H:

images/more.png

1.52 KB | W: | H:

images/more.png
images/more.png
images/more.png
images/more.png
  • 2-up
  • Swipe
  • Onion skin
images/photo.png

2.29 KB | W: | H:

images/photo.png

2.15 KB | W: | H:

images/photo.png
images/photo.png
images/photo.png
images/photo.png
  • 2-up
  • Swipe
  • Onion skin
images/shoot.png

2.16 KB | W: | H:

images/shoot.png

3.31 KB | W: | H:

images/shoot.png
images/shoot.png
images/shoot.png
images/shoot.png
  • 2-up
  • Swipe
  • Onion skin
images/voice.png

1.58 KB | W: | H:

images/voice.png

6.12 KB | W: | H:

images/voice.png
images/voice.png
images/voice.png
images/voice.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -265,6 +265,7 @@ let pageConfig = { ...@@ -265,6 +265,7 @@ let pageConfig = {
let sessions = Object.keys(rawMessageList) let sessions = Object.keys(rawMessageList)
let index = 0 let index = 0
let unQueryUsers=[] let unQueryUsers=[]
let unReadCount=0
sessions.map(session => { sessions.map(session => {
let account = session.indexOf('team-') === 0 ? session.slice(5, session.length) : session.slice(4, session.length) let account = session.indexOf('team-') === 0 ? session.slice(5, session.length) : session.slice(4, session.length)
let isP2p = session.indexOf('p2p-') === 0 let isP2p = session.indexOf('p2p-') === 0
...@@ -272,7 +273,7 @@ let pageConfig = { ...@@ -272,7 +273,7 @@ let pageConfig = {
let sessionCard = (isP2p ? friendCard[account] : groupList[account]) || {} let sessionCard = (isP2p ? friendCard[account] : groupList[account]) || {}
let ucard = (isP2p ? userCard[account] : {}) || {} let ucard = (isP2p ? userCard[account] : {}) || {}
let unixtimeList = Object.keys(rawMessageList[session]) let unixtimeList = Object.keys(rawMessageList[session])
if (!unixtimeList || account =='684cb79fe92f46877777') { if (!unixtimeList || account == '684cb79fe92f46877777' || account == '684cb79fe92f46888888') {
return return
} }
let maxTime = Math.max(...unixtimeList) let maxTime = Math.max(...unixtimeList)
...@@ -305,12 +306,17 @@ let pageConfig = { ...@@ -305,12 +306,17 @@ let pageConfig = {
unread: unreadInfo[session] || 0, unread: unreadInfo[session] || 0,
displayTime: msg.time ? formatDate(msg.time) : '' displayTime: msg.time ? formatDate(msg.time) : ''
}) })
unReadCount += unreadInfo[session] || 0;
} }
}) })
// 排序 // 排序
chatList.sort((a, b) => { chatList.sort((a, b) => {
return b.timestamp - a.timestamp return b.timestamp - a.timestamp
}) })
let msgTitle = unReadCount > 0 ? '消息(' + unReadCount+')':'消息'
wx.setNavigationBarTitle({
title: msgTitle
})
return chatList return chatList
}, },
getUserNick(obj) { //obj为我们的对象 getUserNick(obj) { //obj为我们的对象
......
{ {
"usingComponents": {}, "usingComponents": {},
"navigationStyle": "custom" "navigationStyle": "default",
"navigationBarBackgroundColor": "#F1F1F1",
"navigationBarTitleText": "",
"navigationBarTextStyle": "black"
} }
\ No newline at end of file
<view class='title'> <!-- <view class='title'>
<text>消息(20)</text> <text>消息(20)</text>
</view> </view> -->
<wxs module="m1">
function fn(str, arg) {
return str.indexOf(arg);
}
module.exports.fn = fn;
</wxs>
<view class="search"> <view class="search">
<view class="{{showSearchBox==0?'':'hide'}}" bindtap="changeSearchBox" data-type="1"> <view class="{{showSearchBox==0?'':'hide'}}" bindtap="changeSearchBox" data-type="1">
<image src="/images/im/search.png"></image> <image src="/images/im/search.png"></image>
<text>搜索</text> <text>搜索</text>
</view> </view>
<input type='text' bindinput='searchInput' class="search-input {{showSearchBox==1?'':'hide'}}" bindblur="changeSearchBox" data-type="0" focus='{{isFocus}}'/> <input type='text' bindinput='searchInput' class="search-input {{showSearchBox==1?'':'hide'}}" bindblur="changeSearchBox" data-type="0" focus='{{isFocus}}' />
</view> </view>
<view class="msg-box"> <view class="msg-box">
<view class="msg-item" wx:if="{{chatList.length != 0}}" wx:for="{{chatList}}" wx:for-item="message" wx:key="message.time" data-session='{{message.session}}' data-account='{{message.account}}' data-session='{{message.session}}' bindtap='switchToChating'> <view wx:if="{{chatList.length != 0}}" wx:for="{{chatList}}" wx:for-item="message" wx:key="message.time">
<image class="avater" src="{{message.avatar}}"></image> <view class="msg-item" data-session='{{message.session}}' data-account='{{message.account}}' wx:if="{{searchConten=='' || m1.fn(message.nick,searchConten)!=-1}}" data-session='{{message.session}}' bindtap='switchToChating'>
<view class="msg-content"> <image class="avater" src="{{message.avatar}}"></image>
<view class="item-name"> <view class="msg-content">
{{message.nick}} <view class="item-name">
</view> {{message.nick}}
<view class="lst-msg"> </view>
{{message.lastestMsg}} <view class="lst-msg">
</view> {{message.lastestMsg}}
</view> </view>
<view class="times"> </view>
<view class="timer">{{message.displayTime}}</view> <view class="times">
<view wx:if="{{message.unread}}"> <view class="timer">{{message.displayTime}}</view>
<text class="pops">{{message.unread || ''}}</text> <view wx:if="{{message.unread}}">
</view> <text class="pops">{{message.unread || ''}}</text>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -10,8 +10,8 @@ page{ ...@@ -10,8 +10,8 @@ page{
} }
.title{ .title{
background: #f1f1f1; background: #f1f1f1;
padding: 70rpx 30rpx 2rpx 30rpx; padding: 1rpx 30rpx 0rpx 30rpx;
font-size: 16pt; font-size: 14pt;
border-bottom: 2rpx solid #EEE; border-bottom: 2rpx solid #EEE;
} }
.search{ .search{
......
...@@ -105,6 +105,17 @@ let pageConfig = { ...@@ -105,6 +105,17 @@ let pageConfig = {
}) })
} }
}, },
imgYu: function (event) {
var that = this;
console.log(event.currentTarget.dataset.path)
var src = event.currentTarget.dataset.path;//获取data-src
var imgList = [src];//获取data-list
//图片预览
wx.previewImage({
current: src, // 当前显示图片的http链接
urls: imgList // 需要预览的图片http链接列表
})
},
/** /**
* 获取群组成员列表 * 获取群组成员列表
*/ */
...@@ -1035,7 +1046,7 @@ let pageConfig = { ...@@ -1035,7 +1046,7 @@ let pageConfig = {
let self = this let self = this
if (message.sendOrReceive === 'send') { // 自己消息 if (message.sendOrReceive === 'send') { // 自己消息
wx.showActionSheet({ wx.showActionSheet({
itemList: ['删除', '转发', '撤回'], itemList: ['删除', '撤回'],//'转发',
success: function (res) { success: function (res) {
switch (res.tapIndex) { switch (res.tapIndex) {
case 0: case 0:
...@@ -1062,7 +1073,7 @@ let pageConfig = { ...@@ -1062,7 +1073,7 @@ let pageConfig = {
}) })
} else {// 对方消息 } else {// 对方消息
wx.showActionSheet({ wx.showActionSheet({
itemList: ['删除', '转发'], itemList: ['删除'],//'转发'
success: function (res) { success: function (res) {
switch (res.tapIndex) { switch (res.tapIndex) {
case 0: case 0:
...@@ -1266,7 +1277,8 @@ let pageConfig = { ...@@ -1266,7 +1277,8 @@ let pageConfig = {
text: rawMsg.text || '', text: rawMsg.text || '',
time, time,
sendOrReceive, sendOrReceive,
displayTimeHeader displayTimeHeader,
url: rawMsg.file ? rawMsg.file.url:''
}, specifiedObject)) }, specifiedObject))
} }
return messageArr return messageArr
......
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
<view class='video-triangle'></view> <view class='video-triangle'></view>
<view style='color: #000;'>{{message.video.dur / 1000 << 1 >> 1}}''</view> <view style='color: #000;'>{{message.video.dur / 1000 << 1 >> 1}}''</view>
</view> </view>
<view wx:if="{{message.type === 'audio'}}" class='audio-wrapper' data-audio="{{message.audio}}" catchtap='playAudio' style='background-color:#3387FF;color: #000;'> <view wx:if="{{message.type === 'audio'}}" class='audio-wrapper' data-audio="{{message.audio}}" catchtap='playAudio' style='background-color:#EA005E;color: #000;'>
<image src='{{iconBase64Map.iconVoiceWhite}}' class='image'></image> <image src='{{iconBase64Map.iconVoiceWhite}}' class='image'></image>
<text class='text'>{{message.audio.dur / 1000 << 1 >> 1}}''</text> <text class='text'>{{message.audio.dur / 1000 << 1 >> 1}}''</text>
</view> </view>
<rich-text wx:if="{{message.type === 'image'}}" class='record-chatting-item-text nobg' nodes="{{message.nodes}}" ></rich-text> <rich-text wx:if="{{message.type === 'image'}}" class='record-chatting-item-text nobg' nodes="{{message.nodes}}" bindtap="imgYu" data-path="{{message.url}}"></rich-text>
<rich-text wx:if="{{message.type === '猜拳' || message.type === '贴图表情'}}" class='record-chatting-item-text nobg' nodes="{{message.nodes}}" ></rich-text> <rich-text wx:if="{{message.type === '猜拳' || message.type === '贴图表情'}}" class='record-chatting-item-text nobg' nodes="{{message.nodes}}" ></rich-text>
<rich-text wx:if="{{message.type === 'text' || message.type === 'file' || message.type === '白板消息' || message.type === '阅后即焚' || message.type === 'robot'}}" class='record-chatting-item-text' nodes="{{message.nodes}}"></rich-text> <rich-text wx:if="{{message.type === 'text' || message.type === 'file' || message.type === '白板消息' || message.type === '阅后即焚' || message.type === 'robot'}}" class='record-chatting-item-text' nodes="{{message.nodes}}"></rich-text>
<rich-text wx:if="{{message.type === 'tip' || message.type === 'notification'}}" class='tip-rich-text' nodes="{{message.nodes}}"></rich-text> <rich-text wx:if="{{message.type === 'tip' || message.type === 'notification'}}" class='tip-rich-text' nodes="{{message.nodes}}"></rich-text>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<image wx:if="{{message.type !== 'tip' && message.type !== 'notification'}}" src='{{loginAccountLogo}}' catchtap='switchToMyTab' class='record-chatting-item-img'></image> <image wx:if="{{message.type !== 'tip' && message.type !== 'notification'}}" src='{{loginAccountLogo}}' catchtap='switchToMyTab' class='record-chatting-item-img'></image>
</view> </view>
<view wx:if="{{message.sendOrReceive == 'receive'}}" class='{{message.sendOrReceive == "receive" ? "record-chatting-item other" : ""}}' style='justify-content: {{message.type === "tip" || message.type === "notification" ? "center" : "flex-start"}}' data-message="{{message}}" bindlongpress='showEditorMenu'> <view wx:if="{{message.sendOrReceive == 'receive'}}" class='{{message.sendOrReceive == "receive" ? "record-chatting-item other" : ""}}' style='justify-content: {{message.type === "tip" || message.type === "notification" ? "center" : "flex-start"}}' data-message="{{message}}" bindlongpress='showEditorMenu'>
<image wx:if="{{message.type !== 'tip' && message.type !== 'notification'}}" catchtap='switchPersonCard' data-account='{{message.from}}' src='{{personList[message.from] && personList[message.from].avatar || defaultUserLogo}}' class='record-chatting-item-img'></image> <image wx:if="{{message.type !== 'tip' && message.type !== 'notification'}}" catchtap='switchPersonCard' data-account='{{message.from}}' src='{{(personList[message.from] && personList[message.from].avatar) || (userCard[message.from] && userCard[message.from].avatar) || defaultUserLogo}}' class='record-chatting-item-img'></image>
<text wx:if="{{message.type !== 'tip' && message.type !== 'notification' && message.type !== 'image' && message.type !== 'video' && message.type !== 'geo' && message.type !== '猜拳' && message.type !== '贴图表情' }}" class='left-triangle'></text> <text wx:if="{{message.type !== 'tip' && message.type !== 'notification' && message.type !== 'image' && message.type !== 'video' && message.type !== 'geo' && message.type !== '猜拳' && message.type !== '贴图表情' }}" class='left-triangle'></text>
<view wx:if="{{message.type === 'geo'}}" data-geo='{{message.geo}}' class='small-map-wrapper' catchtap='fullScreenMap'> <view wx:if="{{message.type === 'geo'}}" data-geo='{{message.geo}}' class='small-map-wrapper' catchtap='fullScreenMap'>
<image src="../../images/map.png" class='small-geo-img'></image> <image src="../../images/map.png" class='small-geo-img'></image>
...@@ -73,16 +73,17 @@ ...@@ -73,16 +73,17 @@
</view> </view>
</view> </view>
<!--底部输入框 --> <!--底部输入框 -->
<view wx:if="{{chatType === 'p2p' || !currentGroup.isCurrentNotIn}}" class='chatinput-wrapper' style='margin-bottom: {{focusFlag ? 20 : 0}}rpx;' catchtap='stopEventPropagation'> <view wx:if="{{chatType === 'p2p' || !currentGroup.isCurrentNotIn}}" class='chatinput-wrapper' style='margin-bottom:0rpx;' catchtap='stopEventPropagation'>
<view class='chatinput-content'> <view class='chatinput-content'>
<image src='{{sendType == 0 ? "../../images/voice.png" : "../../images/keyboard.png"}}' class='chatinput-img' catchtap='switchSendType'></image> <image src='{{sendType == 0 ? "../../images/voice.png" : "../../images/keyboard.png"}}' class='chatinput-img' catchtap='switchSendType'></image>
<input style='margin-bottom: 20rpx;' wx:if="{{sendType == 0}}" value='{{inputValue}}' focus='{{focusFlag}}' bindinput='inputChange' bindfocus='inputFocus' bindblur='inputBlur' bindconfirm='inputSend' class='chatinput-input' placeholder="输入文字" confirm-type='send'></input> <input style='margin-bottom: 20rpx;' wx:if="{{sendType == 0}}" value='{{inputValue}}' focus='{{focusFlag}}' bindinput='inputChange' bindfocus='inputFocus' bindblur='inputBlur' bindconfirm='inputSend' class='chatinput-input' placeholder="" confirm-type='send'></input>
<!-- <button wx:if="{{sendType == 1}}" class="{{ isLongPress ? 'chatinput-voice-mask chatinput-voice-mask-hover' : 'chatinput-voice-mask' }}" hover-class="none" catchtouchstart='longPressStart' catchlongpress='voiceBtnLongTap' catchtouchend='longPressEnd'>按住说话</button> --> <!-- <button wx:if="{{sendType == 1}}" class="{{ isLongPress ? 'chatinput-voice-mask chatinput-voice-mask-hover' : 'chatinput-voice-mask' }}" hover-class="none" catchtouchstart='longPressStart' catchlongpress='voiceBtnLongTap' catchtouchend='longPressEnd'>按住说话</button> -->
<button wx:if="{{sendType == 1}}" class="{{ isLongPress ? 'chatinput-voice-mask chatinput-voice-mask-hover' : 'chatinput-voice-mask' }}" hover-class="none" catchtouchstart='longPressStart' catchtouchend='longPressEnd'> <button wx:if="{{sendType == 1}}" class="{{ isLongPress ? 'chatinput-voice-mask chatinput-voice-mask-hover' : 'chatinput-voice-mask' }}" hover-class="none" catchtouchstart='longPressStart' catchtouchend='longPressEnd'>
{{isLongPress ? '松开结束' : '按住说话'}} {{isLongPress ? '松开结束' : '按住说话'}}
</button> </button>
<image src='../../images/more.png' catchtap='toggleMore' class='chatinput-img fr'></image> <image src='../../images/emoji.png' catchtap='toggleEmoji' class='chatinput-img'></image>
<image src='../../images/emoji.png' catchtap='toggleEmoji' class='chatinput-img fr emoji'></image> <image src='../../images/more.png' catchtap='toggleMore' class='chatinput-img emoji'></image>
</view> </view>
<view wx:if="{{emojiFlag}}" class='chatinput-subcontent'> <view wx:if="{{emojiFlag}}" class='chatinput-subcontent'>
<component-emoji bind:EmojiClick="emojiCLick" bind:EmojiSend="emojiSend"></component-emoji> <component-emoji bind:EmojiClick="emojiCLick" bind:EmojiSend="emojiSend"></component-emoji>
...@@ -90,32 +91,41 @@ ...@@ -90,32 +91,41 @@
<view wx:if="{{moreFlag}}" class='more-subcontent'> <view wx:if="{{moreFlag}}" class='more-subcontent'>
<view style='display:flex;justify-content: space-between;'> <view style='display:flex;justify-content: space-between;'>
<view class='more-subcontent-item' catchtap='chooseImageToSend'> <view class='more-subcontent-item' catchtap='chooseImageToSend'>
<image src="../../images/photo.png" class='image'></image> <view class="more-item-imgbox">
<image src="../../images/photo.png" class='image'></image>
</view>
<text class='text'>相册</text> <text class='text'>相册</text>
</view> </view>
<view class='more-subcontent-item' catchtap='chooseImageOrVideo'> <view class='more-subcontent-item' catchtap='chooseImageOrVideo'>
<image src="../../images/shoot.png" class='image'></image> <view class="more-item-imgbox">
<image src="../../images/shoot.png" class='image'></image>
</view>
<text class='text'>拍摄</text> <text class='text'>拍摄</text>
</view> </view>
<view class='more-subcontent-item' catchtap='choosePosition'>
<view class="more-item-imgbox">
<image src="../../images/location.png" class='image'></image>
</view>
<text class='text'>位置</text>
</view>
<view class='more-subcontent-item' catchtap='videoCall'>
<view class="more-item-imgbox">
<image src="../../images/shipin.png" class='image'></image>
</view>
<text class='text'>视频通话</text>
</view>
<!-- <view class='more-subcontent-item'><view class='image'></view><text class='text'>文件</text></view> --> <!-- <view class='more-subcontent-item'><view class='image'></view><text class='text'>文件</text></view> -->
<view class='more-subcontent-item' catchtap='showTipMessagePanel'> <!-- <view class='more-subcontent-item' catchtap='showTipMessagePanel'>
<image src="../../images/tip.png" class='image'></image> <image src="../../images/tip.png" class='image'></image>
<text class='text'>Tip</text> <text class='text'>Tip</text>
</view> </view>
<view class='more-subcontent-item' catchtap='sendFingerGuess'> <view class='more-subcontent-item' catchtap='sendFingerGuess'>
<image src="../../images/morra.png" class='image'></image> <image src="../../images/morra.png" class='image'></image>
<text class='text'>猜拳</text> <text class='text'>猜拳</text>
</view> </view> -->
</view> </view>
<view style='display:flex;justify-content: space-between;'> <view style='display:flex;justify-content: space-between;'>
<view class='more-subcontent-item' catchtap='choosePosition'>
<image src="../../images/location.png" class='image'></image>
<text class='text'>位置</text>
</view>
<view class='more-subcontent-item' catchtap='videoCall'>
<image src="../../images/location.png" class='image'></image>
<text class='text'>视频通话</text>
</view>
<view class='more-subcontent-item'><view class='image' style='background-color: transparent;'></view><text class='text'></text></view> <view class='more-subcontent-item'><view class='image' style='background-color: transparent;'></view><text class='text'></text></view>
<view class='more-subcontent-item'><view class='image' style='background-color: transparent;'></view><text class='text'></text></view> <view class='more-subcontent-item'><view class='image' style='background-color: transparent;'></view><text class='text'></text></view>
</view> </view>
......
...@@ -42,7 +42,7 @@ page{ ...@@ -42,7 +42,7 @@ page{
/*聊天输入框 */ /*聊天输入框 */
.chatinput-wrapper { .chatinput-wrapper {
width: 100%; width: 100%;
background-color: #fff; background-color: rgb(247,247,247);
border: 2rpx solid #ccc; border: 2rpx solid #ccc;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
...@@ -51,39 +51,42 @@ page{ ...@@ -51,39 +51,42 @@ page{
.chatinput-content { .chatinput-content {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
display: flex;
} }
.chatinput-img{ .chatinput-img{
width: 60rpx; width: 48rpx;
height: 60rpx; height: 48rpx;
border-radius: 100%; border-radius: 100%;
margin: 20rpx 20rpx; margin: 26rpx 20rpx;
display: inline-block;
} }
.chatinput-img.emoji{ .chatinput-img.emoji{
margin-right: 0; /* margin-right: 0; */
margin-left: 0;
} }
.chatinput-img:active { .chatinput-img:active {
opacity: .6; opacity: .6;
} }
.chatinput-input { .chatinput-input {
width: 466rpx; /* width: 466rpx; */
flex: 1;
min-height: 72rpx; min-height: 72rpx;
border-radius: 12rpx; border-radius: 4rpx;
border: 1px solid #ccc; /* border: 1px solid #ccc; */
margin-top: 15rpx; margin-top: 15rpx;
display: inline-block; display: inline-block;
vertical-align:top; vertical-align:top;
box-sizing:border-box; box-sizing:border-box;
padding-left: 20rpx; padding-left: 20rpx;
font-size: 30rpx; font-size: 30rpx;
background: #FFF;
} }
.chatinput-voice-mask { .chatinput-voice-mask {
width: 466rpx; flex: 1;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
display: inline-block; display: inline-block;
border-radius: 12rpx; border-radius: 4rpx;
border: 1px solid #ccc; /* border: 1px solid #ccc; */
margin-top: 12rpx; margin-top: 12rpx;
vertical-align:top; vertical-align:top;
box-sizing:border-box; box-sizing:border-box;
...@@ -93,6 +96,7 @@ page{ ...@@ -93,6 +96,7 @@ page{
color: #333336; color: #333336;
background-color: #fff; background-color: #fff;
letter-spacing: 4rpx; letter-spacing: 4rpx;
padding: 0;
} }
.chatinput-voice-mask-hover { .chatinput-voice-mask-hover {
background-color: #cecece; background-color: #cecece;
...@@ -104,24 +108,30 @@ page{ ...@@ -104,24 +108,30 @@ page{
height: 470rpx; height: 470rpx;
background-color: #999; background-color: #999;
} }
.fr {
float: right;
}
/* more-subcontent */ /* more-subcontent */
.more-subcontent { .more-subcontent {
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
border:2rpx solid #ccc; border:2rpx solid #eee;
} }
.more-subcontent .more-subcontent-item { .more-subcontent .more-subcontent-item {
display:flex; display:flex;
flex-direction:column; flex-direction:column;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.more-subcontent .more-subcontent-item .image { .more-subcontent .more-subcontent-item .more-item-imgbox image {
width: 54rpx;
height: 54rpx;
}
.more-subcontent .more-subcontent-item .more-item-imgbox{
display: flex;
width:112rpx; width:112rpx;
height:112rpx; height:112rpx;
border-radius:50%; align-items: center;
margin-bottom: 12rpx; margin-bottom: 12rpx;
border-radius: 16rpx;
background: #FFF;
justify-content: center;
} }
.more-subcontent .more-subcontent-item .text { .more-subcontent .more-subcontent-item .text {
font-size: 24rpx; font-size: 24rpx;
...@@ -161,18 +171,22 @@ page{ ...@@ -161,18 +171,22 @@ page{
.record-chatting-item-text { .record-chatting-item-text {
max-width: 70%; max-width: 70%;
border-radius: 8rpx; border-radius: 8rpx;
background-color: #3387FF; background-color: #EA005E;
padding: 16rpx; padding: 16rpx;
box-sizing:border-box; box-sizing:border-box;
word-wrap:break-word; word-wrap:break-word;
overflow: hidden; overflow: hidden;
font-size: 32rpx; font-size: 26rpx;
line-height: 48rpx; line-height: 44rpx;
} }
.record-chatting-item-text.nobg { .record-chatting-item-text.nobg {
background: transparent; ackground: transparent;
margin-left: 20rpx; margin-left: 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 10rpx;
border: 1px solid #eee;
padding: 0;
} }
/* tip消息富文本 */ /* tip消息富文本 */
.tip-rich-text { .tip-rich-text {
...@@ -202,7 +216,7 @@ page{ ...@@ -202,7 +216,7 @@ page{
.left-triangle{ .left-triangle{
height:0px; height:0px;
width:0px; width:0px;
border-width:20rpx; border-width:14rpx;
border-style:solid; border-style:solid;
border-color:transparent #fff transparent transparent; border-color:transparent #fff transparent transparent;
margin-top: 20rpx; margin-top: 20rpx;
...@@ -210,15 +224,15 @@ page{ ...@@ -210,15 +224,15 @@ page{
.right-triangle{ .right-triangle{
height:0px; height:0px;
width:0px; width:0px;
border-width:20rpx; border-width:14rpx;
border-style:solid; border-style:solid;
border-color:transparent transparent transparent #3387FF; border-color:transparent transparent transparent #EA005E;
margin-top: 20rpx; margin-top: 20rpx;
} }
.video-triangle { .video-triangle {
height:0px; height:0px;
width:0px; width:0px;
border-width:30rpx; border-width:14rpx;
border-style:solid; border-style:solid;
border-color:transparent transparent transparent #777; border-color:transparent transparent transparent #777;
margin-top: 20rpx; margin-top: 20rpx;
...@@ -286,7 +300,7 @@ page{ ...@@ -286,7 +300,7 @@ page{
.audio-wrapper { .audio-wrapper {
background-color:#fff; background-color:#fff;
border-radius:28rpx; border-radius:10rpx;
display:flex; display:flex;
justify-content:space-between; justify-content:space-between;
padding:0 20rpx; padding:0 20rpx;
...@@ -295,8 +309,8 @@ page{ ...@@ -295,8 +309,8 @@ page{
margin-left:-2px; margin-left:-2px;
} }
.audio-wrapper .image { .audio-wrapper .image {
width:70rpx; width:48rpx;
height:70rpx; height:48rpx;
align-self:center; align-self:center;
} }
.audio-wrapper .text { .audio-wrapper .text {
......
...@@ -410,9 +410,12 @@ function generateBigEmojiImageFile(content) { ...@@ -410,9 +410,12 @@ function generateBigEmojiImageFile(content) {
function generateImageNode(file) { function generateImageNode(file) {
// console.log(file) // console.log(file)
let width = 0, height = 0 let width = 0, height = 0
if (file.w > 250) { if (file.w > 75) {
width = 200 width = 75
height = file.h / (file.w / 200) height = file.h / (file.w / 75)
} else if(file.w > 150) {
height = 150
width = file.w / (file.h / 150)
} else { } else {
width = file.w width = file.w
height = file.h height = file.h
...@@ -423,7 +426,8 @@ function generateImageNode(file) { ...@@ -423,7 +426,8 @@ function generateImageNode(file) {
attrs: { attrs: {
width: `${width}rpx`, width: `${width}rpx`,
height: `${height}rpx`, height: `${height}rpx`,
src: file.url src: file.url,
style:'border-radius:10rpx'
} }
}) })
return richTextNode return richTextNode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment