Commit 9132599b by 前端

直接退出

1 parent c768fdb2
......@@ -293,7 +293,7 @@ export default {
return new Error(errorMsg);
},
//结束接待
stopAudio: utils.throttle(async function () {
stopAudio: utils.throttle(async function (status) {
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// );
......@@ -304,22 +304,32 @@ export default {
// });
// return;
// }
uni.showLoading({
mask: true,
title: "处理中请稍后...",
});
if (this.audioInfo.audioStatus != "start") {
return;
}
//直接退出
if (!status) {
uni.showLoading({
mask: true,
title: "处理中请稍后...",
});
}
let finish_timer = null;
this.setAudioInfo({ audioStatus: "end" });
this.times = 0;
clearInterval(this.timer);
this.timer = null;
recorderManager.stop();
if (status) {
return;
}
finish_timer = setInterval(() => {
if (this.audioInfo.audioStatus == "finish") {
uni.hideLoading();
clearInterval(finish_timer);
}
}, 1000);
}, 300);
}, 1500),
//监听点击事件
initTime() {
......
......@@ -8,23 +8,15 @@
@backHome="backHome"
@changeTab="changeTab"
>
<view
class="module-box"
slot="module"
:key="moduleKey"
>
<template v-for="(i,index) in moduleList">
<view class="module-box" slot="module" :key="moduleKey">
<template v-for="(i, index) in moduleList">
<view
:key="index"
:class="['item',i.class]"
:class="['item', i.class]"
:style="i.style"
@click="toDetail(i)"
>
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
/>
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" />
</view>
</template>
</view>
......@@ -45,15 +37,12 @@
/>
</template>
<template slot="content">
<customer-type
ref="customerTypeRef"
@choose="chooseCustomerType"
/>
<customer-type ref="customerTypeRef" @choose="chooseCustomerType" />
</template>
</home-frame>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import myClick from "@/mixin/click";
import HomeFrame from '../../components/HomeFrame/index.vue'
import RecordList from '../home/components/RecordList.vue';
......@@ -169,7 +158,7 @@ export default {
this.backHome();
},
backHome () {
if (this.recording) this.stopAudio();
if (this.recording) this.stopAudio(true);
this.$refs.home.finishRef.close();
this.id = "";
this.type = "";
......@@ -242,7 +231,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.module-box {
display: flex;
flex-wrap: wrap;
......@@ -272,4 +261,4 @@ export default {
height: 624rpx;
}
}
</style>
\ No newline at end of file
</style>
......@@ -323,7 +323,7 @@ export default {
this.backHome();
},
backHome() {
if (this.recording) this.stopAudio();
if (this.recording) this.stopAudio(true);
this.recording = false;
this.$refs.finish.close();
this.id = "";
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!