| | |
| | | import fileApi from '@/assets/js/middleGround/api/file' |
| | | export const getResourcePath = (md5,appRefCode = "jingshieke") => { |
| | | fileApi.getAliVod({ |
| | | md5,appRefCode |
| | | }).then(res => { |
| | | console.log('path',res); |
| | | if(res.data) { |
| | | return res.data |
| | | } else { |
| | | return process.env.VUE_APP_API_URL + '/file/api/ApiDownload?md5=' + md5 |
| | | } |
| | | }) |
| | | |
| | | } |
| | | import fileApi from "@/assets/js/middleGround/api/file"; |
| | | export const getResourcePath = async (md5, appRefCode = "jingshieke") => { |
| | | let path = ""; |
| | | await fileApi |
| | | .getAliVod({ |
| | | md5, |
| | | appRefCode, |
| | | }) |
| | | .then((res) => { |
| | | if (res?.data != "" && res?.data != undefined) { |
| | | path = res.data; |
| | | } else { |
| | | path = process.env.VUE_APP_API_URL + "/file/api/ApiDownload?md5=" + md5; |
| | | } |
| | | }); |
| | | return path; |
| | | }; |
| | | const MT = { |
| | | getResourcePath |
| | | } |
| | | getResourcePath, |
| | | }; |
| | | |
| | | export default MT |
| | | export default MT; |