|
@@ -3,6 +3,9 @@ import {
|
|
checkData,
|
|
checkData,
|
|
} from '@/services/utils';
|
|
} from '@/services/utils';
|
|
|
|
|
|
|
|
+export const img_cdn = 'https://assets.le5lecdn.com';
|
|
|
|
+export const img_upCdn = 'https://drive.le5lecdn.com';
|
|
|
|
+
|
|
export const getDownloadList = (meta2dData:any, path:string='v') => {
|
|
export const getDownloadList = (meta2dData:any, path:string='v') => {
|
|
const lists = new Set();
|
|
const lists = new Set();
|
|
//TODO 加一个type区分是数据/还是接口
|
|
//TODO 加一个type区分是数据/还是接口
|
|
@@ -10,8 +13,8 @@ export const getDownloadList = (meta2dData:any, path:string='v') => {
|
|
// const meta2dData = meta2d.data();
|
|
// const meta2dData = meta2d.data();
|
|
let img = meta2dData.bkImage;
|
|
let img = meta2dData.bkImage;
|
|
if (img) {
|
|
if (img) {
|
|
- if (img.startsWith('/') || img.startsWith(cdn) || img.startsWith(upCdn)) {
|
|
|
|
- let _img = img.replace(cdn, '').replace(upCdn, '');
|
|
|
|
|
|
+ if (img.startsWith('/') || img.startsWith(img_cdn) || img.startsWith(img_upCdn)) {
|
|
|
|
+ let _img = img.replace(img_cdn, '').replace(img_upCdn, '');
|
|
if(_img.startsWith('/v/')){
|
|
if(_img.startsWith('/v/')){
|
|
_img = _img.slice(2);
|
|
_img = _img.slice(2);
|
|
}
|
|
}
|
|
@@ -31,11 +34,11 @@ export const getDownloadList = (meta2dData:any, path:string='v') => {
|
|
if (image) {
|
|
if (image) {
|
|
if (
|
|
if (
|
|
image.startsWith('/') ||
|
|
image.startsWith('/') ||
|
|
- image.startsWith(cdn) ||
|
|
|
|
- image.startsWith(upCdn)
|
|
|
|
|
|
+ image.startsWith(img_cdn) ||
|
|
|
|
+ image.startsWith(img_upCdn)
|
|
) {
|
|
) {
|
|
// 只考虑相对路径下的 image ,绝对路径图片无需下载
|
|
// 只考虑相对路径下的 image ,绝对路径图片无需下载
|
|
- let _img = image.replace(cdn, '').replace(upCdn, '');
|
|
|
|
|
|
+ let _img = image.replace(img_cdn, '').replace(img_upCdn, '');
|
|
if(_img.startsWith('/v/')){
|
|
if(_img.startsWith('/v/')){
|
|
_img = _img.slice(2);
|
|
_img = _img.slice(2);
|
|
}
|
|
}
|
|
@@ -54,7 +57,7 @@ export const getDownloadList = (meta2dData:any, path:string='v') => {
|
|
|
|
|
|
//其他文件
|
|
//其他文件
|
|
const files = [
|
|
const files = [
|
|
- // '/view/assets/index.js',
|
|
|
|
|
|
+ '/view/assets/index.js',
|
|
'/view/assets/index.css',
|
|
'/view/assets/index.css',
|
|
'/view/css/index.css',
|
|
'/view/css/index.css',
|
|
|
|
|
|
@@ -64,7 +67,7 @@ export const getDownloadList = (meta2dData:any, path:string='v') => {
|
|
'/view/js/lcjs.iife.js',
|
|
'/view/js/lcjs.iife.js',
|
|
'/view/js/highcharts.js',
|
|
'/view/js/highcharts.js',
|
|
'/view/js/highcharts-more.js',
|
|
'/view/js/highcharts-more.js',
|
|
- '/view/js/2d-components.js',
|
|
|
|
|
|
+ // '/view/js/2d-components.js',
|
|
|
|
|
|
'/view/index.html',
|
|
'/view/index.html',
|
|
'/view/favicon.ico',
|
|
'/view/favicon.ico',
|
|
@@ -85,7 +88,7 @@ export const getDownloadList = (meta2dData:any, path:string='v') => {
|
|
if ((meta2dData as any).image) delete (meta2dData as any).image;
|
|
if ((meta2dData as any).image) delete (meta2dData as any).image;
|
|
checkData(meta2dData);
|
|
checkData(meta2dData);
|
|
lists.add({
|
|
lists.add({
|
|
- data:JSON.stringify(meta2dData).replaceAll(cdn, '').replaceAll(upCdn, ''),
|
|
|
|
|
|
+ data:JSON.stringify(meta2dData).replaceAll(img_cdn, '').replaceAll(img_upCdn, ''),
|
|
path:`/view/projects/${path}/data`,
|
|
path:`/view/projects/${path}/data`,
|
|
});
|
|
});
|
|
|
|
|