From d3e4e808b234b91cd17b7aedfa6f72baa1722f25 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Wed, 8 Mar 2023 10:30:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20shopId=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=20?= =?UTF-8?q?shopCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/qm/MainMap_QM.js | 15 +++++++-------- src/components/BrandScroll/BrandScroll.vue | 4 ++-- .../PublicComponent/PublicComponent.vue | 4 ++-- src/http/api.js | 4 ++-- src/store/root/actions.js | 2 +- src/views/Nav/Nav.vue | 2 +- src/views/Nav/children/PassShop.vue | 2 +- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/public/static/qm/MainMap_QM.js b/public/static/qm/MainMap_QM.js index 884f696..918cdcf 100644 --- a/public/static/qm/MainMap_QM.js +++ b/public/static/qm/MainMap_QM.js @@ -3059,7 +3059,7 @@ MainMap_QM.prototype = { Map_QM.mapArr[Config.selectBuild][endIndex].allObj.position.y = Config.selectFloor > endIndex ? -1 * Config.doubleDist : Config.doubleDist } else if (endIndex === -1) { //一层 - Map_QM.mapArr[Config.selectBuild][Config.selectFloor].allObj.position.y=0; + Map_QM.mapArr[Config.selectBuild][Config.selectFloor].allObj.position.y = 0 } else { //三层 Map_QM.mapArr[Config.selectBuild][Config.selectFloor].allObj.position.y = 0 @@ -3071,7 +3071,7 @@ MainMap_QM.prototype = { Map_QM.mapArr[Config.selectBuild][maxF].allObj.position.y = Config.doubleDist } } else { - Map_QM.mapArr[Config.selectBuild][Config.selectFloor].allObj.position.y=0; + Map_QM.mapArr[Config.selectBuild][Config.selectFloor].allObj.position.y = 0 } Map_QM.timeOutInit() } @@ -3201,7 +3201,6 @@ MainMap_QM.prototype = { * @param {Object} 传入检测楼层下标 */ collisionChock: function () { - if (!Config.collision) { return } @@ -3262,7 +3261,7 @@ MainMap_QM.prototype = { obj.style.visibility = 'visible' let labP = obj.style.transform.split('translate')[2].split(', ') for (let j = 0; j < i; j++) { - if (childs[j].element.style.visibility == 'visible'){ + if (childs[j].element.style.visibility == 'visible') { let pb = childs[j].element.style.transform.split('translate')[2].split(', ') let isCol = Config.isCollision( new Config.Point(labP[0].substring(1, labP[0].length - 2), labP[1].substring(0, labP[1].length - 3)), @@ -3274,13 +3273,13 @@ MainMap_QM.prototype = { ) if (isCol) { obj.style.visibility = 'hidden' - break; + break } } } } } - + let iLen = IconChilds.length for (let ii = 0; ii < iLen; ii++) { let objIcon = IconChilds[ii].element @@ -3643,7 +3642,7 @@ MainMap_QM.prototype = { shopName: '经过 ' + item.wayShop[i].shop.shopName, shopNameEn: 'PASS ' + enTlite, logoUrl: item.wayShop[i].shop.logoUrl, - shopId: item.wayShop[i].shop.shopId + shopCode: item.wayShop[i].shop.shopCode }) } } @@ -3654,7 +3653,7 @@ MainMap_QM.prototype = { shopName: '乘坐 ' + item.Facilities.userData.title + '到 ' + Map_QM.mapArr[Config.selectBuild][parseInt(Map_QM.forShopArr[index + 1].floor)].floorName, shopNameEn: 'BY ' + item.Facilities.userData.title + 'TO ' + Map_QM.mapArr[Config.selectBuild][parseInt(Map_QM.forShopArr[index + 1].floor)].floorName, logoUrl: item.Facilities.imgUrl, - shopId: '' + shopCode: '' }) } }) diff --git a/src/components/BrandScroll/BrandScroll.vue b/src/components/BrandScroll/BrandScroll.vue index d45725b..6a49c91 100644 --- a/src/components/BrandScroll/BrandScroll.vue +++ b/src/components/BrandScroll/BrandScroll.vue @@ -15,8 +15,8 @@ @click="handleShop(el)" @nav="handleShopNav(el)" v-for="el of item.shopList" - :isActive="shop && shop.shopId === el.shopId" - :key="el.shopId" + :isActive="shop && shop.shopCode === el.shopCode" + :key="el.shopCode" /> diff --git a/src/components/PublicComponent/PublicComponent.vue b/src/components/PublicComponent/PublicComponent.vue index 121e087..e096203 100644 --- a/src/components/PublicComponent/PublicComponent.vue +++ b/src/components/PublicComponent/PublicComponent.vue @@ -17,7 +17,7 @@

{{ $t('hotSearch') }}

-
+
{{ item.shopName }}
@@ -61,7 +61,7 @@ const { isWall, title, countDownGif, countDownNum, countDownToWall, send, checkH const hotRecommend = computed(() => indexList.value?.hotSearch?.slice(0, 5) ?? []) const handleHot = item => { - const _ = shopList.value.find(_shop => _shop.shopId === item.shopId) + const _ = shopList.value.find(_shop => _shop.shopCode === item.shopCode) router.push('/guide') store.SET_SHOP(null) setTimeout(() => { diff --git a/src/http/api.js b/src/http/api.js index de2e432..a37b1dd 100644 --- a/src/http/api.js +++ b/src/http/api.js @@ -26,10 +26,10 @@ export const getServeList = () => get(`${url().sourceUrl}/JSON/getServeList.json export const getTrafficList = () => get(`${url().sourceUrl}/JSON/getMallTraffic.json`) //获取品牌喜欢数量 -export const getBrandLikesNumber = shopId => get(`${url().interfaceUrl}/guide/v1/web/getBrandStar?shopId=${shopId}`) +export const getBrandLikesNumber = shopCode => get(`${url().interfaceUrl}/guide/v1/web/getBrandStar?shopCode=${shopCode}`) //设置品牌喜欢数量 -export const setBrandLikesNumber = shopId => get(`${url().interfaceUrl}/guide/v1/web/setBrandStar?shopId=${shopId}`) +export const setBrandLikesNumber = shopCode => get(`${url().interfaceUrl}/guide/v1/web/setBrandStar?shopCode=${shopCode}`) //获取 影院信息 export const getCinemaInfo = () => get(`${url().sourceUrl}/JSON/getCinemaInfo.json`) diff --git a/src/store/root/actions.js b/src/store/root/actions.js index 5bb61d7..d807df0 100644 --- a/src/store/root/actions.js +++ b/src/store/root/actions.js @@ -26,7 +26,7 @@ export const actions = { }, SET_SHOP(shop) { this.shop = shop - if (shop) useStatistics('shop', { shopId: shop.shopId }) + if (shop) useStatistics('shop', { shopCode: shop.shopCode }) }, SET_CURRENT_FLOOR(currentFloor) { this.currentFloor = currentFloor diff --git a/src/views/Nav/Nav.vue b/src/views/Nav/Nav.vue index 760b254..61c5bd9 100644 --- a/src/views/Nav/Nav.vue +++ b/src/views/Nav/Nav.vue @@ -42,7 +42,7 @@ const { setPause } = useMapNavControl() const { directionInfo, pathShopList, backPathArray } = useStartNavi(shop, currentFloor, setPause) const { methodIdx, handleControl } = useChangeNavMethod(backPathArray) -useStatistics('navigation', { shopId: shop.value.shopId }) +useStatistics('navigation', { shopCode: shop.value.shopCode })