Commit ed3be0ec by 李伟康

feat(equity): 添加录音服务功能

- 引入录音服务模块用于记录音频
- 在页面加载时启动音频录制功能
- 在返回首页时停止音频录制并清理资源
1 parent aee791e7
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
import { state , dispatch} from "@/store/index.uts" import { state , dispatch} from "@/store/index.uts"
import { getSoureData } from '@/api/system-api.uts' import { getSoureData } from '@/api/system-api.uts'
import { findPayInfo as findPayInfoApi } from '@/api/common-api.uts' import { findPayInfo as findPayInfoApi } from '@/api/common-api.uts'
import { recordService, BusinessDataType } from '@/services/recorder/index.uts'
type BackPressEvent = { type BackPressEvent = {
from: string from: string
} }
...@@ -396,6 +396,7 @@ const currentCarInfo = computed(() => { ...@@ -396,6 +396,7 @@ const currentCarInfo = computed(() => {
paymentTypeList.value = paymentType paymentTypeList.value = paymentType
} }
onLoad((options) => { onLoad((options) => {
recordService.startAudio()
dispatch('setCustomerInfo', {}) dispatch('setCustomerInfo', {})
moduleList.value = [ moduleList.value = [
{ {
...@@ -488,7 +489,7 @@ const currentCarInfo = computed(() => { ...@@ -488,7 +489,7 @@ const currentCarInfo = computed(() => {
dispatch('clearReceptionTrack') dispatch('clearReceptionTrack')
} }
function backHome():void{ function backHome():void{
clearHistory() recordService.stopAudio()
uni.navigateBack() uni.navigateBack()
} }
function back(): void { function back(): void {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!