Authored by shuaiguo

feat(product/detail): 展示配置视频 reviewed by 邱骏

... ... @@ -29,14 +29,18 @@ export default {
});
});
let [detail, resource, activity, recommend, vedioResource, limitInfo] = await Promise.all(queryTasks);
if(vedioResource) {
let [detail, resource, activity, recommend, videoResource, limitInfo] = await Promise.all(queryTasks);
if(videoResource) {
videoResource = {
src: videoResource.vedioImageUrl,
url: videoResource.vedioUrl
}
} else {
// 视频资源位
const videoResourceInfo = resource.find(r=> /(\.mp4)/.test(r.data[0].url));
const videoResource = get(videoResourceInfo, 'data[0]', {});
videoResource = get(videoResourceInfo, 'data[0]', {});
}
resource = get(resource, '[0].data[0]', {});
... ...