Commit 7f070d45a9732f9c73bfb74d895491954048728d
1 parent
730c5544
add file accepts
Showing
2 changed files
with
7 additions
and
3 deletions
src/html/index.html
| @@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
| 62 | <el-input v-model.trim="form.name" :maxlength="50" placeholder="请输入联系人姓名"></el-input> | 62 | <el-input v-model.trim="form.name" :maxlength="50" placeholder="请输入联系人姓名"></el-input> |
| 63 | </el-form-item> | 63 | </el-form-item> |
| 64 | <el-form-item :label="labels.audioFile" class="diy-flex-100" prop="audioFile"> | 64 | <el-form-item :label="labels.audioFile" class="diy-flex-100" prop="audioFile"> |
| 65 | - <el-upload class="upload-demo" :action="uploadUrl" :auto-upload="false" :file-list="fileList" accept=".mp3" | 65 | + <el-upload class="upload-demo" :action="uploadUrl" :auto-upload="false" :file-list="fileList" accept=".mp3, .flac, .ogg, .wav" |
| 66 | @change="getMp3" :on-exceed="exceed" :before-remove="handleRemove" :disabled="btnDisabled" :show-file-list="false"> | 66 | @change="getMp3" :on-exceed="exceed" :before-remove="handleRemove" :disabled="btnDisabled" :show-file-list="false"> |
| 67 | <el-button size="small" type="primary" :disabled="btnDisabled" class="diy-button width-190 bg-blue">选择文件</el-button> | 67 | <el-button size="small" type="primary" :disabled="btnDisabled" class="diy-button width-190 bg-blue">选择文件</el-button> |
| 68 | <span class="diy-danger">{{msgText}}</span> | 68 | <span class="diy-danger">{{msgText}}</span> |
src/js/audios.js
| @@ -357,8 +357,8 @@ const Audio = { | @@ -357,8 +357,8 @@ const Audio = { | ||
| 357 | .then((res) => { | 357 | .then((res) => { |
| 358 | if (res.data) { | 358 | if (res.data) { |
| 359 | setTimeout(() => { | 359 | setTimeout(() => { |
| 360 | - console.log("jump"); | ||
| 361 | - // window.location.replace("./success.html"); | 360 | + // console.log("jump"); |
| 361 | + window.location.replace("./success.html"); | ||
| 362 | }, 1000); | 362 | }, 1000); |
| 363 | } else { | 363 | } else { |
| 364 | setTimeout(() => { | 364 | setTimeout(() => { |
| @@ -369,6 +369,10 @@ const Audio = { | @@ -369,6 +369,10 @@ const Audio = { | ||
| 369 | }) | 369 | }) |
| 370 | .catch((error) => { | 370 | .catch((error) => { |
| 371 | console.log(error); | 371 | console.log(error); |
| 372 | + setTimeout(() => { | ||
| 373 | + // console.log("jump"); | ||
| 374 | + window.location.replace("./failed.html"); | ||
| 375 | + }, 1000); | ||
| 372 | }) | 376 | }) |
| 373 | .finally(() => { | 377 | .finally(() => { |
| 374 | this.btnDisabled = false; | 378 | this.btnDisabled = false; |