import { http } from "@/utils/request";
import config from "@/utils/config";

const number = function () {
  return config.projectNum;
};

const scene = function () {
  return config.sceneNum;
};

const HDNumber = function () {
  return config.hengdaNum;
};

let ossUrl = config.CDN;
let fdkkURL = config.fdkkURL;


const URL_FILL =  config.urlFill
/**
 * 获取全景作品基本信息
 * @param {*} data
 * @param {*} ok
 * @param {*} no
 */
export function getPanoInfo(ok, no) {
  return http.get(`${ossUrl}/720yun_fd_manage/${number()}/someData.json?_=${Math.random()}`, {}, ok, no);
}

/**
 * 获取四维看看场景基本信息
 * @param {*} data
 * @param {*} ok
 * @param {*} no
 */
 export function getFdkkInfo(data, ok, no) {
  return http.get(`${fdkkURL}api/scene/getInfo?num=${data.num}&_=${Math.random()}`, {}, ok, no);
}

/**
 * 检查作品是否可用
 * @param {*} data
 * @param {*} ok
 * @param {*} no
 */
export function checkWork(ok, no) {
  return http.get(`${URL_FILL}/web/common/checkWork/${number()}?visit=1111`, {}, ok, no);
}
