|
@@ -6,15 +6,15 @@ import {
|
|
|
Frame,
|
|
|
get2dComponentJs,
|
|
|
getTemPngs,
|
|
|
- getDeployPngs,
|
|
|
+ // getDeployPngs,
|
|
|
img_cdn,
|
|
|
img_upCdn,
|
|
|
getFrameDownloadList,
|
|
|
getComponentPurchased,
|
|
|
getGoods,
|
|
|
- getDeployAccess,
|
|
|
+ // getDeployAccess,
|
|
|
} from './download';
|
|
|
-import { isDownload, rootDomain } from './defaults';
|
|
|
+import { rootDomain } from './defaults';
|
|
|
import { newFile, queryURLParams } from './common';
|
|
|
import axios from 'axios';
|
|
|
import { MessagePlugin } from 'tdesign-vue-next';
|
|
@@ -156,6 +156,7 @@ export const payProjectDialog = reactive({
|
|
|
token: '',
|
|
|
});
|
|
|
|
|
|
+/*
|
|
|
const prePayProject = async () => {
|
|
|
if (user.vipData?.deployment) {
|
|
|
//可视化会员
|
|
@@ -304,7 +305,7 @@ const prePayProject = async () => {
|
|
|
} else {
|
|
|
payProjectDialog.visible = true;
|
|
|
}
|
|
|
-};
|
|
|
+};*/
|
|
|
|
|
|
const data = reactive({
|
|
|
id: undefined,
|
|
@@ -754,20 +755,20 @@ const getEnterprisePens = async () => {
|
|
|
|
|
|
// 下载工程
|
|
|
export const downloadProject = async (type: Frame) => {
|
|
|
- if (!isVip()) {
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (!isVip()) {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
downloadType = type;
|
|
|
//通过工程获取所有的页面数据 ,包括2d 3d v
|
|
|
await getDatas();
|
|
|
- if (isDownload) {
|
|
|
+ // if (isDownload) {
|
|
|
//安装包
|
|
|
- doDownloadProject();
|
|
|
- return;
|
|
|
- }
|
|
|
+ await doDownloadProject();
|
|
|
+ return;
|
|
|
+ // }
|
|
|
//获取 2d 大屏企业图形库
|
|
|
- await getEnterprisePens();
|
|
|
- await prePayProject();
|
|
|
+ // await getEnterprisePens();
|
|
|
+ // await prePayProject();
|
|
|
};
|
|
|
|
|
|
export const doDownloadProject = async () => {
|
|
@@ -883,12 +884,14 @@ const saveDownload = async (downloadList) => {
|
|
|
jsPensPath = `/meta2d-react/public/js/1.js`;
|
|
|
break;
|
|
|
}
|
|
|
- if (isDownload) {
|
|
|
+
|
|
|
+ // if (isDownload) {
|
|
|
// 安装包
|
|
|
list.push({
|
|
|
url: '/view/js/2d-components.js', //需要购买
|
|
|
path: jsPath,
|
|
|
});
|
|
|
+ /*
|
|
|
} else {
|
|
|
const js = await get2dComponentJs([...prePayList.iotPens]);
|
|
|
list.push({
|
|
@@ -1027,7 +1030,7 @@ const saveDownload = async (downloadList) => {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
//开始下载list
|
|
|
let result = await saveZip(list);
|
|
|
if (result === 'error') {
|
|
@@ -1123,17 +1126,17 @@ const treeToList = (tree) => {
|
|
|
|
|
|
//下载zip资源
|
|
|
export const downloadProjectSource = async () => {
|
|
|
- if (!isVip()) {
|
|
|
- return; //非vip用户不能下载
|
|
|
- }
|
|
|
+ // if (!isVip()) {
|
|
|
+ // return; //非vip用户不能下载
|
|
|
+ // }
|
|
|
await getDatas(false);
|
|
|
- if (isDownload) {
|
|
|
+ // if (isDownload) {
|
|
|
//安装包
|
|
|
- doDownloadProjectSource();
|
|
|
- return;
|
|
|
- }
|
|
|
- await getEnterprisePens(); //获取企业图库
|
|
|
- await prePay();
|
|
|
+ await doDownloadProjectSource();
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // await getEnterprisePens(); //获取企业图库
|
|
|
+ // await prePay();
|
|
|
};
|
|
|
|
|
|
export const doDownloadProjectSource = async () => {
|
|
@@ -1167,7 +1170,7 @@ export const doDownloadProjectSource = async () => {
|
|
|
imgList = uniqueObjArrayFast(imgList, 'path');
|
|
|
|
|
|
//获取去水印企业图库
|
|
|
- if (imgList.length && !isDownload) {
|
|
|
+ /*if (imgList.length && !isDownload) {
|
|
|
let pngs: any = {};
|
|
|
if (payDialog.token) {
|
|
|
pngs = await getDeployPngs(
|
|
@@ -1187,7 +1190,7 @@ export const doDownloadProjectSource = async () => {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
dList.push(...imgList);
|
|
|
for (let key in pageDatas) {
|
|
@@ -1437,9 +1440,9 @@ const deepUpdateID = (treeData, _2dIDMap) => {
|
|
|
|
|
|
const update2dData = async (_data, _2dIDMap, _3dIDMap) => {
|
|
|
let domain = 'https://view.le5le.com';
|
|
|
- if (isDownload || location.origin.indexOf('le5le.com') === -1) {
|
|
|
+ // if (isDownload || location.origin.indexOf('le5le.com') === -1) {
|
|
|
domain = location.origin + '/view';
|
|
|
- }
|
|
|
+ // }
|
|
|
let data = JSON.parse(_data);
|
|
|
if (data.pens?.length) {
|
|
|
// 内嵌iframe网页
|