Browse Source

feat: 接入新导视数据

ShangHai_LongXiang
jiannibang 3 years ago
parent
commit
4d6b8ae9eb
  1. 1
      public/static/offline/JSON/getActivityList1.json
  2. 1
      public/static/offline/JSON/getActivityList2.json
  3. 1
      public/static/offline/JSON/getActivityList3.json
  4. 2
      public/static/offline/JSON/getBackTime.json
  5. 2
      public/static/offline/JSON/getBrandShopList.json
  6. 2
      public/static/offline/JSON/getBrandShopListByFloor.json
  7. 2
      public/static/offline/JSON/getBrandShopListByIndustryId.json
  8. 2
      public/static/offline/JSON/getCinemaInfo.json
  9. 1
      public/static/offline/JSON/getColumnList1.json
  10. 1
      public/static/offline/JSON/getColumnList2.json
  11. 1
      public/static/offline/JSON/getColumnList3.json
  12. 2
      public/static/offline/JSON/getDevCoordinateByIP.json
  13. 1
      public/static/offline/JSON/getMallInfo.json
  14. 1
      public/static/offline/JSON/getMallTraffic.json
  15. 1
      public/static/offline/JSON/getMallVoice.json
  16. 2
      public/static/offline/JSON/getMap.json
  17. 2
      public/static/offline/JSON/getMapInfo.json
  18. 1
      public/static/offline/JSON/getMemberInterests.json
  19. 1
      public/static/offline/JSON/getParkingInfo.json
  20. 2
      public/static/offline/JSON/getQMGoShopData.json
  21. 1
      public/static/offline/JSON/getServeList.json
  22. 1
      public/static/offline/JSON/index.json
  23. 17
      src/base/ThumbQRCode/ThumbQRCode.vue
  24. 23
      src/components/ActivitiesList/ActivitiesList.vue
  25. 10
      src/components/CarouselWithIntro/CarouselWithIntro.vue
  26. 4
      src/components/PublicComponent/PublicComponent.vue
  27. 19
      src/components/PublicComponent/Tabs.vue
  28. 1
      src/components/Search/Search.vue
  29. 67
      src/components/Sidebar/list.js
  30. 8
      src/composables/useInitConfigAndMallInfo.js
  31. 5
      src/composables/useInitMap.js
  32. 19
      src/http/api.js
  33. 7
      src/store/root/actions.js
  34. 5
      src/store/root/state.js
  35. 8
      src/views/Activities/Activities.vue
  36. 1
      src/views/Billboard/Billboard.vue
  37. 2
      src/views/Guide/Guide.vue
  38. 26
      src/views/Index/Index.vue
  39. 3
      src/views/Mall/Mall.vue
  40. 2
      src/views/Member/Member.vue
  41. 2
      src/views/Movie/Movie.vue
  42. 2
      src/views/Parking/Parking.vue

1
public/static/offline/JSON/getActivityList1.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":{"activityList":[]}}

1
public/static/offline/JSON/getActivityList2.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":{"activityList":[]}}

1
public/static/offline/JSON/getActivityList3.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":{"activityList":[]}}

2
public/static/offline/JSON/getBackTime.json

@ -1 +1 @@
{ "code": 200, "msg": "操作成功", "data": [999, 999] }
{"code":200,"msg":"操作成功","data":[40,10]}

2
public/static/offline/JSON/getBrandShopList.json

File diff suppressed because one or more lines are too long

2
public/static/offline/JSON/getBrandShopListByFloor.json

File diff suppressed because one or more lines are too long

2
public/static/offline/JSON/getBrandShopListByIndustryId.json

File diff suppressed because one or more lines are too long

2
public/static/offline/JSON/getCinemaInfo.json

@ -1 +1 @@
{"code":200,"msg":"操作成功","data":{"cinemaName":"幸福蓝海国际影城","cinemaCode":"123456789","cinemaIntro":"电影院介绍"}}
{"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"]}}

1
public/static/offline/JSON/getColumnList1.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":[]}

1
public/static/offline/JSON/getColumnList2.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":[]}

1
public/static/offline/JSON/getColumnList3.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":[]}

2
public/static/offline/JSON/getDevCoordinateByIP.json

