Commit d5658688 by 李伟康

commit 修复BUG

1 parent ec3df806
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus; return this.$store.state.user.historyStatus;
}, },
toolList(){ toolList () {
return JSON.parse(JSON.stringify(this.media)).sort(function (a, b) { return JSON.parse(JSON.stringify(this.media)).sort(function (a, b) {
return a.shortSort - b.shortSort return a.shortSort - b.shortSort
}) })
...@@ -149,7 +149,17 @@ export default { ...@@ -149,7 +149,17 @@ export default {
this.$emit("update:id", Number(id)); this.$emit("update:id", Number(id));
}, },
/**回店客户 */ /**回店客户 */
reception ({ item }) { async reception ({ item }) {
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return
}
this.$store.dispatch('setCustomerInfo', { this.$store.dispatch('setCustomerInfo', {
customerName: item.customerName, customerName: item.customerName,
carModel: item.carSeriesName, carModel: item.carSeriesName,
......
...@@ -187,11 +187,12 @@ export default { ...@@ -187,11 +187,12 @@ export default {
title: "为了记录语音通话,请打开录音权限", title: "为了记录语音通话,请打开录音权限",
icon: "none", icon: "none",
}); });
return; return false
} }
if (before) this.clearHistory(); if (before) this.clearHistory();
this.startAudio(); this.startAudio();
this.recording = true this.recording = true
return true
}, },
jumpPage (id) { jumpPage (id) {
this.id = id ? id : this.moduleList[0].id this.id = id ? id : this.moduleList[0].id
...@@ -205,10 +206,11 @@ export default { ...@@ -205,10 +206,11 @@ export default {
this.$refs.home.finishRef.close(); this.$refs.home.finishRef.close();
this.$refs.detail.open(); this.$refs.detail.open();
}, },
chooseCustomerType (index) { async chooseCustomerType (index) {
const { moduleList } = this const { moduleList } = this,
flag = await this.start()
if (!flag) return
this.customerType = index this.customerType = index
this.start()
if (index == 0) { if (index == 0) {
const { id } = moduleList[moduleList.length - 1] const { id } = moduleList[moduleList.length - 1]
this.jumpPage(id) this.jumpPage(id)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!