|
@@ -135,10 +135,14 @@ const audioMixin = {
|
|
methods: {
|
|
methods: {
|
|
// 通过平台获取对应的音频类型
|
|
// 通过平台获取对应的音频类型
|
|
getAudioType(e) {
|
|
getAudioType(e) {
|
|
- platform(e).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
- this.audioTypeOptions = res.data[0].audioType.split(',').map(i => this.audioOptions.find(j => j.value == i))
|
|
|
|
- }
|
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
+ platform(e).then(res => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ resolve(this.audioTypeOptions = res.data[0].audioType.split(',').map(i => this.audioOptions.find(j => j.value == i)))
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ reject()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|