资源类型
通过引入 @/common/service/resources 文件调用接口
目前总共六种资源类型需要通过服务端接口返回:
| type | name | 是否需要区分模块 |
|---|---|---|
| INPUT | 输入端口 | 不需要,默认为0 |
| OUTPUT | 输出端口 | 不需要,默认为0 |
| SOUND_YX | 音效-音效 | 需要 |
| SOUND_BJ | 音效-背景 | 需要 |
| MEDIA_SP | MP4-视频 | 需要 |
| MEDIA_TP | MP4-图片 | 需要 |
获取资源接口
import resources from "@/common/service/resources";resources.fetch(theme_id, // 主题idtype, // 资源类型module // 模块,如果不需要模块的资源可以不传入。).then(res=>{// 返回的数据结构res = [ { value:1,label:"模块1" } ,{ value:2,label:"模块2" } ]})
更新资源的label
import resources from "@/common/service/resources";resources.updateName(theme_id, // 主题idtype, // 资源类型value, // 值 1~500label, // 需要修改的名字module // 模块,如果不需要模块的资源就传入 0).then(res=>{})
