diff --git a/package2/IdleTrad/chat.vue b/package2/IdleTrad/chat.vue index ef18d42..d54846c 100644 --- a/package2/IdleTrad/chat.vue +++ b/package2/IdleTrad/chat.vue @@ -109,11 +109,8 @@ return this.isWant ? (this.goods.expectedPrice || 0) : (this.goods.price || 0) }, peerName() { - if (!this.goods || !this.session) return '校园同学' - if (this.isWant) { - return this.selfId == String(this.session.buyerId) ? '供货同学' : (this.goods.userName || '求购同学') - } - return this.selfId == String(this.session.sellerId) ? '买家同学' : (this.goods.userName || '卖家同学') + if (!this.goods) return '校园同学' + return this.goods.userName || (this.isWant ? '求购同学' : '卖家同学') }, peerAvatar() { return this.defaultAvatar diff --git a/package2/IdleTrad/detail.vue b/package2/IdleTrad/detail.vue index 89edcc1..2e089de 100644 --- a/package2/IdleTrad/detail.vue +++ b/package2/IdleTrad/detail.vue @@ -51,7 +51,7 @@ - 半径卖家已实名 + {{goods.userName || (isWant ? '求购同学' : '半径卖家')}}已实名 {{goods.sellerOnlineStatus || '3天内在线'}} 线下面交 @@ -82,13 +82,13 @@ - 半径同学 + {{item.userName || '校园同学'}} 卖家 {{item.content}} - 半径同学 + {{reply.userName || '校园同学'}} 卖家 回复 {{reply.replyToUserName}} :{{reply.content}} @@ -199,7 +199,7 @@ showCommentInput: false, commentSubmitting: false, replyTarget: {}, - defaultAvatar: '', + defaultAvatar: '/static/images/img/songshu.png', defaultShareImage: '/static/images/img/songshu.png', currentUserId: uni.getStorageSync('id') || '', currentImageIndex: 0, @@ -391,6 +391,7 @@ const replyTarget = { ...(this.replyTarget || {}) } const payload = { goodsId: this.id, + ...this.getCachedUserProfile(), content } if (replyTarget && replyTarget.id) { @@ -552,6 +553,12 @@ uni.makePhoneCall({ phoneNumber: String(phone) }) + }, + getCachedUserProfile() { + return { + userName: uni.getStorageSync('nickName') || uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '', + userAvatar: uni.getStorageSync('avatar') || uni.getStorageSync('avatarUrl') || uni.getStorageSync('headimgurl') || '' + } } } } diff --git a/package2/group/groupBuySingle.vue b/package2/group/groupBuySingle.vue index 9cf55ea..6ade75e 100644 --- a/package2/group/groupBuySingle.vue +++ b/package2/group/groupBuySingle.vue @@ -404,7 +404,7 @@ - + @@ -438,7 +438,8 @@ - + 搭配小食 @@ -458,12 +459,12 @@ - + + style="width: 112rpx;height: 112rpx;background-size: 100%;border-radius: 10px;"> ¥{{spec.attributeListPrice | sliceMsg}} @@ -476,9 +477,9 @@ - + - +