Commit ba693b85 by 李伟康

fix(recording): 解决录音回放页面数据加载和图片路径问题

- 添加 flag 标志控制录音记录显示逻辑
- 修复录音详情页对话组件中的图片路径引用
- 更新录音详情页质量评估组件的图片路径配置
- 移除无效的分享按钮并调整音频播放组件
- 优化录音回放列表的数据更新机制
- 修复接口调用参数传递和返回值处理问题
1 parent 25160f69
...@@ -8,7 +8,8 @@ Page({ ...@@ -8,7 +8,8 @@ Page({
*/ */
data: { data: {
records: [], records: [],
pageNum: 1 pageNum: 1,
flag:false
}, },
/** /**
...@@ -58,10 +59,12 @@ Page({ ...@@ -58,10 +59,12 @@ Page({
}) })
this.setData({ this.setData({
records: [...records, ...list], records: [...records, ...list],
total total,
}) })
} else wx.$util.showToast(message) } else wx.$util.showToast(message)
this.setData({
flag:true
})
}, },
reviewRecord({ reviewRecord({
detail detail
...@@ -81,7 +84,8 @@ Page({ ...@@ -81,7 +84,8 @@ Page({
onShow() { onShow() {
this.setData({ this.setData({
records: [], records: [],
pageNum: 1 pageNum: 1,
flag:false
}) })
this.getAudioReviewSummary() this.getAudioReviewSummary()
this.getAudioReviewList() this.getAudioReviewList()
......
...@@ -19,23 +19,28 @@ ...@@ -19,23 +19,28 @@
</view> </view>
</view> </view>
<!-- 录音记录卡片列表 --> <!-- 录音记录卡片列表 -->
<block wx:if="{{records.length}}"> <block wx:if="{{flag}}">
<block wx:for="{{records}}" wx:key="index" wx:for-item="record"> <block wx:if="{{records.length}}">
<view class="record-block"> <block wx:for="{{records}}" wx:key="index" wx:for-item="record">
<block wx:if="{{index != records.length - 1}}"> <view class="record-block">
<view class="line"></view> <block wx:if="{{index != records.length - 1}}">
</block> <view class="line"></view>
<view class="index-badge-box"> </block>
<view class="index-badge"> <view class="index-badge-box">
{{index + 1}} <view class="index-badge">
{{index + 1}}
</view>
</view> </view>
<review-item record="{{record}}" bindreviewrecord="reviewRecord"></review-item>
</view> </view>
<review-item record="{{record}}" bindreviewrecord="reviewRecord"></review-item> </block>
</view> <block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block> </block>
</block> <block wx:else>
<block wx:else> <empty-data></empty-data>
<empty-data></empty-data> </block>
</block> </block>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -222,7 +222,7 @@ Component({ ...@@ -222,7 +222,7 @@ Component({
}, },
/**对话列表 */ /**对话列表 */
async findConversationDetailByBatchId(params) { async findConversationDetailByBatchId(params) {
const { data: dialogueList } = await api.findConversationDetailByBatchIdNew(params) const dialogueList = await api.findConversationDetailByBatchId(params)
this.getAudioObject() this.getAudioObject()
dialogueList?.map(e => { dialogueList?.map(e => {
e.visible = true e.visible = true
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<block wx:if="{{item.visible}}"> <block wx:if="{{item.visible}}">
<view class="avatar-box"> <view class="avatar-box">
<view class="icon"> <view class="icon">
<!-- <image class="icon" src="/assets/images/role-{{item.role}}.png" /> --> <image class="icon" src="{{IMG_URL}}role-{{item.role}}.png" />
</view> </view>
<view class="time">{{item.time}}</view> <view class="time">{{item.time}}</view>
</view> </view>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<view class="text-box"> <view class="text-box">
<view class="btn" bindtap="switchDetail" data-index="{{index}}" data-ind="{{ind}}" data-key="showCheckDetail" data-value="{{i.showCheckDetail}}"> <view class="btn" bindtap="switchDetail" data-index="{{index}}" data-ind="{{ind}}" data-key="showCheckDetail" data-value="{{i.showCheckDetail}}">
意图匹配 意图匹配
<image class="arrow" src="/assets/images/date-arrow.png" mode=""/> <image class="arrow" src="{{IMG_URL}}date-arrow.png" mode=""/>
</view> </view>
{{i.tagGroupName}} {{i.tagGroupName}}
<view class="score">{{i.score}}分</view> <view class="score">{{i.score}}分</view>
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
<view class="content-box"> <view class="content-box">
<block wx:if="{{!i.scriptRec}}"> <block wx:if="{{!i.scriptRec}}">
<view class="suggestions-box no"> <view class="suggestions-box no">
<image class="icon" src="/assets/images/no-suggestions.png" mode=""/> <image class="icon" src="{{IMG_URL}}no-suggestions.png" mode=""/>
暂无话术推荐 暂无话术推荐
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="suggestions-box"> <view class="suggestions-box">
<view class="title"> <view class="title">
<image class="icon" src="/assets/images/suggestions-icon.png" /> <image class="icon" src="{{IMG_URL}}suggestions-icon.png" />
话术推荐 话术推荐
</view> </view>
<view class="text"> <view class="text">
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view id="{{item.text_id}}" class="quality-item flex {{item.text_id == activeId?'active':''}}" bind:tap="seekPlay" data-item="{{item}}"> <view id="{{item.text_id}}" class="quality-item flex {{item.text_id == activeId?'active':''}}" bind:tap="seekPlay" data-item="{{item}}">
<view class="avatar-box"> <view class="avatar-box">
<view class="icon"> <view class="icon">
<!-- <image class="icon" src="/assets/images/role-{{item.role}}.png" /> --> <image class="icon" src="{{IMG_URL}}role-{{item.role}}.png" />
</view> </view>
<view class="time">{{item.time}}</view> <view class="time">{{item.time}}</view>
</view> </view>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<view class="script-rec"> <view class="script-rec">
<view class="suggestions-box"> <view class="suggestions-box">
<view class="suggestions-title"> <view class="suggestions-title">
<image class="icon" src="/assets/images/suggestions-icon.png" /> <image class="icon" src="{{IMG_URL}}suggestions-icon.png" />
话术推荐 话术推荐
</view> </view>
<view class="text"> <view class="text">
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import api from '~/api/index/index' import api from '~/api/index/index'
import dayjs from 'dayjs' import dayjs from 'dayjs'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
import {findCheckResultByBatchId} from '~/api/crew/index'
import { import {
getShortUrl getShortUrl
} from "~/api/crew/index" } from "~/api/crew/index"
...@@ -91,8 +90,7 @@ Page({ ...@@ -91,8 +90,7 @@ Page({
batchId batchId
} }
} = this.data, } = this.data,
{data} = await findCheckResultByBatchId({ data = await api.getReceptionDetail({
// data = await api.getReceptionDetail({
batchId batchId
}) })
if (!data) throw '获取数据失败' if (!data) throw '获取数据失败'
...@@ -338,15 +336,17 @@ Page({ ...@@ -338,15 +336,17 @@ Page({
id id
} = this.data.record } = this.data.record
if (values && values.length) { if (values && values.length) {
const { const reviewTarget = values.join(','),
{
data data
} = await api.submitAudioReview({ } = await api.submitAudioReview({
id, id,
reviewTarget: values.join(',') reviewTarget
}) })
if (data) { if (data) {
this.setData({ this.setData({
['record.tagList']: values ['record.tagList']: values,
['record.reviewTarget']:reviewTarget
}) })
wx.$util.showToast('提交成功') wx.$util.showToast('提交成功')
this.hideSelectPopup() this.hideSelectPopup()
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
<view class="reception-operate"> <view class="reception-operate">
<image class="img share" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/down-icon.png" bind:tap="download" mode=""/> <image class="img share" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/down-icon.png" bind:tap="download" mode=""/>
<image class="img share" src="{{IMG_URL}}share-icon.png" bind:tap="share" mode=""/> <!-- <image class="img share" src="{{IMG_URL}}share-icon.png" bind:tap="share" mode=""/> -->
<view class="audio-wrap" bind:tap="onHandle"> <view class="audio-wrap" bind:tap="onHandle">
<image class="img" src="{{IMG_URL}}play-icon.png" wx:if="{{status=='pause'||status=='ending'}}" /> <image class="img" src="{{IMG_URL}}play-icon.png" wx:if="{{status=='pause'||status=='ending'}}" />
<image class="img" src="{{IMG_URL}}stop-icon.png" wx:else /> <image class="img" src="{{IMG_URL}}stop-icon.png" wx:else />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!