|
@@ -254,16 +254,17 @@ const platformMixin = {
|
|
|
methods: {
|
|
|
// 通过音频类型获取对应的平台
|
|
|
getPlatform(e) {
|
|
|
- this.platformOptions = []
|
|
|
- audioType(e).then(res => {
|
|
|
- if (res.code === 0) {
|
|
|
- res.data.map(i => {
|
|
|
- this.platformOptions.push({
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ audioType(e).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ resolve(this.platformOptions = [], res.data.map(i => this.platformOptions.push({
|
|
|
value: Number(i.id),
|
|
|
label: i.name
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
+ })))
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ reject()
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
}
|