|
@@ -13,6 +13,37 @@ const HDNumber = function () {
|
|
return config.hengdaNum;
|
|
return config.hengdaNum;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+function changeSubStr(targetStr, subStr1, subStr2) {
|
|
|
|
+ return targetStr.replace(subStr1, subStr2)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function deepProcess(obj, detailWork, ...otherP) {
|
|
|
|
+ if(obj === null || obj === undefined) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (Array.isArray(obj)) {
|
|
|
|
+ for (let index = 0; index < obj.length; index++) {
|
|
|
|
+ const element = obj[index];
|
|
|
|
+ if (typeof element === 'string') {
|
|
|
|
+ obj[index] = detailWork(element, ...otherP)
|
|
|
|
+ } else if (typeof element === 'object') {
|
|
|
|
+ deepProcess(element, detailWork, ...otherP)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (typeof obj === 'object') {
|
|
|
|
+ for (const key in obj) {
|
|
|
|
+ if (Object.hasOwnProperty.call(obj, key)) {
|
|
|
|
+ if (typeof obj[key] === 'string') {
|
|
|
|
+ obj[key] = detailWork(obj[key], ...otherP)
|
|
|
|
+ } else if (typeof obj[key] === 'object') {
|
|
|
|
+ deepProcess(obj[key], detailWork, ...otherP)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取全景作品基本信息
|
|
* 获取全景作品基本信息
|
|
* @param {*} data
|
|
* @param {*} data
|
|
@@ -20,7 +51,13 @@ const HDNumber = function () {
|
|
* @param {*} no
|
|
* @param {*} no
|
|
*/
|
|
*/
|
|
export function getPanoInfo(ok, no) {
|
|
export function getPanoInfo(ok, no) {
|
|
- return http.get(`${process.env.VUE_APP_CDN}/720yun_fd_manage/${number()}/someData.json?_=${Math.random()}`, {}, ok, no);
|
|
|
|
|
|
+ return http.get(`${process.env.VUE_APP_CDN}/720yun_fd_manage/${number()}/someData.json?_=${Math.random()}`, {}, ok, no).then((res) => {
|
|
|
|
+ if (process.env.VUE_APP_CLI_MODE === 'local') {
|
|
|
|
+ deepProcess(res, changeSubStr, 'https://4dkk.4dage.com/720yun_fd_manage/', '/720yun_fd_manage/')
|
|
|
|
+ deepProcess(res, changeSubStr, 'https://4dscene.4dage.com/culturalrelics/JSYSBW/Model.html?m=', '/JSYSBWModel/Model2.html?m=')
|
|
|
|
+ }
|
|
|
|
+ return res
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|