Fix:4003 【商城小程序】互动消息列表,点击时未跳转至资讯详情

This commit is contained in:
linxi
2025-07-11 13:52:44 +08:00
parent c4317ed20b
commit 0b4337e393
+7 -2
View File
@@ -1,7 +1,7 @@
<template> <template>
<view class=" call-message"> <view class=" call-message">
<view class="comment-list v12-pa-3"> <view class="comment-list v12-pa-3">
<view class="v12-mt-2" v-for="(comment, index) in list" :key="index"> <view class="v12-mt-2" v-for="(comment, index) in list" :key="index" @click="toInfo(comment)">
<view class="user-info v12-align-center"> <view class="user-info v12-align-center">
<view class="user-avatar"> <view class="user-avatar">
<u-avatar :src="comment.senderUserAvatar"></u-avatar> <u-avatar :src="comment.senderUserAvatar"></u-avatar>
@@ -40,7 +40,7 @@
icon="chat" icon="chat"
shape="circle" shape="circle"
size="normal" size="normal"
@click="showSendBtn(comment)" @click.stop="showSendBtn(comment)"
:customStyle="{ :customStyle="{
backgroundColor: '#eee', backgroundColor: '#eee',
width: '160rpx', width: '160rpx',
@@ -136,6 +136,9 @@ export default {
this.fetchList() // 查询消息列表 this.fetchList() // 查询消息列表
}, },
methods: { methods: {
toInfo(comment) {
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + comment.contentId)
},
/** /**
* 格式化时间 * 格式化时间
* @param {*} time * @param {*} time
@@ -169,6 +172,8 @@ export default {
* 发送消息 * 发送消息
*/ */
showSendBtn(item) { showSendBtn(item) {
console.log(item);
this.showBtn = true // 显示发送按钮 this.showBtn = true // 显示发送按钮
setTimeout(() => { // 延迟100ms,否则无法聚焦 setTimeout(() => { // 延迟100ms,否则无法聚焦
this.autoFocus = true // 自动聚焦 this.autoFocus = true // 自动聚焦