Browse Source

feat: shopId 替换为 shopCode

dev
jiannibang 3 years ago
parent
commit
d3e4e808b2
  1. 13
      public/static/qm/MainMap_QM.js
  2. 4
      src/components/BrandScroll/BrandScroll.vue
  3. 4
      src/components/PublicComponent/PublicComponent.vue
  4. 4
      src/http/api.js
  5. 2
      src/store/root/actions.js
  6. 2
      src/views/Nav/Nav.vue
  7. 2
      src/views/Nav/children/PassShop.vue

13
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 Map_QM.mapArr[Config.selectBuild][endIndex].allObj.position.y = Config.selectFloor > endIndex ? -1 * Config.doubleDist : Config.doubleDist
} else if (endIndex === -1) { } 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 { } else {
//三层 //三层
Map_QM.mapArr[Config.selectBuild][Config.selectFloor].allObj.position.y = 0 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 Map_QM.mapArr[Config.selectBuild][maxF].allObj.position.y = Config.doubleDist
} }
} else { } 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() Map_QM.timeOutInit()
} }
@ -3201,7 +3201,6 @@ MainMap_QM.prototype = {
* @param {Object} 传入检测楼层下标 * @param {Object} 传入检测楼层下标
*/ */
collisionChock: function () { collisionChock: function () {
if (!Config.collision) { if (!Config.collision) {
return return
} }
@ -3262,7 +3261,7 @@ MainMap_QM.prototype = {
obj.style.visibility = 'visible' obj.style.visibility = 'visible'
let labP = obj.style.transform.split('translate')[2].split(', ') let labP = obj.style.transform.split('translate')[2].split(', ')
for (let j = 0; j < i; j++) { 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 pb = childs[j].element.style.transform.split('translate')[2].split(', ')
let isCol = Config.isCollision( let isCol = Config.isCollision(
new Config.Point(labP[0].substring(1, labP[0].length - 2), labP[1].substring(0, labP[1].length - 3)), new Config.Point(labP[0].substring(1, labP[0].length - 2), labP[1].substring(0, labP[1].length - 3)),
@ -3274,7 +3273,7 @@ MainMap_QM.prototype = {
) )
if (isCol) { if (isCol) {
obj.style.visibility = 'hidden' obj.style.visibility = 'hidden'
break;
break
} }
} }
} }
@ -3643,7 +3642,7 @@ MainMap_QM.prototype = {
shopName: '经过 ' + item.wayShop[i].shop.shopName, shopName: '经过 ' + item.wayShop[i].shop.shopName,
shopNameEn: 'PASS ' + enTlite, shopNameEn: 'PASS ' + enTlite,
logoUrl: item.wayShop[i].shop.logoUrl, 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, 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, shopNameEn: 'BY ' + item.Facilities.userData.title + 'TO ' + Map_QM.mapArr[Config.selectBuild][parseInt(Map_QM.forShopArr[index + 1].floor)].floorName,
logoUrl: item.Facilities.imgUrl, logoUrl: item.Facilities.imgUrl,
shopId: ''
shopCode: ''
}) })
} }
}) })

4
src/components/BrandScroll/BrandScroll.vue

@ -15,8 +15,8 @@
@click="handleShop(el)" @click="handleShop(el)"
@nav="handleShopNav(el)" @nav="handleShopNav(el)"
v-for="el of item.shopList" v-for="el of item.shopList"
:isActive="shop && shop.shopId === el.shopId"
:key="el.shopId"
:isActive="shop && shop.shopCode === el.shopCode"
:key="el.shopCode"
/> />
</div> </div>
</div> </div>

4
src/components/PublicComponent/PublicComponent.vue

@ -17,7 +17,7 @@
<h1 class="title">{{ $t('hotSearch') }}</h1> <h1 class="title">{{ $t('hotSearch') }}</h1>
<ScrollView class="row" :list="hotRecommend" scroll-x> <ScrollView class="row" :list="hotRecommend" scroll-x>
<div style="display: inline-block; white-space: nowrap"> <div style="display: inline-block; white-space: nowrap">
<div class="item" v-for="item of hotRecommend" :key="item.shopId" @click="handleHot(item)">
<div class="item" v-for="item of hotRecommend" :key="item.shopCode" @click="handleHot(item)">
<div class="text">{{ item.shopName }}</div> <div class="text">{{ item.shopName }}</div>
</div> </div>
</div> </div>
@ -61,7 +61,7 @@ const { isWall, title, countDownGif, countDownNum, countDownToWall, send, checkH
const hotRecommend = computed(() => indexList.value?.hotSearch?.slice(0, 5) ?? []) const hotRecommend = computed(() => indexList.value?.hotSearch?.slice(0, 5) ?? [])
const handleHot = item => { const handleHot = item => {
const _ = shopList.value.find(_shop => _shop.shopId === item.shopId)
const _ = shopList.value.find(_shop => _shop.shopCode === item.shopCode)
router.push('/guide') router.push('/guide')
store.SET_SHOP(null) store.SET_SHOP(null)
setTimeout(() => { setTimeout(() => {

4
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 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`) export const getCinemaInfo = () => get(`${url().sourceUrl}/JSON/getCinemaInfo.json`)

2
src/store/root/actions.js

@ -26,7 +26,7 @@ export const actions = {
}, },
SET_SHOP(shop) { SET_SHOP(shop) {
this.shop = shop this.shop = shop
if (shop) useStatistics('shop', { shopId: shop.shopId })
if (shop) useStatistics('shop', { shopCode: shop.shopCode })
}, },
SET_CURRENT_FLOOR(currentFloor) { SET_CURRENT_FLOOR(currentFloor) {
this.currentFloor = currentFloor this.currentFloor = currentFloor

2
src/views/Nav/Nav.vue

@ -42,7 +42,7 @@ const { setPause } = useMapNavControl()
const { directionInfo, pathShopList, backPathArray } = useStartNavi(shop, currentFloor, setPause) const { directionInfo, pathShopList, backPathArray } = useStartNavi(shop, currentFloor, setPause)
const { methodIdx, handleControl } = useChangeNavMethod(backPathArray) const { methodIdx, handleControl } = useChangeNavMethod(backPathArray)
useStatistics('navigation', { shopId: shop.value.shopId })
useStatistics('navigation', { shopCode: shop.value.shopCode })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

2
src/views/Nav/children/PassShop.vue

@ -51,7 +51,7 @@
<p class="pass">您在{{ currentFloor.floor }}{{ direction.text }}</p> <p class="pass">您在{{ currentFloor.floor }}{{ direction.text }}</p>
</div> </div>
<div class="pass-item" v-for="item of list" :key="item.shopId">
<div class="pass-item" v-for="item of list" :key="item.shopCode">
<p class="pass">{{ switchLanguage(item, 'shopName') }}</p> <p class="pass">{{ switchLanguage(item, 'shopName') }}</p>
</div> </div>

Loading…
Cancel
Save