1.修复AI聊天页面的点赞和踩按钮不显示的问题
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
//baseUrl: 'http://zhxg.gxsdxy.cn/prod_api',
|
||||
// baseUrl: 'http://zhxg.gxsdxy.cn/prod_api',
|
||||
// baseUrl: 'http://172.16.96.111:8085',
|
||||
// baseUrl: 'http://192.168.211.22:8085',
|
||||
baseUrl: 'http://localhost:8088',
|
||||
|
@@ -57,12 +57,28 @@
|
||||
<view class="ai-actions">
|
||||
<text class="ai-text">AI回答也可能会犯错。请核查重要信息。</text>
|
||||
<view class="icon-group">
|
||||
<!-- 点赞图标 -->
|
||||
<u-icon
|
||||
:name="item.feedback && item.feedback.rating === 'like' ? 'thumb-up-fill' : 'thumb-up'"
|
||||
:class="['btn-icon', { 'btn-icon-active': item.feedback && item.feedback.rating === 'like' }]"
|
||||
@click="handleThumbUp(item.messageId, index)"
|
||||
size="20"
|
||||
:color="item.feedback && item.feedback.rating === 'like' ? '#007aff' : '#666'"></u-icon>
|
||||
<!-- 点踩图标 -->
|
||||
<u-icon
|
||||
:name="item.feedback && item.feedback.rating === 'dislike' ? 'thumb-down-fill' : 'thumb-down'"
|
||||
:class="['btn-icon', { 'btn-icon-active': item.feedback && item.feedback.rating === 'dislike' }]"
|
||||
@click="handleThumbDown(item.messageId, index)"
|
||||
size="20"
|
||||
:color="item.feedback && item.feedback.rating === 'dislike' ? '#ff3b30' : '#666'"></u-icon>
|
||||
<!-- 原有的img方式(已注释)
|
||||
<img src="/static/good.svg"
|
||||
:class="['btn-icon', { 'btn-icon-active': item.feedback && item.feedback.rating === 'like' }]"
|
||||
@click="handleThumbUp(item.messageId, index)" />
|
||||
<img src="/static/tread.svg"
|
||||
:class="['btn-icon', { 'btn-icon-active': item.feedback && item.feedback.rating === 'dislike' }]"
|
||||
@click="handleThumbDown(item.messageId, index)" />
|
||||
-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -824,20 +840,31 @@ export default {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* 图标按钮样式 - 适配u-icon组件 */
|
||||
.btn-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
opacity: 0.6;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.btn-icon-active {
|
||||
opacity: 1;
|
||||
filter: brightness(1.2) saturate(1.5);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
/* 针对u-icon组件的特殊样式 */
|
||||
.btn-icon.u-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* 激活状态下的颜色变化 */
|
||||
.btn-icon-active.u-icon {
|
||||
color: #007aff !important;
|
||||
}
|
||||
|
||||
/* 输入框区域 */
|
||||
.input-container {
|
||||
display: flex;
|
||||
|
Reference in New Issue
Block a user