Browse Source

feat: 展示二维码时显示店铺名称

v1.0.1
jiannibang 3 years ago
parent
commit
78af9620da
  1. 18
      src/base/ShopItem/ShopItem.vue
  2. 5
      src/composables/useInitMap.js
  3. 1
      src/views/Guide/Guide.vue

18
src/base/ShopItem/ShopItem.vue

@ -15,7 +15,10 @@
:size="120"
:text="`${config.mobileNav}?code=${currentFloor.projectCode}&s=${currentFloor.floorOrder}_${currentFloor.location}_屏幕的位置&e=${shop.houseNumber}`"
></QRCodeFromText>
<div class="qrcode-meta">扫码导航</div>
<p class="name">
<span class="shop-name">{{ switchLanguage(shop, 'shopName') }}</span>
<span class="qrcode-tag">扫码导航</span>
</p>
</div>
</Transition>
<Teleport to="body">
@ -111,6 +114,19 @@ const deactivate = () => store.SET_SHOP(null)
line-height: 14px;
color: var(--brand-metaColor, rgba(0, 0, 0, 0.4));
}
.qrcode-tag {
display: flex;
align-items: center;
font-weight: 700;
font-size: 14px;
line-height: 16px;
width: 76px;
height: 28px;
background: #ffffff;
border-radius: 23px;
color: rgba(0, 0, 0, 0.8);
justify-content: center;
}
.dir {
width: 20px;
height: 20px;

5
src/composables/useInitMap.js

@ -33,9 +33,6 @@ const bounceShopAndChangeColor = data => {
if (lastShop) window.Map_QM.changeMapIPState(lastShop.houseNumber, lastShop.formatColor)
lastShop = data
if (!data) return
const xaxis = JSON.parse(data.xaxis).map(Number)
showMapDialog()
window.Map_QM.addElementLabel(document.getElementById('shopInfo'), xaxis[0], xaxis[2])
window.Map_QM.changeMapIPState(data.houseNumber, '#516DD8')
}
@ -45,12 +42,12 @@ export const setShopActive = shop => {
}
export const setShopInactive = () => {
hideMapDialog()
bounceShopAndChangeColor(null)
}
//点击地图店铺box
function onClickShop(event) {
console.log(event)
const store = useStore()
store.SET_FACILITY(null)
if (!event.data) {

1
src/views/Guide/Guide.vue

@ -171,6 +171,7 @@ watch(shop, nxt => {
if (!nxt) {
setShopInactive()
} else if (nxt && initiated.value) {
setShopActive(nxt)
window.Map_QM.pathNode({ floor: nxt.floorOrder, node: nxt.yaxis })
}
})

Loading…
Cancel
Save