|
@@ -164,6 +164,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
toggleRecording() {
|
|
toggleRecording() {
|
|
|
if (this.recordedForm.status == 1) {
|
|
if (this.recordedForm.status == 1) {
|
|
|
|
|
+ // 检查录音时间是否至少为5秒
|
|
|
|
|
+ const now = Date.now();
|
|
|
|
|
+ const duration = (now - this.recordingStartTimestamp) / 1000;
|
|
|
|
|
+ if (duration < 5) {
|
|
|
|
|
+ this.$message.warning('录音时间至少需要5秒');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.onFinishRecordWithMicrosoft();
|
|
this.onFinishRecordWithMicrosoft();
|
|
|
} else {
|
|
} else {
|
|
|
this.onStartRecordWithMicrosoft();
|
|
this.onStartRecordWithMicrosoft();
|
|
@@ -309,7 +316,7 @@ export default {
|
|
|
et: this.recordingEndTime
|
|
et: this.recordingEndTime
|
|
|
};
|
|
};
|
|
|
this.ajax
|
|
this.ajax
|
|
|
- .post(this.$store.state.api + "addPPTClass", params)
|
|
|
|
|
|
|
+ .post(this.$store.state.api + "addPPTClass", [params])
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
console.log("addPPTClass", res);
|
|
console.log("addPPTClass", res);
|
|
|
let id = res.data[0][0].id;
|
|
let id = res.data[0][0].id;
|