28 changed files with 430 additions and 214 deletions
@ -1,16 +1 @@ |
|||
{ |
|||
"code": 200, |
|||
"msg": "操作成功", |
|||
"data": [ |
|||
{ |
|||
"id": 80, |
|||
"title": "默认配置", |
|||
"content": { |
|||
"interfaceUrl": "https://project-iot.test.1000my.com/api", |
|||
"handWriteUrl": "http://saas.1000my.com:8014/words", |
|||
"mobileNav": "https://qianmu-iot.1000my.com/base_qmgo_react-test/index.html#/", |
|||
"clickUploadUrl": "/analysis/v1/web/deviceUseClickDataUpload" |
|||
} |
|||
} |
|||
] |
|||
} |
|||
{"code":200,"msg":"操作成功","data":[{"id":115,"entryCode":"d3c94406-310b-11ee-8890-d68ef55ef3ac","title":"默认配置","content":{"interfaceUrl":"https://project-iot.test.1000my.com/api","handWriteUrl":"http://saas.1000my.com:8014/words","mobileNav":"https://qianmu-iot.1000my.com/base_qmgo_react-test/index.html#/","clickUploadUrl":"/analysis/v1/web/deviceUseClickDataUpload","debug":"debug"}}]} |
|||
@ -1 +1 @@ |
|||
{"code":200,"msg":"操作成功","data":[40,10]} |
|||
{"code":200,"msg":"操作成功","data":[20,20]} |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
{"code":200,"msg":"操作成功","data":{"shopCode":"xW9QI6-094omWrnD0d9Nq","shopName":"视觉VR","shopNameEn":"","alias":"","logoUrl":"/iotFile/2022/06/21/73ebef539b65446eb1eac5ddfcf1aa14.jpg","houseNumber":"Y112","intro":"tico teco VR 作为温州视觉商贸有限公司的快时尚品牌,主营位于各大商业中心的全国连锁性的VR(虚拟现实)体验门店, 以VR+泛娱乐体验为主体,融入AR、MR、主机游戏、裸眼3D、智能机器人、电竞等新型的科技元素,让全年龄段客户都能获得热门、新鲜的科技体验 \r\n","introEn":"","materialList":["/iotFile/2022/06/21/81c8e216dbc442fe9f213ef406f91e9d.png"]}} |
|||
{"code":200,"msg":"操作成功","data":{"industryName":"影院超市","industryNameEn":"","industryFatherName":"休闲娱乐","industryFatherNameEn":"","shopCode":"_fp63UgYnqvU5p9CXhZyx","shopName":"奥斯卡国际影城","shopNameEn":"","alias":"","logoUrl":"/iotFile/project-zert3dski8fqmgr4zhusea/20230620/pEwa2kGCL2cHA6f57sayz.jpg","industryFatherUrl":"/iotFile/project-zert3dski8fqmgr4zhusea/20230714/V7vNxOmKc21EVpnN-LzXE.png","industryUrl":"","building":"A栋","floor":"4F","houseNumber":"F412","intro":"奥斯卡金地影城位于金地广场四、五层,2015年2月11日开始营业。影城占地面积4800平米,拥有8个国际化标准数字放映厅,1455个坐席,影城采用国际先进放映设备,超清晰画质金属荧幕,以高坡度,大落差,宽排距的座椅设计,保证每位观众绝佳观影效果。","businessHours":"10:00-22:00","contact":"029-88725666","materialList":["/iotFile/project-zert3dski8fqmgr4zhusea/20231115/rHmfW2Rgtj4InTeAdoVLg.png","/iotFile/project-zert3dski8fqmgr4zhusea/20231115/AfoeLqAI7EqHh1GAvgNYT.png"],"xaxis":"[1542, 30, -133]","yaxis":"26","navXaxis":"1283","navYaxis":"93","buildingOrder":0,"floorOrder":5}} |
|||
@ -1,25 +1 @@ |
|||
{ |
|||
"code": 200, |
|||
"msg": "success", |
|||
"data": { |
|||
"machineCode": "GpaJWduZp-n5jLARQwIhx", |
|||
"machineName": "千目GO", |
|||
"machineTypeName": "导视", |
|||
"label": "windows", |
|||
"screenAttribute": "1920*1080横屏", |
|||
"building": "A栋", |
|||
"buildingCode": "ocRrNO47oiA3itmmdwHzm", |
|||
"buildingOrder": 0, |
|||
"floor": "L1", |
|||
"floorCode": "7Lxdij-Q9NnccCu2bVJMs", |
|||
"floorOrder": 2, |
|||
"ip": "192.168.56.1", |
|||
"mac": "0A0027000011", |
|||
"location": "50", |
|||
"angle": "0", |
|||
"projectCode": "project-200", |
|||
"regionCode": "", |
|||
"lensCoordinate": "", |
|||
"orientationCoordinate": "" |
|||
} |
|||
} |
|||
{"code":200,"msg":"success","data":{"machineCode":"MLnMzBjQdwVKysWyz1RG0","machineName":"111","machineTypeName":"导视","label":"windows","screenAttribute":"1080*1920竖屏","building":"A栋","buildingCode":"DLvmtzN2qodUq_oYr7vyM","buildingOrder":0,"floor":"1F","floorCode":"nL3E-j25zxxkag_HMSGsR","floorOrder":2,"ip":"192.168.1.21","mac":"E0D55E1B2B17","location":"16","angle":"0","projectCode":"project-zert3dski8fqmgr4zhusea","regionCode":"","lensCoordinate":"","orientationCoordinate":"","deployType":"saas","xfyunIp":"","xfyunPort":"","style":"0"}} |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||
{"code":200,"msg":"操作成功","data":{"recommendList":[{"logoCode":"af555d42c0254232b54204520cc6db83","logoUrl":"/iotFile/2022/05/25/af555d42c0254232b54204520cc6db83.png","shopCode":"AN_o_vxiBlmgF--8CRQY-","shopName":"海南椰子鸡"},{"logoCode":"65098ac9d5764573a3f7470d9c48d580","logoUrl":"/iotFile/2022/06/21/65098ac9d5764573a3f7470d9c48d580.jpg","shopCode":"RxCziYVSgPMYchzy7hej0","shopName":"希色"},{"logoCode":"bff3193e743d4bfc8d30c3ac287dcdbf","logoUrl":"/iotFile/2022/06/21/bff3193e743d4bfc8d30c3ac287dcdbf.jpg","shopCode":"6t2GslN9_U8kBPke2bTmz","shopName":"星巴克"},{"logoCode":"f9f5cd482140458dbd04778d4790e249","logoUrl":"/iotFile/2022/06/21/f9f5cd482140458dbd04778d4790e249.jpg","shopCode":"gdL9jLxYwrD5rY_q-XWOh","shopName":"荔滋烫捞"},{"logoCode":"896cc12fbb214fc7af8e938e004d6513","logoUrl":"/iotFile/2022/06/21/896cc12fbb214fc7af8e938e004d6513.jpg","shopCode":"NjiFuPS2UCMh8h5i_05Mi","shopName":"优衣库"},{"logoCode":"1da1c24714974f6bb3bfce4bcfddf568","logoUrl":"/iotFile/2022/06/21/1da1c24714974f6bb3bfce4bcfddf568.jpg","shopCode":"5CfJMt_5s20sA1jVKzLwa","shopName":"中国李宁"},{"logoCode":"84a1d1a7232e459cb1c377b8f4e00ccf","logoUrl":"/iotFile/2022/06/21/84a1d1a7232e459cb1c377b8f4e00ccf.png","shopCode":"IsY2OG4Od-Rp4TL00qahU","shopName":"热风"},{"logoCode":"dd4ca9946f0c455ebebe2022ebcefa9b","logoUrl":"/iotFile/2022/06/21/dd4ca9946f0c455ebebe2022ebcefa9b.jpg","shopCode":"ljJsnoUp781-adEPydqRU","shopName":"VERO MODA"},{"logoCode":"eeb85afd46da4d83abbf467f41a27135","logoUrl":"/iotFile/2022/06/20/eeb85afd46da4d83abbf467f41a27135.jpg","shopCode":"pPOk0_lzMknf5YbpTvnRC","shopName":"十一日后"},{"logoCode":"da476d20bb824d039e93c83173d18107","logoUrl":"/iotFile/2022/06/21/da476d20bb824d039e93c83173d18107.jpg","shopCode":"OFKIMeKfwiex78jAxk2cU","shopName":"芬狄诗"},{"logoCode":"4814f6c971ee448c9f9af4dd65876b13","logoUrl":"/iotFile/2022/06/21/4814f6c971ee448c9f9af4dd65876b13.jpg","shopCode":"VBuvd4EdiQm6P8QveXHlF","shopName":"大疆"},{"logoCode":"db2dbfacaf7b447dadb9e75d0448afc1","logoUrl":"/iotFile/2022/06/21/db2dbfacaf7b447dadb9e75d0448afc1.jpg","shopCode":"X1RxLtQxx3IJmeZ_zgp7k","shopName":"周大福"},{"logoCode":"24782b42319941838641042c0f7c7690","logoUrl":"/iotFile/2022/06/21/24782b42319941838641042c0f7c7690.png","shopCode":"KHaG0tQAmUSWMGW2SFRKm","shopName":"大孚飞跃"},{"logoCode":"e4dfe55d6e6341959fab5ca235fa6e6f","logoUrl":"/iotFile/2022/06/21/e4dfe55d6e6341959fab5ca235fa6e6f.png","shopCode":"Bkfr6aY7Ut0QS-d5SpRFN","shopName":"JUPITER&CANDY"},{"logoCode":"7064a8b67e544cd3857b896dc1142da3","logoUrl":"/iotFile/2022/06/21/7064a8b67e544cd3857b896dc1142da3.jpg","shopCode":"OjDHDq6Zna2npFrv141s8","shopName":"JEWELRIA"},{"logoCode":"066cb31027334eeb8c5c102543dc9a83","logoUrl":"/iotFile/2022/04/02/066cb31027334eeb8c5c102543dc9a83.jpg","shopCode":"DvM4nNbetDT9tYA-gTrd8","shopName":"屈臣氏"},{"logoCode":"e42a1a763add4ce095341ae335a84734","logoUrl":"/iotFile/2022/06/21/e42a1a763add4ce095341ae335a84734.jpg","shopCode":"NIV5CgXPKCWTa39gxyoqZ","shopName":"谭木匠"}],"searchList":[{"shopNum":2,"shopCode":"a6JxLK8cQqDLQ2piug8Gn","shopName":"书亦烧仙草"},{"shopNum":2,"shopCode":"DvM4nNbetDT9tYA-gTrd8","shopName":"屈臣氏"},{"shopNum":1,"shopCode":"fT5cvNAf91n_tN99fTAsq","shopName":"好的"},{"shopNum":1,"shopCode":"7twEQl8ooydzBRFAcLluR","shopName":"爱回收"},{"shopNum":1,"shopCode":"NjiFuPS2UCMh8h5i_05Mi","shopName":"优衣库"}]}} |
|||
{"code":200,"msg":"操作成功","data":{"recommendList":[{"logoCode":"jdLRcaBQaoRMcsbaXpsMm","logoUrl":"/iotFile/project-zert3dski8fqmgr4zhusea/20230612/jdLRcaBQaoRMcsbaXpsMm.jpg","shopCode":"ptmeCKcDksiWQxI6ocQpn","shopName":"宝马"},{"logoCode":"pLr26UEBLMUpOdMnQhPbQ","logoUrl":"/iotFile/project-zert3dski8fqmgr4zhusea/20230714/pLr26UEBLMUpOdMnQhPbQ.png","shopCode":"iOoSnwfAGrKut2dHT9YWq","shopName":"华为"},{"logoCode":"NWaFow0HA7ChS5f5-f7er","logoUrl":"/iotFile/project-zert3dski8fqmgr4zhusea/20230612/NWaFow0HA7ChS5f5-f7er.jpg","shopCode":"24fD2WMoOuYanvSvyODLY","shopName":"ECCO"},{"logoCode":"Yg4AQeg2LdoR4bi9R7zaB","logoUrl":"/iotFile/project-zert3dski8fqmgr4zhusea/20230612/Yg4AQeg2LdoR4bi9R7zaB.jpg","shopCode":"WRg5W8kMRQumYQh3gFh5Q","shopName":"有兰"},{"logoCode":"jJO6QIlkPCS7yVmf0rPT9","logoUrl":"/iotFile/project-zert3dski8fqmgr4zhusea/20230612/jJO6QIlkPCS7yVmf0rPT9.jpg","shopCode":"ER5b93KkblRaTCUpxW6CM","shopName":"NEXY.CO"}],"searchList":[{"shopNum":72,"shopCode":"pyv212DLXi3X-a4zF-9oE","shopName":"UNIQLO"},{"shopNum":41,"shopCode":"sw9gukxkbv8yk_Ge7WVJb","shopName":"M STAND"},{"shopNum":39,"shopCode":"hm-mV58hy21EO53DJxk38","shopName":"星巴克"},{"shopNum":39,"shopCode":"xEr6y6m7nw1t8_Ja_PUSt","shopName":"喜茶"},{"shopNum":29,"shopCode":"5kjjVbC3rmUtBz2HWQeiL","shopName":"略味"}]}} |
|||
@ -0,0 +1,89 @@ |
|||
<script setup> |
|||
import { list as buttonList } from './list' |
|||
defineProps(['mapIdx']) |
|||
const emit = defineEmits(['handleMapIcon']) |
|||
</script> |
|||
<template> |
|||
<Teleport to="body"> |
|||
<div class="control-area"> |
|||
<div class="map-control-wrapper animate__fast animate__animated animate__fadeInUp"> |
|||
<div class="map-item" @click="emit('handleMapIcon', item, index)" v-for="(item, index) of buttonList" :key="item.name"> |
|||
<img :src="mapIdx === index ? item.iconActive : item.icon" alt="" class="map-icon" /> |
|||
<span class="map-name">{{ switchLanguage(item, 'name') }}</span> |
|||
</div> |
|||
</div> |
|||
<img src="../../assets/images/map/hands.svg" alt="" class="hands" /> |
|||
</div> |
|||
</Teleport> |
|||
</template> |
|||
<style lang="scss" scoped> |
|||
.control-area { |
|||
position: absolute; |
|||
display: flex; |
|||
align-items: flex-start; |
|||
justify-content: space-between; |
|||
height: 104px; |
|||
left: 68px; |
|||
top: 952px; |
|||
z-index: 51; |
|||
|
|||
.hands { |
|||
position: fixed; |
|||
top: 408px; |
|||
left: 68px; |
|||
width: 246px; |
|||
height: 80px; |
|||
z-index: 51; |
|||
} |
|||
} |
|||
.map-control-wrapper { |
|||
display: flex; |
|||
} |
|||
.map-item { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: center; |
|||
margin-left: 12px; |
|||
} |
|||
.map-icon { |
|||
margin-bottom: 8px; |
|||
width: 52px; |
|||
} |
|||
.map-name { |
|||
font-weight: 700; |
|||
font-size: 12px; |
|||
line-height: 14px; |
|||
text-align: center; |
|||
color: rgba(0, 0, 0, 0.6); |
|||
} |
|||
@media (min-aspect-ratio: 1/1) { |
|||
.shop-list-wrapper { |
|||
width: 510px; |
|||
height: calc(100vh - 280px); |
|||
right: 0px; |
|||
bottom: 0; |
|||
left: auto; |
|||
top: auto; |
|||
.switch { |
|||
top: 24px; |
|||
} |
|||
.shop-scroll { |
|||
height: 100%; |
|||
margin-left: 54px; |
|||
} |
|||
} |
|||
.control-area { |
|||
left: 68px; |
|||
bottom: 40px; |
|||
right: auto; |
|||
top: auto; |
|||
height: auto; |
|||
.hands { |
|||
top: 280px; |
|||
left: 68px; |
|||
right: auto; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
@ -1,38 +1,205 @@ |
|||
<template> |
|||
<View> |
|||
<BrandScroll class="brand" :shop="shop" @click="handleShop" :list="selectedList" :config="config" /> |
|||
<MapControl @handleMapIcon="handleMapIcon" :mapIdx="mapIdx" v-if="showMap"></MapControl> |
|||
<Teleport to="body"> |
|||
<Transition appear enter-active-class="animate__animated animate__fadeIn" leave-active-class="animate__animated animate__fadeOut"> |
|||
<div class="hide-map" v-if="showMap" @click="showMap = false"> |
|||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|||
<g> |
|||
<path id="Vector" d="M24 22.1L33.9 32L36.728 29.172L24 16.444L11.272 29.172L14.1 32L24 22.1Z" fill="currentColor" /> |
|||
</g> |
|||
</svg> |
|||
<div v-if="isH"> |
|||
<div>点击</div> |
|||
<div>收起地图</div> |
|||
</div> |
|||
<div v-else>点击收起地图</div> |
|||
</div></Transition |
|||
> |
|||
<div class="brand-wrapper" :class="showMap ? 'showMap' : ''"> |
|||
<BrandScroll class="brand" :class="showMap ? 'showMap' : ''" :shop="shop" @click="handleShop" :list="selectedList" :isFood="isFood" :config="config" /> |
|||
</div> |
|||
</Teleport> |
|||
</View> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import { ref } from 'vue' |
|||
import { ref, computed, watch, onBeforeMount, onBeforeUnmount } from 'vue' |
|||
import { storeToRefs } from 'pinia' |
|||
import { useStore } from '@/store/root' |
|||
import { getBrandListByFloor } from '@/http/brand/api' |
|||
import View from '@/layouts/View.vue' |
|||
import BrandScroll from '@/components/BrandScroll/BrandScroll.vue' |
|||
import { hideMapDialog, setShopActive, setShopInactive } from '@/composables/useInitMap' |
|||
import MapControl from '@/components/MapControl/MapControl.vue' |
|||
import { RESET, DIRECTION } from '@/components/MapControl/list' |
|||
import { useMediaQuery } from '@vueuse/core' |
|||
|
|||
const store = useStore() |
|||
const storeRefs = storeToRefs(store) |
|||
const { config, shopList, indexList } = storeRefs |
|||
const shop = ref(null) |
|||
const { config, indexList, foodIndustryMap, shop, currentFloor, showMap, showSearch, path } = storeRefs |
|||
const mapIdx = ref(-1) |
|||
const mapTimer = ref(null) |
|||
const mapIconTimer = ref(null) |
|||
const selectedList = ref([]) |
|||
const isFood = computed(() => path.value === '/foods') |
|||
const isH = useMediaQuery('(min-aspect-ratio: 1/1)') |
|||
|
|||
Promise.all([getBrandListByFloor()]).then(([_brandList]) => { |
|||
if (storeRefs.shop.value) shop.value = storeRefs.shop.value |
|||
if (isFood.value) { |
|||
const list = _brandList.data.list.map(item => ({ |
|||
name: item.name, |
|||
shopList: item.shopList.filter(({ industryFatherCode }) => foodIndustryMap.value[industryFatherCode]) |
|||
})) |
|||
selectedList.value = list |
|||
} else { |
|||
const recMap = indexList.value.recommendList.reduce((acc, { shopCode }) => ({ ...acc, [shopCode]: true }), {}) |
|||
const list = _brandList.data.list |
|||
selectedList.value = list.map(({ name, shopList: _shopList }) => ({ name, shopList: _shopList.filter(({ shopCode }) => recMap[shopCode]) })) |
|||
} |
|||
}) |
|||
onBeforeMount(() => { |
|||
store.SET_SHOW_MAP(false) |
|||
}) |
|||
|
|||
onBeforeUnmount(() => { |
|||
if (!showSearch.value) store.SET_SHOP(null) |
|||
}) |
|||
function handleShop(item) { |
|||
shop.value = shopList.value.find(_shop => _shop.shopCode === item.shopCode) |
|||
if (shop.value?.shopCode === item.shopCode) { |
|||
if (showMap.value) { |
|||
window.Map_QM.pathNode({ floor: shop.value.floorOrder, node: shop.value.yaxis }) |
|||
} else store.SET_SHOW_MAP(true) |
|||
} |
|||
mapIdx.value = -1 |
|||
store.SET_SHOP(item) |
|||
} |
|||
|
|||
//我的位置 |
|||
function onClickDeviceSite() { |
|||
hideMapDialog() |
|||
window.Map_QM.onShowDeviceSite() |
|||
} |
|||
function handleMapIcon(item, index) { |
|||
store.SET_SHOP(null) |
|||
clearTimeout(mapIconTimer.value) |
|||
window.Map_QM.changeStateShopPro(false) |
|||
mapIdx.value = index |
|||
switch (item.name) { |
|||
case RESET: |
|||
onClickDeviceSite() |
|||
window.Map_QM.showFloor(currentFloor.value.floorOrder) |
|||
break |
|||
case DIRECTION: |
|||
window.Map_QM.onShowMeDir() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
clearTimeout(mapTimer.value) |
|||
if (item.name === RESET) { |
|||
mapTimer.value = setTimeout(() => { |
|||
mapIdx.value = -1 |
|||
mapTimer.value = -1 |
|||
clearTimeout(mapTimer.value) |
|||
}, 300) |
|||
} |
|||
} |
|||
|
|||
watch(showMap, v => { |
|||
if (v) { |
|||
window?.Map_QM?.startRender() |
|||
if (shop.value) { |
|||
store.SET_SHOW_MAP(true) |
|||
window.Map_QM.pathNode({ floor: shop.value.floorOrder, node: shop.value.yaxis }) |
|||
} |
|||
} else { |
|||
window?.Map_QM?.cancelRender() |
|||
} |
|||
}) |
|||
|
|||
watch(shop, nxt => { |
|||
if (!nxt) { |
|||
setShopInactive() |
|||
} else if (nxt && showMap.value) { |
|||
setShopActive(nxt) |
|||
window.Map_QM.pathNode({ floor: nxt.floorOrder, node: nxt.yaxis }) |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.brand { |
|||
position: relative; |
|||
flex: 1; |
|||
.hide-map { |
|||
position: absolute; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
padding-top: 4px; |
|||
height: 100px; |
|||
left: 0; |
|||
right: 0; |
|||
background: var(--guide-floorBg); |
|||
color: var(--guide-floorColor); |
|||
top: 1050px; |
|||
font-size: 24px; |
|||
font-weight: 700; |
|||
line-height: normal; |
|||
svg { |
|||
width: 48px; |
|||
height: 48px; |
|||
} |
|||
} |
|||
.brand-wrapper { |
|||
position: absolute; |
|||
top: 408px; |
|||
height: 1512px; |
|||
z-index: 20; |
|||
background: var(--global-background); |
|||
transition: all 0.5s ease-in-out; |
|||
&.showMap { |
|||
height: 770px; |
|||
top: 1150px; |
|||
.brand { |
|||
height: 770px; |
|||
} |
|||
} |
|||
.brand { |
|||
height: 1512px; |
|||
} |
|||
} |
|||
@media (min-aspect-ratio: 1/1) { |
|||
.hide-map { |
|||
left: 1310px; |
|||
right: 510px; |
|||
height: 800px; |
|||
top: 280px; |
|||
align-items: center; |
|||
text-align: center; |
|||
justify-content: center; |
|||
font-size: 20px; |
|||
svg { |
|||
transform: rotate(-90deg); |
|||
margin-bottom: 27px; |
|||
} |
|||
} |
|||
.brand-wrapper { |
|||
top: 280px; |
|||
width: 100vw; |
|||
right: 0; |
|||
height: 800px; |
|||
.brand { |
|||
height: 800px; |
|||
} |
|||
&.showMap { |
|||
width: 510px; |
|||
top: 280px; |
|||
height: 800px; |
|||
.brand { |
|||
width: 456px; |
|||
height: 800px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
|
|||
@ -1,40 +0,0 @@ |
|||
<template> |
|||
<View> |
|||
<BrandScroll :isFood="true" class="foods" :shop="shop" @click="handleShop" :list="selectedList" :config="config" /> |
|||
</View> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import { ref } from 'vue' |
|||
import { storeToRefs } from 'pinia' |
|||
import { useStore } from '@/store/root' |
|||
import { getBrandListByFloor } from '@/http/brand/api' |
|||
import View from '@/layouts/View.vue' |
|||
import BrandScroll from '@/components/BrandScroll/BrandScroll.vue' |
|||
|
|||
const store = useStore() |
|||
const storeRefs = storeToRefs(store) |
|||
const { config, shopList, foodIndustryMap } = storeRefs |
|||
const shop = ref(null) |
|||
const selectedList = ref([]) |
|||
|
|||
Promise.all([getBrandListByFloor()]).then(([_brandList]) => { |
|||
if (storeRefs.shop.value) shop.value = storeRefs.shop.value |
|||
const list = _brandList.data.list.map(item => ({ |
|||
name: item.name, |
|||
shopList: item.shopList.filter(({ industryFatherCode }) => foodIndustryMap.value[industryFatherCode]) |
|||
})) |
|||
selectedList.value = list |
|||
}) |
|||
|
|||
function handleShop(item) { |
|||
shop.value = shopList.value.find(_shop => _shop.shopCode === item.shopCode) |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.foods { |
|||
position: relative; |
|||
flex: 1; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue