|
@@ -44,14 +44,20 @@
|
|
|
</view>
|
|
|
<!-- 头像 -->
|
|
|
<view class="msg_user_img">
|
|
|
- <image style="width: 100%; height: 100%;" mode="aspectFill" :src="imageUrl + item.userPic"></image>
|
|
|
+ <image v-if="item.userPic" style="width: 100%; height: 100%;" mode="aspectFill"
|
|
|
+ :src="imageUrl + item.userPic"></image>
|
|
|
+ <image v-else style="width: 100%; height: 100%;" mode="aspectFill" src="@/static/common/logo.png">
|
|
|
+ </image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 左消息 -->
|
|
|
<view class="msg_view" v-else>
|
|
|
<!-- 头像 -->
|
|
|
<view class="msg_user_img">
|
|
|
- <image style="width: 100%; height: 100%;" mode="aspectFill" :src="imageUrl + item.userPic"></image>
|
|
|
+ <image v-if="item.userPic" style="width: 100%; height: 100%;" mode="aspectFill"
|
|
|
+ :src="imageUrl + item.userPic"></image>
|
|
|
+ <image v-else style="width: 100%; height: 100%;" mode="aspectFill" src="@/static/common/logo.png">
|
|
|
+ </image>
|
|
|
</view>
|
|
|
<view class="msg_view_info msg_view_info_left">
|
|
|
<view class="msg_view_conent">{{item.message}}</view>
|
|
@@ -120,7 +126,8 @@
|
|
|
list: [],
|
|
|
message: "",
|
|
|
userId: this.$store.state.user.userId,
|
|
|
- goodsDetail: {}
|
|
|
+ goodsDetail: {},
|
|
|
+ ids: {}
|
|
|
}
|
|
|
},
|
|
|
onLoad(pam) {
|
|
@@ -223,10 +230,15 @@
|
|
|
return {}
|
|
|
})(),
|
|
|
}, false).then(res => {
|
|
|
+ var newlist = res.data.filter(item => {
|
|
|
+ var bool = !this.ids[item.id]
|
|
|
+ this.ids[item.id] = true
|
|
|
+ return bool
|
|
|
+ })
|
|
|
if (flag) {
|
|
|
- this.list.unshift(...res.data)
|
|
|
+ this.list.unshift(...newlist)
|
|
|
} else {
|
|
|
- this.list.push(...res.data)
|
|
|
+ this.list.push(...newlist)
|
|
|
}
|
|
|
cb && cb()
|
|
|
})
|