|
|
|
@ -1,8 +1,12 @@ |
|
|
|
import axios from "axios"; |
|
|
|
import icons from "./image-helper"; |
|
|
|
let mallInfos = new Map(); |
|
|
|
export const code = "project-k5chc3vt0vkodjbmhl8rua"; |
|
|
|
export const baseUrl = "https://iot-dev.123.1000my.com"; |
|
|
|
// dev
|
|
|
|
// export const code = "project-k5chc3vt0vkodjbmhl8rua";
|
|
|
|
// export const baseUrl = "https://iot-dev.123.1000my.com";
|
|
|
|
// test
|
|
|
|
export const code = "project-skcn0gk6yb2xutkcsmjtra"; |
|
|
|
export const baseUrl = "https://project-iot.test.1000my.com"; |
|
|
|
export const post = async (url = "", data = {}) => { |
|
|
|
const response = await fetch(baseUrl + url, { |
|
|
|
method: "POST", |
|
|
|
@ -47,11 +51,16 @@ const getMallInfo = async ({ memberID }) => { |
|
|
|
console.error(error); |
|
|
|
} |
|
|
|
|
|
|
|
// const config = {
|
|
|
|
// mapDataUrl: `${cdnUrl}/ar/${code}/Aeditor/Aeditor.json?t=${new Date().getTime()}`,
|
|
|
|
// shopInfoUrl: `${cdnUrl}/ar/${code}/QueryShopListForMap/QueryShopListForMap.json?t=${new Date().getTime()}`,
|
|
|
|
// };
|
|
|
|
|
|
|
|
// try {
|
|
|
|
// const {
|
|
|
|
// data: { mapUrl, shopUrl },
|
|
|
|
// } = await axios.get(
|
|
|
|
// `${cdnUrl}/test-projects/${code}/config.json?t=${new Date().getTime()}`
|
|
|
|
// `${cdnUrl}/ar/${code}/config.json?t=${new Date().getTime()}`
|
|
|
|
// );
|
|
|
|
// if (mapUrl) config.mapDataUrl = mapUrl;
|
|
|
|
// if (shopUrl) config.shopInfoUrl = shopUrl;
|
|
|
|
@ -194,6 +203,7 @@ const getMallInfo = async ({ memberID }) => { |
|
|
|
.filter(({ buildingOrder }) => buildingOrder === 0) |
|
|
|
.map((iot) => ({ |
|
|
|
...iot, |
|
|
|
code: iot.shopCode, |
|
|
|
name: iot.shopName, |
|
|
|
houseNum: iot.houseNumber, |
|
|
|
nameEn: iot.shopNameEn, |
|
|
|
|