@ -1 +1 @@
{"code":200,"msg":"success","data":{"machineCode":"dffgB8oWVBOTKfCLxmuOn","machineName":"测试设备","machineTypeName":"导视","label":"windows","screenAttribute":"1920*1080横屏","building":"A","buildingCode":"86ef361b-d5e7-4244-953f-b051eb6c8a2d","buildingOrder":0,"floor":"L1","floorCode":"454ec8ee-bd69-4464-b994-246970ec69bb","floorOrder":2,"ip":"192.168.1.79","mac":"C0FBF9C3A353","location":"0","angle":"0","projectCode":"project-w17ea-c_sjflcn6wr7zela"}}
{"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":"0","angle":"0","projectCode":"project-200","regionCode":"","lensCoordinate":"","orientationCoordinate":""}}

1
public/static/offline/JSON/getMallInfo.json

@ -1 +0,0 @@
{"code":500,"msg":"请求失败"}

1
public/static/offline/JSON/getMallTraffic.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":{"fileList":[]}}

1
public/static/offline/JSON/getMallVoice.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":{"isOpen":0}}

2
public/static/offline/JSON/getMap.json

File diff suppressed because one or more lines are too long

2
public/static/offline/JSON/getMapInfo.json

File diff suppressed because one or more lines are too long

1
public/static/offline/JSON/getMemberInterests.json

@ -1 +0,0 @@
{"code":500,"msg":"请求失败"}

1
public/static/offline/JSON/getParkingInfo.json

@ -1 +0,0 @@
{"code":500,"msg":"请求失败"}

2
public/static/offline/JSON/getQMGoShopData.json

@ -1 +1 @@
{"code":200,"msg":"操作成功","data":{"recommendList":"","searchList":[{"shopNum":2,"shopCode":"561d370b-1162-4a24-8420-c22ee72e2e06","shopName":"LOOWO"},{"shopNum":2,"shopCode":"6a2cccb3-ca88-453a-a74f-e9181ab7fee4","shopName":"Apple store"},{"shopNum":1,"shopCode":"40d52af1-f430-4a5b-a6cc-71bb394cf0d6","shopName":"鲸桥编程"},{"shopNum":1,"shopCode":"116624c8-b895-44d5-abea-5380bfc27c6c","shopName":"E.LAND KIDS"},{"shopNum":1,"shopCode":"e7554c03-bbf6-436b-8cb5-c13efc21a5c8","shopName":"GOLD SHARK(装修中)"}]}}
{"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":"优衣库"}]}}

1
public/static/offline/JSON/getServeList.json

@ -1 +0,0 @@
{"code":200,"msg":"操作成功","data":{"serveList":[]}}

1
public/static/offline/JSON/index.json

@ -1 +0,0 @@
{ "code": 200, "msg": "操作成功", "data": { "temperature": "12", "columnList": [], "hotSearch": [], "status": "多云" } }

17
src/base/ThumbQRCode/ThumbQRCode.vue

@ -1,14 +1,12 @@
<template> <template>
<div class="code-wrapper"> <div class="code-wrapper">
<img :src="url" class="code-icon" alt="" /> <img :src="url" class="code-icon" alt="" />
<p class="tips">{{ title }}</p>
</div> </div>
</template> </template>
<script setup> <script setup>
defineProps({ defineProps({
url: String,
title: String
url: String
}) })
</script> </script>
@ -25,16 +23,9 @@ defineProps({
border-radius: 8px; border-radius: 8px;
.code-icon { .code-icon {
width: 150px; width: 150px;
height: 150px;
padding: 14px;
}
.tips {
font-weight: 700;
font-size: 14px;
line-height: 16px;
text-align: center;
color: rgba(0, 0, 0, 0.8);
padding-top: 15px;
height: 190px;
object-fit: contain;
object-position: center;
} }
} }
</style> </style>

23
src/components/ActivitiesList/ActivitiesList.vue

