visitor.js 901 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import request from '@/utils/request'
  2. import baseUrl from '@/utils/baseurl.js'
  3. export function assetList() {
  4. return request.get('/visitor/asset/list')
  5. }
  6. export function assetDetail(barCode) {
  7. return request.get(`/visitor/asset/detail/${barCode}`)
  8. }
  9. export function studyList(x,y){
  10. return request.get('/visitor/study/list',{
  11. pageNum:x,
  12. pageSize:y
  13. }).then(res=>res)
  14. }
  15. export function studyNew(number) {
  16. return request.get(`/visitor/study/new?number=${number}`)
  17. }
  18. export function studyDetail(studyId) {
  19. return request.get(`/visitor/study/detail/${studyId}`)
  20. }
  21. export function getImage(src) {
  22. if (!src) {
  23. return;
  24. }
  25. let real_src = src.split(",")[0]
  26. return baseUrl + real_src;
  27. }
  28. export function playerVideo(url) {
  29. return `${baseUrl}/asset/demoVideo/player?name=${url}`
  30. }
  31. export function demoVideo(x, y) {
  32. return request.get('/visitor/demo/video', {
  33. pageNum:x,
  34. pageSize:y
  35. })
  36. }