Browse Source

feat: 支持店铺按地图配色、不展示店铺名

master
jiannibang 3 years ago
parent
commit
7420ab5852
  1. 4
      package-lock.json
  2. 2
      package.json
  3. 2
      src/components/Floors/Floors.js
  4. 13
      src/components/ShopList/ShopList.js
  5. 1
      src/components/SideBar/SideBar.scss
  6. 8
      src/js/helpers/data-helper.js
  7. 2
      src/pages/Index/Index.js
  8. 2
      src/qmmap

4
package-lock.json

@ -1,11 +1,11 @@
{ {
"name": "iot-qmplaza",
"name": "syk11-ar-react",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "iot-qmplaza",
"name": "syk11-ar-react",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"antd-mobile": "^2.3.4", "antd-mobile": "^2.3.4",

2
package.json

@ -1,5 +1,5 @@
{ {
"name": "syk11-ar-react",
"name": "chengduskp-ar-react",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"homepage": "./", "homepage": "./",

2
src/components/Floors/Floors.js

@ -60,7 +60,7 @@ const Floors = ({
onClickFloor(index); onClickFloor(index);
}} }}
> >
{name}
{name === "景观层" ? "景观" : name}
</li> </li>
))} ))}
</ul> </ul>

13
src/components/ShopList/ShopList.js

@ -1,8 +1,6 @@
import React, { useState, useRef } from "react";
import React, { useRef } from "react";
import Shop from "../Shop/Shop"; import Shop from "../Shop/Shop";
import "./ShopList.scss"; import "./ShopList.scss";
import InfiniteScroll from "react-infinite-scroller";
const ShopList = ({ const ShopList = ({
mall, mall,
q, q,
@ -12,7 +10,6 @@ const ShopList = ({
format = null, format = null,
floorOrder = null, floorOrder = null,
}) => { }) => {
const [index, setIndex] = useState(0);
const shops = mall.shopInfo.reduce( const shops = mall.shopInfo.reduce(
(acc, { shopList }) => acc.concat(shopList), (acc, { shopList }) => acc.concat(shopList),
[] []
@ -55,13 +52,6 @@ const ShopList = ({
const listRef = useRef(null); const listRef = useRef(null);
return ( return (
<div className={"shop-list " + (isRow ? "is-row" : "")} ref={listRef}> <div className={"shop-list " + (isRow ? "is-row" : "")} ref={listRef}>
<InfiniteScroll
pageStart={0}
loadMore={() => setIndex(index + 1)}
hasMore={filteredShops && filteredShops.length > index * 10}
useWindow={false}
getScrollParent={() => listRef && listRef.current}
>
<div className="list"> <div className="list">
{filteredShops.map((shop, i) => ( {filteredShops.map((shop, i) => (
<Shop <Shop
@ -74,7 +64,6 @@ const ShopList = ({
))} ))}
</div> </div>
<div className="end">END</div> <div className="end">END</div>
</InfiniteScroll>
</div> </div>
); );
}; };

1
src/components/SideBar/SideBar.scss

@ -11,6 +11,7 @@
font-weight: 500; font-weight: 500;
font-size: 12px; font-size: 12px;
color: #474a56; color: #474a56;
text-align: center;
&.active { &.active {
background: #ffffff; background: #ffffff;
color: #437af7; color: #437af7;

8
src/js/helpers/data-helper.js

@ -2,7 +2,7 @@ import axios from "axios";
import icons from "./image-helper"; import icons from "./image-helper";
let mallInfos = new Map(); let mallInfos = new Map();
export const code = "project-dshd7pel_ogpcdect930ja";
export const code = "project-ey_fpaur6s6fkgvszywana";
export const baseUrl = "https://iot.1000my.com"; export const baseUrl = "https://iot.1000my.com";
export const post = async (url = "", data = {}) => { export const post = async (url = "", data = {}) => {
const response = await fetch(baseUrl + url, { const response = await fetch(baseUrl + url, {
@ -157,9 +157,9 @@ const getMallInfo = async ({ memberID }) => {
} }
})(), })(),
]); ]);
mall.name = "K11";
document.title = "沈阳K11";
mall.city = "沈阳";
mall.name = "SKP";
document.title = "成都SKP";
mall.city = "成都";
const mapData = JSON.parse(mapDataJSON)[0]; const mapData = JSON.parse(mapDataJSON)[0];
mall.activities = activities; mall.activities = activities;
mall.pois = pois; mall.pois = pois;

2
src/pages/Index/Index.js

@ -335,6 +335,8 @@ const Index = () => {
autoRotate: false, autoRotate: false,
customTitleFacilityTypeMap: { 116: true }, customTitleFacilityTypeMap: { 116: true },
wrapperWindowRatio: 0.7, wrapperWindowRatio: 0.7,
showShopLabel: false,
useFormatColor: false,
}, },
mall, mall,
onFocusShop: (data, stop) => { onFocusShop: (data, stop) => {

2
src/qmmap

@ -1 +1 @@
Subproject commit 8363ebe51f5de2e354f20f8ac1fb3e927dbcfa76
Subproject commit 5fe6b71e639f2874bd9da038e673f12068e237e8
Loading…
Cancel
Save