Commit 65de1345 by 前端

样式

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