Commit 0a15377b by 施宇

111

parent 251b7c46
Showing with 330 additions and 462 deletions
...@@ -36,6 +36,7 @@ function addMember(id) { ...@@ -36,6 +36,7 @@ function addMember(id) {
App({ App({
globalData: { globalData: {
unReadMessageNum: 0, unReadMessageNum: 0,
isIPX: false //是否为iphone X
}, },
conn: { conn: {
closed: false, closed: false,
...@@ -101,7 +102,6 @@ App({ ...@@ -101,7 +102,6 @@ App({
if (message) { if (message) {
if (onMessageError(message)) { if (onMessageError(message)) {
msgStorage.saveReceiveMsg(message, msgType.TEXT); msgStorage.saveReceiveMsg(message, msgType.TEXT);
console.log('hahaha')
} }
calcUnReadSpot(message); calcUnReadSpot(message);
} }
...@@ -115,6 +115,18 @@ App({ ...@@ -115,6 +115,18 @@ App({
onError(error) { onError(error) {
console.log(error) console.log(error)
}, },
});
this.checkIsIPhoneX();
},
checkIsIPhoneX: function () {
const me = this
wx.getSystemInfo({
success: function (res) {
// 根据 model 进行判断
if (res.model.search('iPhone X') != -1) {
me.globalData.isIPX = true
}
}
}) })
}, },
......
...@@ -15,15 +15,10 @@ Component({ ...@@ -15,15 +15,10 @@ Component({
data: { data: {
__comps__: { __comps__: {
msglist: null, msglist: null,
inputbar: null, inputbar: null
audio: null,
}, },
}, },
methods: { methods: {
toggleRecordModal(){
this.data.__comps__.audio.toggleRecordModal();
},
normalScroll(){ normalScroll(){
this.data.__comps__.msglist.normalScroll(); this.data.__comps__.msglist.normalScroll();
this.data.__comps__.inputbar.cancelEmoji(); this.data.__comps__.inputbar.cancelEmoji();
...@@ -36,11 +31,7 @@ Component({ ...@@ -36,11 +31,7 @@ Component({
saveSendMsg(evt){ saveSendMsg(evt){
msgStorage.saveMsg(evt.detail.msg, evt.detail.type); msgStorage.saveMsg(evt.detail.msg, evt.detail.type);
this.data.__comps__.inputbar.cancelEmoji(); this.data.__comps__.inputbar.cancelEmoji();
}, }
getMore(){
this.selectComponent('#chat-msglist').getHistoryMsg()
},
}, },
// lifetimes // lifetimes
...@@ -49,7 +40,6 @@ Component({ ...@@ -49,7 +40,6 @@ Component({
ready(){ ready(){
this.data.__comps__.inputbar = this.selectComponent("#chat-inputbar"); this.data.__comps__.inputbar = this.selectComponent("#chat-inputbar");
this.data.__comps__.msglist = this.selectComponent("#chat-msglist"); this.data.__comps__.msglist = this.selectComponent("#chat-msglist");
this.data.__comps__.audio = this.selectComponent("#chat-suit-audio");
}, },
moved(){}, moved(){},
detached(){ detached(){
......
...@@ -22,25 +22,6 @@ Component({ ...@@ -22,25 +22,6 @@ Component({
}, },
methods: { methods: {
// 事件有长度限制:仅限 26 字符 // 事件有长度限制:仅限 26 字符
toggleRecordModal(){
this.triggerEvent(
"tapSendAudio",
null,
{
bubbles: true,
composed: true
}
);
},
// sendVideo(){
// this.data.__comps__.video.sendVideo();
// },
openCamera(){
this.data.__comps__.image.openCamera();
},
openEmoji(){ openEmoji(){
this.data.__comps__.emoji.openEmoji(); this.data.__comps__.emoji.openEmoji();
}, },
...@@ -64,13 +45,13 @@ Component({ ...@@ -64,13 +45,13 @@ Component({
attached(){}, attached(){},
moved(){}, moved(){},
detached(){}, detached(){},
ready(){ ready() {
this.setData({ this.setData({
isIPX: getApp().globalData.isIPX isIPX: getApp().globalData.isIPX
}) })
let comps = this.data.__comps__; let comps = this.data.__comps__;
comps.main = this.selectComponent("#chat-suit-main"); comps.main = this.selectComponent("#chat-suit-main");
comps.emoji = this.selectComponent("#chat-suit-emoji"); comps.emoji = this.selectComponent("#chat-suit-emoji");
comps.image = this.selectComponent("#chat-suit-image"); comps.image = this.selectComponent("#chat-suit-image");
}, },
}); });
<view class="room_bar"> <view class="room_bar">
<chat-suit-emoji id="chat-suit-emoji" bind:newEmojiStr="emojiAction"></chat-suit-emoji> <chat-suit-emoji id="chat-suit-emoji" bind:newEmojiStr="emojiAction"></chat-suit-emoji>
<chat-suit-main id="chat-suit-main" username="{{ username }}" chatType="{{ chatType }}" bind:inputFocused="cancelEmoji"></chat-suit-main> <chat-suit-main id="chat-suit-main" username="{{ username }}" chatType="{{ chatType }}" bind:inputFocused="cancelEmoji">
<chat-suit-image id="chat-suit-image" username="{{ username }}" chatType="{{ chatType }}"></chat-suit-image> <view class="open_emoji" bind:tap="openEmoji">
<image src="../../../images/Emoji.png" />
<view class="other_func {{isIPX? 'other_func_X': ''}}"> </view>
<view class="open_emoji" bind:tap="openEmoji"> <view class="send_image" bind:tap="sendImage">
<image src="../../../images/Emoji.png"/> <image src="../../../images/pic.png"/>
</view> </view>
<view class="send_image" bind:tap="sendImage"> </chat-suit-main>
<image src="../../../images/pic.png" style="height:20px; width: 20px"/> <chat-suit-image id="chat-suit-image" username="{{ username }}" chatType="{{ chatType }}"></chat-suit-image>
</view>
</view> <view class="other_func {{isIPX? 'other_func_X': ''}}">
</view> </view>
</view>
\ No newline at end of file
.room_bar { .room_bar {
width: 100%; width: 100%;
height: auto; height: auto;
border-top: 1px solid #CFCFCF; border-top: 1px solid #f5f9fc;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
right: 0; right: 0;
...@@ -12,40 +12,21 @@ ...@@ -12,40 +12,21 @@
.other_func { .other_func {
width: 100%; width: 100%;
height: 60rpx; height:10rpx;
display: flex;
} }
.other_func_X{ .other_func_X{
height: 128rpx; height:50rpx;
} }
.open_emoji image,.send_image image{
.other_func image { width: 100%;
width: 42rpx; height: 100%;
height: 40rpx;
} }
.open_emoji, .open_emoji,
.send_image, .send_image{
.open_camera,
.v-record {
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 48rpx;
}
.v-record .icon-record {
width: 18rpx;
height: 40rpx; height: 40rpx;
flex:0 0 40rpx;
margin-left: 24rpx;
} }
.v-record{
margin-left: 48rpx;
}
.open_camera, .send_image{
margin-left: 64rpx;
}
...@@ -50,14 +50,6 @@ ...@@ -50,14 +50,6 @@
bind:tap="sendEmoji" bind:tap="sendEmoji"
data-emoji="{{ index }}" /> data-emoji="{{ index }}" />
</view> </view>
<view class="emoji_item">
<image
wx:for="{{ emojiObj.map6 }}"
src="{{ emojiObj.path + item }}"
wx:key=""
bind:tap="sendEmoji"
data-emoji="{{ index }}" />
</view>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
.emoji_list { .emoji_list {
margin-top: 30px; border-top: 1px solid #f5f9fc;
width: 100%; width: 100%;
height: 145px; height: 145px;
background-color: #dddddd; background-color: #fff;
padding-top: 10px; padding-top: 10px;
padding-left: 3%; padding-left: 3%;
display: none; display: none;
} }
.showEmoji { .showEmoji {
margin-top: 30px; border-top: 1px solid #f5f9fc;
width: 100%; width: 100%;
height: 145px; height: 145px;
background-color: #dddddd; background-color: #fff;
padding-top: 10px; padding-top: 10px;
padding-left: 3%; padding-left: 3%;
display: block; display: block;
......
<!-- <chat-suit-emoji id="chat-suit-emoji" bind:newEmojiStr="emojiAction"></chat-suit-emoji> -->
<form class="text-input"> <form class="text-input">
<view class="f-row"> <view class="f-row">
<slot></slot>
<input <input
class="f news" class="f news"
type="text" type="text"
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
placeholder-style="color:#CFCFCF; padding-left:5px;" placeholder-style="color:#CFCFCF; padding-left:5px;"
/> />
<button class="send_btn" bind:tap="sendMessage">发送</button> <view class="send_btn" bind:tap="sendMessage">发送</view>
</view> </view>
</form> </form>
...@@ -4,31 +4,32 @@ ...@@ -4,31 +4,32 @@
height: 100rpx; height: 100rpx;
padding: 0; padding: 0;
display: block; display: block;
} }
.news { .news {
width: 100%; width: 100%;
height: 62rpx; height: 62rpx;
font-size: 14px; font-size: 28rpx;
padding: 0 32rpx; padding: 0 32rpx;
display: inline-block; display: inline-block;
margin-top: 10rpx; margin-left:24rpx;
line-height: 48rpx; line-height: 48rpx;
position:relative; position:relative;
top: 0; top: 0;
background-color: #E6ECF2;
border-radius: 8rpx;
box-sizing: border-box;
} }
.send_btn { .send_btn {
width: 80rpx; flex: 0 0 120rpx;
height: 60rpx; font-size: 28rpx;
line-height: 60rpx; color:#0D84D1;
font-size: 17px;
color: #000;
padding: 0; padding: 0;
display: inline-block; height:62rpx;
float: right; text-align: center;
margin: 8rpx 16rpx auto auto; line-height: 62rpx;
background-color: #fff;
} }
.f-row{ .f-row{
......
...@@ -5,8 +5,6 @@ let LIST_STATUS = { ...@@ -5,8 +5,6 @@ let LIST_STATUS = {
NORMAL: "scroll_view" NORMAL: "scroll_view"
}; };
let page = 0;
let Index = 0;
let curMsgMid = '' let curMsgMid = ''
let isFail = false let isFail = false
Component({ Component({
...@@ -46,28 +44,6 @@ Component({ ...@@ -46,28 +44,6 @@ Component({
}); });
}, },
getHistoryMsg(){
let me = this
let username = this.data.username;
let myUsername = wx.getStorageSync("myUsername");
let sessionKey = username.groupId ? username.groupId + myUsername : username.your + myUsername;
let historyChatMsgs = wx.getStorageSync("rendered_" + sessionKey) || [];
if (Index < historyChatMsgs.length) {
let timesMsgList = historyChatMsgs.slice(-Index-10, -Index)
this.setData({
chatMsg: timesMsgList.concat(me.data.chatMsg),
toView: timesMsgList[timesMsgList.length - 1].mid,
});
Index += timesMsgList.length;
if (timesMsgList.length == 10) {
page ++
}
wx.stopPullDownRefresh()
}
},
renderMsg(renderableMsg, type, curChatMsg, sessionKey, isnew){ renderMsg(renderableMsg, type, curChatMsg, sessionKey, isnew){
let me = this let me = this
if (curChatMsg.length > 1) { if (curChatMsg.length > 1) {
...@@ -80,21 +56,8 @@ Component({ ...@@ -80,21 +56,8 @@ Component({
}) })
}) })
} }
var historyChatMsgs = wx.getStorageSync("rendered_" + sessionKey) || []; var historyChatMsgs = wx.getStorageSync("rendered_" + sessionKey) || [];
// if (curChatMsg.length) {
// console.log(curMsgMid.substring(curMsgMid.length - 10) , curChatMsg[0].mid.substring(curChatMsg[0].mid.length - 10))
// }
// if(curChatMsg.length && curMsgMid.substring(curMsgMid.length - 10) == curChatMsg[curChatMsg.length - 1].mid.substring(curChatMsg[0].mid.length - 10)){
// //curChatMsg[curChatMsg.length - 1].msg.data[0].isSuc = true
// curChatMsg[curChatMsg.length - 1].isSuc = true
// }
historyChatMsgs = historyChatMsgs.concat(curChatMsg); historyChatMsgs = historyChatMsgs.concat(curChatMsg);
//console.log('当前历史',renderableMsg)
//console.log('历史消息', historyChatMsgs)
if(!historyChatMsgs.length) return; if(!historyChatMsgs.length) return;
if (isnew == 'newMsg') { if (isnew == 'newMsg') {
this.setData({ this.setData({
...@@ -104,7 +67,7 @@ Component({ ...@@ -104,7 +67,7 @@ Component({
}); });
}else{ }else{
this.setData({ this.setData({
chatMsg: historyChatMsgs.slice(-10), chatMsg: historyChatMsgs,
// 跳到最后一条 // 跳到最后一条
toView: historyChatMsgs[historyChatMsgs.length - 1].mid, toView: historyChatMsgs[historyChatMsgs.length - 1].mid,
}); });
...@@ -123,7 +86,6 @@ Component({ ...@@ -123,7 +86,6 @@ Component({
wx.setStorageSync(sessionKey, chatMsg); wx.setStorageSync(sessionKey, chatMsg);
Index = historyChatMsgs.slice(-10).length;
wx.pageScrollTo({ wx.pageScrollTo({
scrollTop: 9999, scrollTop: 9999,
}) })
...@@ -159,8 +121,6 @@ Component({ ...@@ -159,8 +121,6 @@ Component({
}, },
attached(){ attached(){
this.__visibility__ = true; this.__visibility__ = true;
page = 0;
Index = 0;
}, },
moved(){}, moved(){},
detached(){ detached(){
...@@ -168,11 +128,11 @@ Component({ ...@@ -168,11 +128,11 @@ Component({
}, },
ready(event){ ready(event){
let me = this; let me = this;
if (getApp().globalData.isIPX) { if (getApp().globalData.isIPX) {
this.setData({ this.setData({
isIPX: true isIPX: true
}) })
} }
let username = this.data.username; let username = this.data.username;
let myUsername = wx.getStorageSync("myUsername"); let myUsername = wx.getStorageSync("myUsername");
...@@ -184,32 +144,6 @@ Component({ ...@@ -184,32 +144,6 @@ Component({
this.renderMsg(null, null, chatMsg, sessionKey); this.renderMsg(null, null, chatMsg, sessionKey);
wx.setStorageSync(sessionKey, null); wx.setStorageSync(sessionKey, null);
// disp.on("em.chat.sendSuccess", function(mid){
// curMsgMid = mid
// console.log('发送过去了', mid)
// let msgList = me.data.chatMsg
// msgList.map((item) =>{
// if (item.mid.substring(item.mid.length - 10) == mid.substring(mid.length - 10)) {
// console.log(111111, item)
// item.msg.data[0].isSuc = true
// item.isSuc = true
// me.setData({
// chatMsg: msgList
// })
// }
// })
// if (me.curChatMsg[0].mid == curMsgMid) {
// me.curChatMsg[0].msg.data[0].isShow = true
// me.curChatMsg[0].isShow = true
// }
// wx.setStorageSync("rendered_" + sessionKey, msgList);
// console.log('msgList', msgList)
// })
disp.on('em.xmpp.error.sendMsgErr', function(err) { disp.on('em.xmpp.error.sendMsgErr', function(err) {
curMsgMid = err.data.mid curMsgMid = err.data.mid
isFail = true isFail = true
......
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {},
"enablePullDownRefresh":false
} }
\ No newline at end of file
<template name="txt"> <template name="txt">
<text class="msg-text" style="float:left;">{{ item.data }}</text> <text class="msg-text" style="float:left;">{{ item.data }}</text>
</template> </template>
<template name="emoji"> <template name="emoji">
<image <image class="avatar" src="{{ '../../../images/faces/' + item.data }}" style="width:25px; height:25px; margin:0 0 2px 0; float:left;" />
class="avatar"
src="{{ '../../../images/faces/' + item.data }}"
style="width:25px; height:25px; margin:0 0 2px 0; float:left;" />
</template> </template>
<template name="img"> <template name="img">
<image <image class="avatar" src="{{ item.msg.data }}" style="width:90px; height:120px; margin:2px auto;" mode="aspectFit" bind:tap="previewImage" data-url="{{ item.msg.data }}" />
class="avatar"
src="{{ item.msg.data }}"
style="width:90px; height:120px; margin:2px auto;"
mode="aspectFit"
bind:tap="previewImage"
data-url="{{ item.msg.data }}" />
</template>
<template name="video">
<video src="{{ item.msg.data }}" controls autoplay />
</template>
<template name="audio">
<audio src="{{ item.msg.url }}" controls autoplay />
</template> </template>
<!-- view 换成 scroll-view效果更好 用view是为了要stopPullDownRefresh --> <!-- view 换成 scroll-view效果更好 用view是为了要stopPullDownRefresh -->
<view <view scroll-y="true" class="{{ view }} wrap {{isIPX?'scroll_view_X': ''}}" bind:tap="onTap" scroll-into-view="{{ toView }}">
scroll-y="true" <view class="message" wx:for="{{ chatMsg }}" wx:key="{{ item.mid }}" id="{{ item.mid }}">
class="{{ view }} wrap {{isIPX?'scroll_view_X': ''}}" <view class="{{ item.style }}">
bind:tap="onTap" <!-- <view class="user">
bindscroll="scrollmore"
bindscrolltoupper="refresh"
upper-threshold='-50'
scroll-into-view="{{ toView }}">
<view class="message" wx:for="{{ chatMsg }}" wx:key="{{ item.mid }}" id="{{ item.mid }}">
<!-- <view class="time">
<text class="time-text">{{ item.time }}</text>
</view> -->
<view class="main" class="{{ item.style }}">
<view class="user">
<!-- yourname:就是消息的 from -->
<text class="user-text">{{ item.yourname + ' ' + item.time}}</text> <text class="user-text">{{ item.yourname + ' ' + item.time}}</text>
</view> </view> -->
<image class="avatar" src="../../../images/theme@2x.png"/> <image class="avatar" src="../../../images/theme@2x.png" />
<view class="msg"> <view class="msg">
<image <image class="err {{(item.style == 'self' && item.isFail) ? 'show' : 'hide'}}" src="../../../images/msgerr.png" />
class="err {{(item.style == 'self' && item.isFail) ? 'show' : 'hide'}}"
src="../../../images/msgerr.png"/>
<image wx:if="{{item.style == 'self'}}" src="../../../images/poprightarrow@2x.png" class="msg_poprightarrow"/> <!-- <image wx:if="{{item.style == 'self'}}" src="../../../images/poprightarrow@2x.png" class="msg_poprightarrow" /> -->
<image wx:if="{{item.style == ''}}" src="../../../images/popleftarrow@2x.png" class="msg_popleftarrow"/> <!-- <image wx:if="{{item.style == ''}}" src="../../../images/popleftarrow@2x.png" class="msg_popleftarrow" /> -->
<view wx:if="{{ item.msg.type == 'img' || item.msg.type == 'video' }}"> <view wx:if="{{ item.msg.type == 'img'}}">
<template is="{{ item.msg.type }}" data="{{ item }}"/> <template is="{{ item.msg.type }}" data="{{ item }}" />
</view> </view>
<audio-msg <view wx:elif="{{ item.msg.type == 'txt' || item.msg.type == 'emoji' }}">
wx:if="{{ item.msg.type == 'audio' }}" <view class="template" wx:for="{{ item.msg.data }}" wx:key="">
msg="{{ item }}"></audio-msg> <template is="{{ item.type }}" data="{{ item }}" />
<view wx:elif="{{ item.msg.type == 'txt' || item.msg.type == 'emoji' }}"> </view>
<view class="template" wx:for="{{ item.msg.data }}" wx:key=""> </view>
<template is="{{ item.type }}" data="{{ item }}"/> </view>
</view> <view class="time">
</view> <text class="time-text">{{ item.time }}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="height: 1px;"></view> <view style="height: 1px;"></view>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
right: 0; right: 0;
bottom: 150rpx;*/ bottom: 150rpx;*/
margin-bottom: 174rpx; margin-bottom: 174rpx;
background-color: #FAFAFA; background-color: #fff;
} }
.scroll_view_X, .scroll_view_X,
...@@ -28,26 +28,22 @@ ...@@ -28,26 +28,22 @@
} }
.message { .message {
width: 92%;
height: auto; height: auto;
padding: 0 30rpx; margin: 0 24rpx 30rpx;
position: relative; position: relative;
} }
.time { .time {
margin: 14rpx 0; margin:0rpx 0 0 92rpx
text-align: center; }
.self .time{
margin:0rpx 92rpx 0 0 ;
} }
.time .time-text { .time .time-text {
display: inline-block; font-size: 22rpx;
padding: 6rpx 20rpx 0 20rpx; color:#ADB6BF;
font-size: 24rpx;
color: #fff;
line-height: 28rpx;
border-radius: 4rpx;
background-color: #dcdcdc;
} }
.user .user-text { .user .user-text {
...@@ -58,26 +54,27 @@ ...@@ -58,26 +54,27 @@
} }
.avatar { .avatar {
width: 72rpx; width: 68rpx;
height: 72rpx; height: 68rpx;
margin: 0 20rpx 0 0; /* margin-left:24rpx; */
border-radius: 6rpx; border-radius: 8rpx;
float: left; float: left;
margin: 0 24rpx 0 0;
} }
.msg { .msg {
display: inline-block; display: inline-block;
padding: 20rpx; padding: 14rpx 24rpx;
max-width: calc(85% - 80rpx); max-width: calc(85% - 80rpx);
min-height: 40rpx; /* min-height: 40rpx; */
font-size: 24rpx; font-size: 24rpx;
/*overflow: hidden;*/
text-align: left; text-align: left;
word-break: break-all; word-break: break-all;
background-color: #fff; background-color: #DFECFC;
border-radius: 26rpx; border-radius:8rpx;
position: relative; position: relative;
margin-top: 24rpx; color: #515559;
} }
.msg .msg_poprightarrow { .msg .msg_poprightarrow {
...@@ -98,7 +95,7 @@ ...@@ -98,7 +95,7 @@
.msg .msg-text { .msg .msg-text {
line-height: 40rpx; line-height: 40rpx;
font-size: 32rpx; font-size: 26rpx;
margin: 0; margin: 0;
} }
...@@ -117,7 +114,7 @@ ...@@ -117,7 +114,7 @@
.self .avatar { .self .avatar {
float: right; float: right;
margin: 0 0 0 20rpx; margin: 0 0 0 24rpx;
} }
.user { .user {
...@@ -126,8 +123,7 @@ ...@@ -126,8 +123,7 @@
} }
.self .msg { .self .msg {
background-color: #0873DE; background-color: #FCF2DF;
color: #fff;
} }
.self .msg:before { .self .msg:before {
......
images/pic.png

927 Bytes

...@@ -19,14 +19,6 @@ Page({ ...@@ -19,14 +19,6 @@ Page({
onUnload() { onUnload() {
disp.fire("em.chatroom.leave"); disp.fire("em.chatroom.leave");
}, }
onPullDownRefresh: function () {
wx.showNavigationBarLoading();
this.selectComponent('#chat').getMore()
// 停止下拉动作
wx.hideNavigationBarLoading();
wx.stopPullDownRefresh();
},
}); });
{ {
"navigationBarTitleText": "chatting", "navigationBarTitleText": "chatting",
"backgroundTextStyle": "dark", "backgroundTextStyle": "dark",
"enablePullDownRefresh": true, "enablePullDownRefresh": false,
"usingComponents": { "usingComponents": {
"chat": "../../components/chat/chat" "chat": "../../../components/chat/chat"
} }
} }
\ No newline at end of file
/* pages/detail/chat/index.wxss */ /* pages/detail/chat/index.wxss */
\ No newline at end of file page{
background-color: #fff;
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<text class="icon iconfont iconiconxiantiaoshouji13 close-icon"></text> <text class="icon iconfont iconiconxiantiaoshouji13 close-icon"></text>
</view> </view>
<view class="message-list"> <view class="message-list">
<view class="message-item px-hr-bottom row verCenter bothSide nowrap" wx:for="{{ arr }}" wx:key="index" catchtap="into_chatRoom"> <view class="message-item px-hr-bottom row verCenter bothSide nowrap" wx:for="{{ arr }}" wx:key="index" catchtap="into_chatRoom" data-item="{{ item }}">
<view class="message-l row verCenter ellipsis"> <view class="message-l row verCenter ellipsis">
<cover-image src="/res/images/imgs/iclogo.png" class="message-avar"></cover-image> <cover-image src="/res/images/imgs/iclogo.png" class="message-avar"></cover-image>
<view class="message-l-view ellipsis"> <view class="message-l-view ellipsis">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</view> </view>
<view class="message-r"> <view class="message-r">
<view class="message-r-t">{{item.time}}</view> <view class="message-r-t">{{item.time}}</view>
<view class="message-r-n">{{ item.unReadCount }}</view> <view class="message-r-n" wx:if="{{ item.unReadCount > 0 || item.unReadCount == '99+' }}">{{ item.unReadCount }}</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -39,13 +39,24 @@ ...@@ -39,13 +39,24 @@
"current": -1, "current": -1,
"list": [] "list": []
}, },
"plugin": {
"current": -1,
"list": []
},
"game": { "game": {
"currentL": -1, "currentL": -1,
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": -1, "current": 0,
"list": [] "list": [
{
"id": -1,
"name": "pages/detail/chat/index",
"pathName": "pages/detail/chat/index",
"scene": null
}
]
} }
} }
} }
\ No newline at end of file
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 sign in to comment