@ -1,7 +1,7 @@
<template> <template>
<ScrollView class="scroll" :list="list" :scrollX="isH" :scrollbar="!isH" @click="handleActivity(null)"> <ScrollView class="scroll" :list="list" :scrollX="isH" :scrollbar="!isH" @click="handleActivity(null)">
<TransitionGroup name="zoom" tag="div" class="scroll-content"> <TransitionGroup name="zoom" tag="div" class="scroll-content">
<div :class="['content-item', item === activity ? 'd' : '']" v-for="item of list" :key="item.activityId">
<div :class="['content-item', item === activity ? 'd' : '']" v-for="item of list" :key="item.id">
<div <div
class="front" class="front"
@click=" @click="
@ -11,19 +11,22 @@
} }
" "
> >
<img :src="config.sourceUrl + item.fileUrl" alt="" />
<div class="tr">{{ item.startDate }} - {{ item.endDate }}</div>
<img :src="config.sourceUrl + item.content.pic[0]" alt="" />
<div class="tr">{{ item.content.startDate }} - {{ item.content.endDate }}</div>
<div class="bottom"> <div class="bottom">
<div class="left">{{ switchLanguage(item, 'activityName') }}</div>
<div class="left">{{ item.content.name }}</div>
<div class="right">查看详情</div> <div class="right">查看详情</div>
</div> </div>
</div> </div>
<div class="back"> <div class="back">
<ScrollView class="backscroll" scrollbar stopPropagation> <ScrollView class="backscroll" scrollbar stopPropagation>
<div> <div>
<div class="title">{{ switchLanguage(item, 'activityName') }}</div>
<div class="title">{{ item.content.name }}</div>
<div class="desc"> <div class="desc">
{{ switchLanguage(item, 'activityContent') }}
{{ item.content.desc }}
</div>
<div class="qrcodeWrapper">
<ThumbQRCode class="item" v-for="item of item.content.qrcode" :url="config.sourceUrl + item" :title="''" :key="item" />
</div> </div>
</div> </div>
</ScrollView> </ScrollView>
@ -42,6 +45,7 @@ import 'swiper/css'
import 'swiper/css/pagination' import 'swiper/css/pagination'
import 'swiper/css/effect-coverflow' import 'swiper/css/effect-coverflow'
import { useMediaQuery } from '@vueuse/core' import { useMediaQuery } from '@vueuse/core'
import ThumbQRCode from '@/base/ThumbQRCode/ThumbQRCode.vue'
const isH = useMediaQuery('(min-aspect-ratio: 1/1)') const isH = useMediaQuery('(min-aspect-ratio: 1/1)')
defineProps({ defineProps({
@ -94,6 +98,13 @@ const { config } = storeToRefs(store)
border: none !important; border: none !important;
} }
} }
.qrcodeWrapper {
display: flex;
margin-left: 68px;
.item {
margin-right: 10px;
}
}
.scroll-content { .scroll-content {
width: 100%; width: 100%;
display: inline-flex; display: inline-flex;

10
src/components/CarouselWithIntro/CarouselWithIntro.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="benefits-wrapper"> <div class="benefits-wrapper">
<div class="carousel"> <div class="carousel">
<EffectFade :list="data?.fileList ?? []">
<EffectFade :list="data?.pics ?? []">
<template v-slot="{ item }"> <template v-slot="{ item }">
<div class="banner-wrapper"> <div class="banner-wrapper">
<img class="banner" :src="config.sourceUrl + item" alt="" /> <img class="banner" :src="config.sourceUrl + item" alt="" />
@ -10,14 +10,14 @@
</EffectFade> </EffectFade>
</div> </div>
<div class="right"> <div class="right">
<h1 class="title">{{ switchLanguage(data, 'title') }}</h1>
<h1 class="title">{{ data.name }}</h1>
<ScrollView class="intro-scroll" scrollbar> <ScrollView class="intro-scroll" scrollbar>
<p class="intro"> <p class="intro">
{{ switchLanguage(data, 'content') }}
{{ data.desc }}
</p> </p>
</ScrollView> </ScrollView>
<div class="qrcodeWrapper"> <div class="qrcodeWrapper">
<ThumbQRCode class="item" v-for="item of qr" :url="config.sourceUrl + item.fileUrl" :title="switchLanguage(item, 'name')" :key="item.name" />
<ThumbQRCode class="item" v-for="item of qr" :url="config.sourceUrl + item" :title="''" :key="item" />
</div> </div>
</div> </div>
</div> </div>
@ -37,7 +37,7 @@ const props = defineProps({
const store = useStore() const store = useStore()
const { config } = storeToRefs(store) const { config } = storeToRefs(store)
const qr = computed(() => props.data.qrFileList ?? [])
const qr = computed(() => props.data.qrcode ?? [])
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

4
src/components/PublicComponent/PublicComponent.vue

@ -34,7 +34,7 @@ const Tabs = defineAsyncComponent(() => import('./Tabs.vue'))
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const store = useStore() const store = useStore()
const { shop, showSearch, sidebarList, language } = storeToRefs(store)
const { shop, showSearch, language } = storeToRefs(store)
const { resetClickNumber, setLogoutRef, addTotalClick } = useLogout() const { resetClickNumber, setLogoutRef, addTotalClick } = useLogout()
@ -42,7 +42,6 @@ const screenSaveCallback = () => {
window.Map_QM.changeMapIPState(shop.value?.houseNum, shop.value?.formatColor) window.Map_QM.changeMapIPState(shop.value?.houseNum, shop.value?.formatColor)
setLogoutRef(false) setLogoutRef(false)
resetClickNumber() resetClickNumber()
store.SET_SELECTED_MODULE(sidebarList.value[0].title)
showSearch.value && store.SET_SHOW_SEARCH(false) showSearch.value && store.SET_SHOW_SEARCH(false)
language.value !== 'zh' && store.SET_LANGUAGE('zh') language.value !== 'zh' && store.SET_LANGUAGE('zh')
router.push('/billboard') router.push('/billboard')
@ -62,7 +61,6 @@ async function handleScreen() {
window.Map_QM.changeMapIPState(shop.value?.houseNum, shop.value?.formatColor) window.Map_QM.changeMapIPState(shop.value?.houseNum, shop.value?.formatColor)
setLogoutRef(false) setLogoutRef(false)
resetClickNumber() resetClickNumber()
store.SET_SELECTED_MODULE(sidebarList.value[0].title)
showSearch.value && store.SET_SHOW_SEARCH(false) showSearch.value && store.SET_SHOW_SEARCH(false)
language.value !== 'zh' && store.SET_LANGUAGE('zh') language.value !== 'zh' && store.SET_LANGUAGE('zh')
await router.push('/index') await router.push('/index')

19
src/components/PublicComponent/Tabs.vue

@ -1,9 +1,9 @@
<template> <template>
<div class="tabs" v-if="sidebarList.find(({ path }) => path === $route.path)">
<div :class="['item', tab.path === $route.path ? 'active' : '']" v-for="(tab, i) of sidebarList" :key="tab.title" @click="goPage(tab)">
<div class="icon"><img :src="theme.images[tab.moduleName]" /></div>
<div class="title">{{ switchLanguage(tab, 'title') }}</div>
<div class="count" v-if="i === 0">{{ activityCount }}</div>
<div class="tabs" v-if="menuList.find(({ content: { path } }) => path === $route.path)">
<div :class="['item', tab.content.path === $route.path ? 'active' : '']" v-for="(tab, i) of menuList" :key="tab.id" @click="goPage(tab)">
<div class="icon"><img :src="theme.images[tab.content.moduleName]" /></div>
<div class="title">{{ tab.content.name }}</div>
<div class="count" v-if="i === 0 && activityCount">{{ activityCount }}</div>
</div> </div>
</div> </div>
</template> </template>
@ -17,14 +17,13 @@ import { getActivityList } from '@/http/api'
const activityCount = ref(0) const activityCount = ref(0)
const router = useRouter() const router = useRouter()
const store = useStore() const store = useStore()
const { sidebarList, theme } = storeToRefs(store)
const { menuList, theme } = storeToRefs(store)
const goPage = item => { const goPage = item => {
store.SET_SELECTED_MODULE(item.title)
router.push(item.path)
router.push(item.content.path)
} }
getActivityList(1).then(({ data }) => {
if (data?.activityList?.length) activityCount.value = data?.activityList?.length
getActivityList().then(({ data }) => {
if (data?.length) activityCount.value = data?.length
}) })
</script> </script>

1
src/components/Search/Search.vue

@ -96,7 +96,6 @@ async function handleShop(item) {
const shop = shopList.value.find(_shop => _shop.shopCode === item.shopCode) const shop = shopList.value.find(_shop => _shop.shopCode === item.shopCode)
store.SET_SHOP(shop) store.SET_SHOP(shop)
if (router.currentRoute.value.fullPath !== '/guide') { if (router.currentRoute.value.fullPath !== '/guide') {
store.SET_SELECTED_MODULE('Guide')
await router.push('/guide') await router.push('/guide')
} }
store.SET_SHOW_SEARCH(false) store.SET_SHOW_SEARCH(false)

67
src/components/Sidebar/list.js

@ -1,67 +0,0 @@
export const sidebarList = [
{
title: '商场活动',
moduleName: 'activity',
titleEn: 'SELECTION',
path: '/activity'
},
{
title: '尊享会员',
moduleName: 'member',
titleEn: 'MEMBER',
path: '/member'
},
{
title: '泊车缴费',
moduleName: 'parking',
titleEn: 'PARKING',
path: '/parking'
},
{
title: '影视天地',
moduleName: 'movie',
titleEn: 'MOVIE',
path: '/movie'
},
{
title: '商场介绍',
moduleName: 'mall',
titleEn: 'MALL',
path: '/mall'
}
// {
// icon: require('@/assets/images/sidebar/index.png'),
// title: '首页',
// moduleName: 'home',
// titleEn: 'HOME',
// path: '/'
// },
// {
// icon: require('@/assets/images/sidebar/guide.png'),
// title: '地图导览',
// moduleName: 'home',
// titleEn: 'MAP',
// path: '/guide'
// },
// {
// icon: require('@/assets/images/sidebar/brand.png'),
// title: '品牌列表',
// moduleName: 'brand',
// titleEn: 'BRAND',
// path: '/brand'
// }
// {
// icon: require('@/assets/images/sidebar/foods.png'),
// title: '特色美食',
// moduleName: 'food',
// titleEn: 'FOOD',
// path: '/foods'
// },
// {
// icon: require('@/assets/images/sidebar/service.png'),
// title: '商场服务',
// titleEn: 'SERVICE',
// moduleName: 'service',
// path: '/service'
// }
]

8
src/composables/useInitConfigAndMallInfo.js

@ -1,4 +1,4 @@
import { getConfig, getCurrentFloor, getGuideList, getTheme, getQMGoShopData } from '@/http/api'
import { getConfig, getCurrentFloor, getGuideList, getTheme, getQMGoShopData, getMenuList } from '@/http/api'
import { useStore } from '@/store/root' import { useStore } from '@/store/root'
import VConsole from 'vconsole' import VConsole from 'vconsole'
@ -8,6 +8,7 @@ export const useInitConfigAndMallInfo = async () => {
if (_config.data.debug) new VConsole() if (_config.data.debug) new VConsole()
{ {
const { data: theme } = await getTheme() const { data: theme } = await getTheme()
const r = document.querySelector(':root') const r = document.querySelector(':root')
Object.entries(theme).forEach(([cat, obj]) => { Object.entries(theme).forEach(([cat, obj]) => {
Object.entries(obj).forEach(([k, v]) => r.style.setProperty(`--${cat}-${k}`, v)) Object.entries(obj).forEach(([k, v]) => r.style.setProperty(`--${cat}-${k}`, v))
@ -17,7 +18,10 @@ export const useInitConfigAndMallInfo = async () => {
.reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}) .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {})
store.SET_THEME(theme) store.SET_THEME(theme)
} }
{
const { data: menuList } = await getMenuList()
store.SET_MENU_LIST(menuList)
}
store.SET_CONFIG(_config.data) store.SET_CONFIG(_config.data)
const _currentFloor = await getCurrentFloor() const _currentFloor = await getCurrentFloor()

5
src/composables/useInitMap.js

@ -66,11 +66,6 @@ export function hideMapDialog() {
document.getElementById('fac').style.visibility = 'hidden' document.getElementById('fac').style.visibility = 'hidden'
} }
//显示地图弹框
function showMapDialog() {
document.getElementById('shopInfo').style.visibility = 'visible'
}
export const showFacility = fac => { export const showFacility = fac => {
window.Map_QM.addElementLabel(document.getElementById('fac'), fac.site.x, -fac.site.y, 100, 'fac') window.Map_QM.addElementLabel(document.getElementById('fac'), fac.site.x, -fac.site.y, 100, 'fac')
document.getElementById('fac').style.visibility = 'visible' document.getElementById('fac').style.visibility = 'visible'

19
src/http/api.js

@ -7,26 +7,19 @@ export const getTheme = () => get(`/static/offline/JSON/theme.json`)
//首页热搜及卡片 //首页热搜及卡片
export const getIndexList = () => get(`${url().sourceUrl}/JSON/index.json`) export const getIndexList = () => get(`${url().sourceUrl}/JSON/index.json`)
//获取活动 1商场活动;2品牌活动;3会员活动
export const getActivityList = type => get(`${url().sourceUrl}/JSON/getActivityList${type}.json`)
export const getActivityList = () => get(`${url().sourceUrl}/JSON/actvities.json`)
//获取会员权益 //获取会员权益
export const getMemberBenefits = () => get(`${url().sourceUrl}/JSON/getMemberInterests.json`)
export const getMemberBenefits = () => get(`${url().sourceUrl}/JSON/member.json`)
//获取停车场数据 //获取停车场数据
export const getParkingList = () => get(`${url().sourceUrl}/JSON/getParkingInfo.json`)
//获取品牌喜欢数量
export const getBrandLikesNumber = shopCode => get(`${url().interfaceUrl}/guide/v1/web/getBrandStar?shopCode=${shopCode}`)
//设置品牌喜欢数量
export const setBrandLikesNumber = shopCode => get(`${url().interfaceUrl}/guide/v1/web/setBrandStar?shopCode=${shopCode}`)
export const getParkingList = () => get(`${url().sourceUrl}/JSON/parking.json`)
//获取 影院信息 //获取 影院信息
export const getCinemaInfo = () => get(`${url().sourceUrl}/JSON/getCinemaInfo.json`) export const getCinemaInfo = () => get(`${url().sourceUrl}/JSON/getCinemaInfo.json`)
//获取商场介绍 //获取商场介绍
export const getMallInfoList = () => get(`${url().sourceUrl}/JSON/getMallInfo.json`)
export const getMallInfoList = () => get(`${url().sourceUrl}/JSON/mall.json`)
//获取跳转时间 //获取跳转时间
export const getBackTime = () => get(`${url().sourceUrl}/JSON/getBackTime.json`) export const getBackTime = () => get(`${url().sourceUrl}/JSON/getBackTime.json`)
@ -50,3 +43,7 @@ export const getHandWriting = params => post(url().handWriteUrl, params)
export const getStatistics = params => post(`${url().interfaceUrl}${url().clickUploadUrl}`, params) export const getStatistics = params => post(`${url().interfaceUrl}${url().clickUploadUrl}`, params)
export const getQMGoShopData = () => get(`/static/offline/JSON/getQMGoShopData.json`) export const getQMGoShopData = () => get(`/static/offline/JSON/getQMGoShopData.json`)
export const getAD = () => get(`/static/offline/JSON/ad.json`)
export const getMenuList = () => get(`/static/offline/JSON/menuList.json`)

7
src/store/root/actions.js

@ -4,14 +4,11 @@ export const actions = {
SET_SHOP_LIST(list) { SET_SHOP_LIST(list) {
this.shopList = list this.shopList = list
}, },
SET_SELECTED_MODULE(moduleName) {
this.selectedModule = moduleName
},
SET_INDEX_LIST(list) { SET_INDEX_LIST(list) {
this.indexList = list this.indexList = list
}, },
SET_SIDEBAR_LIST(list) {
this.sidebarList = list
SET_MENU_LIST(list) {
this.menuList = list
}, },
SET_BUILDING_LIST(list) { SET_BUILDING_LIST(list) {
this.buildingList = list this.buildingList = list

5
src/store/root/state.js

@ -1,12 +1,9 @@
import { sidebarList } from '@/components/Sidebar/list'
export const state = () => ({ export const state = () => ({
sidebarList,
menuList: [],
is4k: is4k(), is4k: is4k(),
shopList: [], //店铺列表 shopList: [], //店铺列表
buildingList: [], //楼栋列表 buildingList: [], //楼栋列表
indexList: {}, indexList: {},
selectedModule: '', //选择模块
facilityList: [], //设施列表 facilityList: [], //设施列表
language: 'zh', //语言 zh: 简体中文 en: 英文 tw: 繁体中文 language: 'zh', //语言 zh: 简体中文 en: 英文 tw: 繁体中文
config: {}, //配置文件 config: {}, //配置文件

8
src/views/Activities/Activities.vue

@ -12,11 +12,11 @@ import { getActivityList } from '@/http/api'
const activityList = ref([]) const activityList = ref([])
_getActivityList(1)
_getActivityList()
function _getActivityList(type) {
getActivityList(type).then(({ data }) => {
activityList.value = data?.activityList ?? []
function _getActivityList() {
getActivityList().then(({ data }) => {
activityList.value = data ?? []
}) })
} }
</script> </script>

1
src/views/Billboard/Billboard.vue

@ -122,7 +122,6 @@ try {
} }
const goPage = item => { const goPage = item => {
store.SET_SELECTED_MODULE(item.title)
router.push(item.path) router.push(item.path)
} }
watch(shops, (formats, _, onCleanup) => { watch(shops, (formats, _, onCleanup) => {

2
src/views/Guide/Guide.vue

@ -92,7 +92,7 @@ import { storeToRefs } from 'pinia'
import { useStore } from '@/store/root' import { useStore } from '@/store/root'
import { RESET, DIRECTION, list as buttonList } from './list' import { RESET, DIRECTION, list as buttonList } from './list'
import View from '@/layouts/View.vue' import View from '@/layouts/View.vue'
import { hideMapDialog, setShopActive, setShopInactive, showFacility } from '@/composables/useInitMap'
import { hideMapDialog, setShopActive, setShopInactive } from '@/composables/useInitMap'
import { getBrandListByFormat, getBrandListByFloor } from '@/http/brand/api' import { getBrandListByFormat, getBrandListByFloor } from '@/http/brand/api'
import BrandScroll from '@/components/BrandScroll/BrandScroll.vue' import BrandScroll from '@/components/BrandScroll/BrandScroll.vue'
import ScrollView from '@/base/ScrollView/ScrollView.vue' import ScrollView from '@/base/ScrollView/ScrollView.vue'

26
src/views/Index/Index.vue

@ -109,17 +109,17 @@
</div> </div>
<div class="menu"> <div class="menu">
<div class="item" v-for="tab of sidebarList" :key="tab.title" @click="goPage(tab)">
<div class="icon"><img :src="theme.images[tab.moduleName]" /></div>
<div class="title">{{ switchLanguage(tab, 'title') }}</div>
<div class="item" v-for="tab of menuList" :key="tab.id" @click="goPage(tab)">
<div class="icon"><img :src="theme.images[tab.content.moduleName]" /></div>
<div class="title">{{ tab.content.name }}</div>
</div> </div>
</div> </div>
<div class="acts"> <div class="acts">
<EffectFade :list="activityList ?? []">
<EffectFade :list="ads ?? []">
<template v-slot="{ item }"> <template v-slot="{ item }">
<div class="banner-wrapper"> <div class="banner-wrapper">
<img class="banner" :src="config.sourceUrl + item.fileUrl" alt="" />
<div class="name">{{ item.activityName }}</div>
<img class="banner" :src="config.sourceUrl + item.content.pic[0]" alt="" />
<div class="name">{{ item.content.name }}</div>
</div> </div>
</template> </template>
</EffectFade> </EffectFade>
@ -137,7 +137,7 @@ import { useRouter } from 'vue-router'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { useStore } from '@/store/root' import { useStore } from '@/store/root'
import { getBrandList } from '@/http/brand/api' import { getBrandList } from '@/http/brand/api'
import { getActivityList } from '@/http/api'
import { getAD } from '@/http/api'
import View from '@/layouts/View.vue' import View from '@/layouts/View.vue'
import EffectFade from '@/components/EffectFade/EffectFade.vue' import EffectFade from '@/components/EffectFade/EffectFade.vue'
import { useTime } from '@/composables/useTime' import { useTime } from '@/composables/useTime'
@ -156,7 +156,7 @@ const splitBy = (array, chunkSize = 4) => {
const router = useRouter() const router = useRouter()
const store = useStore() const store = useStore()
const { indexList, currentFloor, buildingList, shopList, sidebarList, config, theme } = storeToRefs(store)
const { indexList, currentFloor, buildingList, shopList, menuList, config, theme } = storeToRefs(store)
const guideDesc = ref('') const guideDesc = ref('')
const foodList = computed(() => { const foodList = computed(() => {
const arr = shopList.value.filter(({ isSpecial }) => isSpecial) const arr = shopList.value.filter(({ isSpecial }) => isSpecial)
@ -179,7 +179,7 @@ const recommendShops = computed(() => {
return splitBy(arr) return splitBy(arr)
}) })
const bf = computed(() => (buildingList.length > 1 ? currentFloor.value.building + '-' : '') + currentFloor.value.floor) const bf = computed(() => (buildingList.length > 1 ? currentFloor.value.building + '-' : '') + currentFloor.value.floor)
const activityList = ref([])
const ads = ref([])
const { currentHour } = useTime() const { currentHour } = useTime()
const showFood = computed(() => (currentHour.value >= 11 && currentHour.value < 13) || (currentHour.value >= 17 && currentHour.value < 20)) const showFood = computed(() => (currentHour.value >= 11 && currentHour.value < 13) || (currentHour.value >= 17 && currentHour.value < 20))
@ -189,8 +189,7 @@ getBrandList().then(({ data: { allShopNum, industryFatherList } }) => {
}) })
const goPage = item => { const goPage = item => {
store.SET_SELECTED_MODULE(item.title)
router.push(item.path)
router.push(item.content.path)
} }
const setShopById = id => { const setShopById = id => {
@ -203,9 +202,8 @@ function handleHot(item) {
store.SET_SHOP(shop) store.SET_SHOP(shop)
goPage({ title: 'Guide', path: '/guide' }) goPage({ title: 'Guide', path: '/guide' })
} }
getActivityList(3).then(({ data }) => {
activityList.value = data?.activityList ?? []
console.log(data.activityList)
getAD().then(({ data }) => {
ads.value = data ?? []
}) })
const clearShop = () => { const clearShop = () => {

3
src/views/Mall/Mall.vue

@ -12,8 +12,7 @@ import CarouselWithIntro from '@/components/CarouselWithIntro/CarouselWithIntro.
const mall = ref({}) const mall = ref({})
getMallInfoList().then(({ data }) => { getMallInfoList().then(({ data }) => {
if (!data.title) data.title = '商场介绍'
mall.value = data
mall.value = data[0]?.content
}) })
</script> </script>

2
src/views/Member/Member.vue

@ -14,7 +14,7 @@ _getMemberBenefits()
const benefits = ref({}) const benefits = ref({})
function _getMemberBenefits() { function _getMemberBenefits() {
getMemberBenefits().then(({ data }) => { getMemberBenefits().then(({ data }) => {
benefits.value = data
benefits.value = data[0]?.content
}) })
} }
</script> </script>

2
src/views/Movie/Movie.vue

@ -12,7 +12,7 @@ import CarouselWithIntro from '@/components/CarouselWithIntro/CarouselWithIntro.
const cinema = ref({}) const cinema = ref({})
getCinemaInfo().then(({ data }) => { getCinemaInfo().then(({ data }) => {
cinema.value = { title: data.shopName, content: data.intro, fileList: data.materialList }
cinema.value = { name: data.shopName, desc: data.intro, pics: data.materialList }
}) })
</script> </script>

2
src/views/Parking/Parking.vue

@ -12,7 +12,7 @@ import CarouselWithIntro from '@/components/CarouselWithIntro/CarouselWithIntro.
const park = ref({}) const park = ref({})
getParkingList().then(({ data }) => { getParkingList().then(({ data }) => {
park.value = data
park.value = data[0]?.content
}) })
</script> </script>

Loading…
Cancel
Save