|
@@ -11,8 +11,7 @@
|
|
{{item.time}}
|
|
{{item.time}}
|
|
</view>
|
|
</view>
|
|
<view class="msg-m msg-left" v-if="item.speaker != user._id">
|
|
<view class="msg-m msg-left" v-if="item.speaker != user._id">
|
|
- <image class="user-img"
|
|
|
|
- :src="config.logo_url&&config.logo_url.length>0?config.logo_url[0].url:''">
|
|
|
|
|
|
+ <image class="user-img" :src="config.logo&&config.logo.length>0?config.logo[0].url:''">
|
|
</image>
|
|
</image>
|
|
<!-- 文字 -->
|
|
<!-- 文字 -->
|
|
<view class="message" v-if="item.msg_type =='0'">
|
|
<view class="message" v-if="item.msg_type =='0'">
|
|
@@ -24,8 +23,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="msg-m msg-right" v-else-if="item.speaker == user._id">
|
|
<view class="msg-m msg-right" v-else-if="item.speaker == user._id">
|
|
- <image class="user-img" :src="user.logo&&user.logo.length>0?user.logo[0].url:''">
|
|
|
|
- </image>
|
|
|
|
|
|
+ <u-avatar :text="formatName(user.nickname)" fontSize="22" randomBgColor></u-avatar>
|
|
<!-- 文字 -->
|
|
<!-- 文字 -->
|
|
<view class="message" v-if="item.msg_type =='0'">
|
|
<view class="message" v-if="item.msg_type =='0'">
|
|
<view class="msg-text">{{item.content}}</view>
|
|
<view class="msg-text">{{item.content}}</view>
|
|
@@ -259,6 +257,9 @@
|
|
that.$set(that, `skip`, 0)
|
|
that.$set(that, `skip`, 0)
|
|
that.$set(that, `limit`, 6)
|
|
that.$set(that, `limit`, 6)
|
|
that.$set(that, `page`, 0)
|
|
that.$set(that, `page`, 0)
|
|
|
|
+ },
|
|
|
|
+ formatName(str) {
|
|
|
|
+ if (str) return str.substr(0, 1) + new Array(str.length).join('');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|