Commit fef944d8 by 李伟康

refactor(receptionDetail): 优化质检详情页面功能

- 移除未使用的 appConfigModule 和 appConfigUrl 变量
- 注释调整,提高代码可读性
- 新增 seekPlay 方法,实现点击播放功能
- 修复静默播放相关逻辑
1 parent 2320706c
...@@ -12,9 +12,7 @@ const serverConfig = { ...@@ -12,9 +12,7 @@ const serverConfig = {
mockCache: null mockCache: null
}, },
configModule = 'app-tape', configModule = 'app-tape',
appConfigModule = 'app-config-url',
boutiqueConfigModule = 'boutique-pad-config', boutiqueConfigModule = 'boutique-pad-config',
appConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${appConfigModule}&env=${env}`,
configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`, configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`,
boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}` boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}`
/**获取APP配置 */ /**获取APP配置 */
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
> >
<view :class="['axis-dot', `${!isPlayIng && !isScrolllIng?'':'radius'}`]"></view> <view :class="['axis-dot', `${!isPlayIng && !isScrolllIng?'':'radius'}`]"></view>
</view> </view>
<!-- <template v-if="!isPlayIng && !isScrolllIng"> --> <template v-if="!isPlayIng && !isScrolllIng">
<view <view
:class="['axis-text',{'axis-text-active':activeId == item.text_id}]" :class="['axis-text',{'axis-text-active':activeId == item.text_id}]"
:style="[{top:`${item.top + 'px'}`}]" :style="[{top:`${item.top + 'px'}`}]"
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
> >
{{item.tagGroupName}}+{{item.score}} {{item.tagGroupName}}+{{item.score}}
</view> </view>
<!-- </template> --> </template>
</block> </block>
</template> </template>
<view class="hide-bar"> <view class="hide-bar">
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
v-if="item.text_id" v-if="item.text_id"
:id="item.text_id" :id="item.text_id"
:class="['quality-item flex',{active:item.text_id == activeId}]" :class="['quality-item flex',{active:item.text_id == activeId}]"
@click="seekPlay(item)"
> >
<view class="avatar-box"> <view class="avatar-box">
<view :class="['sprite-icon',`icon-role-${item.role}`]"></view> <view :class="['sprite-icon',`icon-role-${item.role}`]"></view>
...@@ -98,6 +99,21 @@ export default { ...@@ -98,6 +99,21 @@ export default {
mergedOffset mergedOffset
} }
}, },
seekPlay (item) {
let { activeId } = this
this.$emit('seek', item.mergedOffset)
if (item.text_id == activeId) {
const {
paused
} = this.qualityAudio
if (paused) this.$emit('onPlay')
else this.$emit('onPause')
this.$emit('changeOperate', !paused)
} else {
this.$emit('onPlay')
this.$emit('changeOperate', false)
}
}
} }
} }
</script> </script>
......
...@@ -76,6 +76,10 @@ ...@@ -76,6 +76,10 @@
:class="['component-item',{hide: tabId != 2}]" :class="['component-item',{hide: tabId != 2}]"
ref="qualityRef" ref="qualityRef"
:qualityAudio="qualityAudio" :qualityAudio="qualityAudio"
@seek="seek"
@onPlay="onPlay"
@onPause="onPause"
@changeOperate="isOperate = $event"
/> />
</view> </view>
</view> </view>
...@@ -253,7 +257,7 @@ export default { ...@@ -253,7 +257,7 @@ export default {
item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec
} }
} else item.conversationDetailDTOList = [{ } else item.conversationDetailDTOList = [{
scriptRec: scriptRec || '暂无建议' scriptRec: scriptRec || '暂无建议'
}] }]
}) })
this.qualityData = res this.qualityData = res
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!