Commit 65de1345 by 前端

样式

1 parent 9132599b
......@@ -155,15 +155,12 @@ export default {
if (customerName && phoneNumber && salesUuid) {
uni.$api.commonApi.saveRecCustomer(params).then((res) => {
console.log(res, params);
this.setAudioInfo({ audioStatus: "finish" });
});
} else {
this.setAudioInfo({ audioStatus: "finish" });
}
this.setBooks([]);
this.$store.dispatch("clearCustomerInfo");
this.setReceptionStatus(1);
this.setAudioInfo({ endReasonType: 0 });
this.setAudioInfo({ endReasonType: 0, audioStatus: "finish" });
uni.$storage.set("storageFile", "");
} catch (error) {
this.$store.dispatch("clearCustomerInfo");
......@@ -182,13 +179,22 @@ export default {
});
recorderManager.onStop(async (res) => {
console.log("结束录音");
if (this.audioInfo.audioStatus != "end") {
if (this.audioInfo.audioStatus == "start") {
uni.getRecorderManager().start({
duration: 600000,
sampleRate: 16000,
numberOfChannels: 1,
});
}
if (this.audioInfo.audioStatus == "no") {
uni.removeSavedFile({
filePath: res.tempFilePath,
complete: function (res) {
console.log(res);
},
});
return;
}
// const isContinue = this.hasErrorFile();
// if (isContinue) {
// this.handleErrorFile(res.tempFilePath);
......@@ -215,7 +221,7 @@ export default {
const storageFile = [...this.audioInfo.audioList, result];
uni.$storage.set("storageFile", storageFile);
this.setAudioInfo({ audioList: storageFile });
if (this.audioInfo.audioStatus != "end") {
if (this.audioInfo.audioStatus == "start") {
return;
}
this.uploadVoice(storageFile);
......@@ -307,29 +313,34 @@ export default {
if (this.audioInfo.audioStatus != "start") {
return;
}
let finish_timer = null;
this.setAudioInfo({ audioStatus: "end" });
//直接退出
if (!status) {
uni.showLoading({
mask: true,
title: "处理中请稍后...",
});
// setTimeout(() => {
// uni.hideLoading();
// clearInterval(finish_timer);
// }, 1000 * 60);
}
let finish_timer = null;
this.setAudioInfo({ audioStatus: "end" });
this.times = 0;
clearInterval(this.timer);
this.timer = null;
recorderManager.stop();
if (status) {
return;
this.setAudioInfo({ audioStatus: "no" });
}
finish_timer = setInterval(() => {
if (this.audioInfo.audioStatus == "finish") {
uni.hideLoading();
clearInterval(finish_timer);
}
}, 300);
recorderManager.stop();
if (!status)
finish_timer = setInterval(() => {
if (this.audioInfo.audioStatus == "finish") {
uni.hideLoading();
clearInterval(finish_timer);
}
}, 300);
}, 1500),
//监听点击事件
initTime() {
......
......@@ -469,12 +469,14 @@ export default {
padding-left: 30rpx;
&:first-child {
width: 60%;
border-radius: 10rpx 0rpx 0rpx 10rpx;
}
&:nth-child(2) {
width: 20%;
}
&:nth-child(3) {
width: 20%;
border-radius: 0rpx 10rpx 10rpx 0rpx;
}
}
}
......
......@@ -291,6 +291,8 @@ export default {
box-sizing: border-box;
padding: 24rpx 32rpx;
position: relative;
width: 100%;
overflow: hidden;
.status {
position: absolute;
top: 24rpx;
......@@ -331,7 +333,7 @@ export default {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 70%;
width: calc(100% - 140rpx);
}
.goods-name {
font-weight: 500;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!