From 851597ed8016696e89abc3b3699dc02f27acee31 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Mon, 3 Apr 2023 14:24:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=97=E9=93=BA=E5=88=B8=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/js/helpers/data-helper.js | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 604760d..6263af9 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build && coscmd config -a AKIDjS6at7fjTAVgggDNCrogRiZTSL304DPR -s FPPGCXr4xgZRLKDC8tZGp7HTZXlqx0gU -b lg-cjdqwkbo-1256266248 -r ap-shanghai && coscmd delete iot-qmplaza -f && coscmd upload -r build iot-qmplaza", + "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/src/js/helpers/data-helper.js b/src/js/helpers/data-helper.js index 274c6ac..c01bd8b 100644 --- a/src/js/helpers/data-helper.js +++ b/src/js/helpers/data-helper.js @@ -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,