Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
shuaiguo
5 years ago
Commit
0ee4f6e2f46f5a821dca892306647a56a30ff64a
1 parent
6e886c26
feat(product-detail): 商品详情展示配置视频 reviewed by 张文文
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
apps/store/product/actions.js
config/product-api-map.js
apps/store/product/actions.js
View file @
0ee4f6e
...
...
@@ -8,7 +8,7 @@ export default {
return
state
.
products
[
productId
];
},
async
fetchProductInfo
({
commit
,
state
,
rootGetters
},
{
productId
})
{
const
queryUrls
=
[
''
,
'/resource'
,
'/activity'
,
'/recommend'
]
const
queryUrls
=
[
''
,
'/resource'
,
'/activity'
,
'/recommend'
,
'/vedioImage'
]
if
(
rootGetters
.
getLogin
)
{
queryUrls
.
push
(
'/limit/info'
)
}
...
...
@@ -29,8 +29,11 @@ export default {
});
});
let
[
detail
,
resource
,
activity
,
recommend
,
limitInfo
]
=
await
Promise
.
all
(
queryTasks
);
let
[
detail
,
resource
,
activity
,
recommend
,
vedioResource
,
limitInfo
]
=
await
Promise
.
all
(
queryTasks
);
if
(
vedioResource
)
{
}
// 视频资源位
const
videoResourceInfo
=
resource
.
find
(
r
=>
/
(\.
mp4
)
/
.
test
(
r
.
data
[
0
].
url
));
const
videoResource
=
get
(
videoResourceInfo
,
'data[0]'
,
{});
...
...
@@ -224,5 +227,5 @@ export default {
});
return
result
;
}
}
,
};
...
...
config/product-api-map.js
View file @
0ee4f6e
...
...
@@ -166,5 +166,15 @@ module.exports = {
product_id
:
{
type
:
Number
},
brand_id
:
{
type
:
Number
}
}
},
// 获取sku配置的视频连接
'/api/ufo/product/vedioImage'
:
{
ufo
:
true
,
auth
:
false
,
api
:
'ufo.product.vedioImage'
,
params
:
{
product_id
:
{
type
:
Number
},
}
}
};
...
...
Please
register
or
login
to post a comment