diff --git a/public/static/offline/JSON/GetDevCoordinateByIP.json b/public/static/offline/JSON/GetDevCoordinateByIP.json
index 07fe547..dd0d2a8 100644
--- a/public/static/offline/JSON/GetDevCoordinateByIP.json
+++ b/public/static/offline/JSON/GetDevCoordinateByIP.json
@@ -7,11 +7,12 @@
"label": "windows",
"screenAttribute": "命",
"building": "A栋",
- "buildingCode": 11101,
+ "deviceCode": "11101009",
+ "buildingCode": "11101",
"projectCode": "project-200",
"floor": "L1层",
"floorOrder": 2,
- "floorCode": 11101003,
+ "floorCode": "11101003",
"ip": "192.168.1.134",
"mac": "Excepteur",
"location": "43",
diff --git a/public/static/offline/JSON/config.json b/public/static/offline/JSON/config.json
index fa802bd..80401bb 100644
--- a/public/static/offline/JSON/config.json
+++ b/public/static/offline/JSON/config.json
@@ -2,7 +2,7 @@
"code": "200",
"msg": "",
"data": {
- "interfaceUrl": "https://test.iot.1000my.com/api/guide/v1/web",
+ "interfaceUrl": "https://test.iot.1000my.com/api",
"sourceUrl": "https://test-598d.obs.cn-east-2.myhuaweicloud.com",
"backSocket": "ws://127.0.0.1:7181"
}
diff --git a/public/static/qm/MainMap_QM.js b/public/static/qm/MainMap_QM.js
index 8fd541d..29f55bb 100644
--- a/public/static/qm/MainMap_QM.js
+++ b/public/static/qm/MainMap_QM.js
@@ -313,30 +313,39 @@ ConfigFun = function () {
* "data": []
* }
*/
- this.getInstance = function (callBack, build = 0, floor = 0, navPoint = 1, angle = 0, mallCode = '', _url = 'http://saas.1000my.com:8013') {
+ this.getInstance = function (callBack, build = 0, floor = 0, navPoint = 1, angle = 0, mallCode = 'project-200', _url = 'https://test.iot.1000my.com') {
Config.startObj.build = Config.deviceObj.build = parseInt(build) || 0
Config.startObj.floor = Config.deviceObj.floor = parseInt(floor) || 0
Config.startObj.node = Config.deviceObj.node = parseInt(navPoint) || 1
Config.deviceObj.angle = parseInt(angle) || 0
Config.selectFloor = Config.deviceObj.floor
Config.selectBuild = Config.deviceObj.build
+ Config.mallCode = mallCode
+ Config.cloudUrl = _url
+ let tim = Config.timeStamp();
let backObj = { code: 200, msg: '加载成功', data: [] }
- this.readTextFile(Config.mapServerInfo, function (res) {
- try {
- if (res.data.mallKey != 'Zeditor') {
- Config.allMap = JSON.parse(res.data.mapData)
- } else {
- Config.allMap = JSON.parse(LZString.decompressFromBase64(res.data.mapData))
+ Config.requestNoJM({
+ method: "GET",
+ url: Config.cloudUrl + '/api/guide/v1/web/getMallMapData/'+Config.mallCode +'/Aeditor?time=' + tim,
+ success: (res) => {
+ try {
+ if (res.data.mallKey != 'Zeditor') {
+ Config.allMap = JSON.parse(res.data.mapData)
+ } else {
+ Config.allMap = JSON.parse(LZString.decompressFromBase64(res.data.mapData))
+ }
+ } catch (e) {
+ backObj.code = 404
+ backObj.msg = '地图数据JSON格式错误'
+ callBack(backObj)
+ callBack = null
}
- } catch (e) {
- backObj.code = 404
- backObj.msg = '地图数据JSON格式错误'
- callBack(backObj)
- callBack = null
- }
- //console.log(Config.allMap);
- Config.getShopData(callBack)
- })
+ //console.log(Config.allMap);
+ Config.getShopData(callBack)
+ },
+ fail: () => {}
+ });
+
}
/*** ----------------------------------------------- 参数 API END ----------------------------------------------- **** */
this.Point = function (x = 0, y = 0) {
@@ -398,9 +407,7 @@ ConfigFun = function () {
params.fail()
}
xmlhttp.open(params.method, params.url, true)
- //xmlhttp.setRequestHeader("Access-Control-Allow-Origin", "*");
xmlhttp.setRequestHeader('Content-type', 'application/json')
- //xmlhttp.setRequestHeader("Access-Control-Allow-Method", "POST,GET");
xmlhttp.send(params.data)
}
this.requestNoJM = function (params) {
@@ -425,9 +432,7 @@ ConfigFun = function () {
params.fail()
}
xmlhttp.open(params.method, params.url, true)
- //xmlhttp.setRequestHeader("Access-Control-Allow-Origin", "*");
- // xmlhttp.setRequestHeader('Content-Type', 'application/json')
- //xmlhttp.setRequestHeader("Access-Control-Allow-Method", "POST,GET");
+ xmlhttp.setRequestHeader('projectCode', Config.mallCode);
xmlhttp.send(params.data)
}
@@ -1496,7 +1501,7 @@ ConfigFun = function () {
let backObj = { code: 200, msg: '加载成功', data: [] }
Config.requestNoJM({
method: 'GET',
- url: 'https://test.iot.1000my.com/api/guide/v1/web/getMapInfo?projectCode=' + 'project-200',
+ url: Config.cloudUrl + '/api/guide/v1/web/getMapInfo?projectCode=' + Config.mallCode,
success: res => {
if (res.code == '200') {
Config.shopData = res.data.shopList
@@ -4631,19 +4636,19 @@ MainMap_QM.prototype = {
* Map_QM.changeWindowResize(1280,1080);
*/
changeWindowResize: function (width = -1, height = -1) {
- aspect = width / height
- cameraPerspective.aspect = aspect
- cameraPerspective.updateProjectionMatrix()
- cameraOrtho.left = (340 * aspect) / -2
- cameraOrtho.right = (340 * aspect) / 2
- cameraOrtho.top = 340 / 2
- cameraOrtho.bottom = 340 / -2
- cameraOrtho.updateProjectionMatrix()
-
- Map_QM.renderer.setSize(width, height)
- Map_QM.labelRenderer.setSize(width, height)
- Map_QM.w = width
- Map_QM.h = height
+ aspect = width/height;
+ cameraPerspective.aspect = aspect;
+ cameraPerspective.updateProjectionMatrix();
+ cameraOrtho.left = 340 * aspect / -2;
+ cameraOrtho.right = 340 * aspect / 2;
+ cameraOrtho.top = 340/2;
+ cameraOrtho.bottom = 340/-2;
+ cameraOrtho.updateProjectionMatrix();
+
+ Map_QM.renderer.setSize(width, height);
+ Map_QM.labelRenderer.setSize(width, height);
+ Map_QM.w = width;
+ Map_QM.h = height;
}
}
Object.assign(MainMap_QM.prototype, THREE.EventDispatcher.prototype)
diff --git a/src/assets/scss/variables.scss b/src/assets/scss/variables.scss
index 58eff75..1a846ae 100644
--- a/src/assets/scss/variables.scss
+++ b/src/assets/scss/variables.scss
@@ -26,7 +26,7 @@
--color-linear-lightgoldenyellow: linear-gradient(90deg, #ffbd35 0%, #ffd260 100%);
--color-linear-goldenyellow: linear-gradient(90deg, #f6a62c 0%, #ffbc3f 100%);
--color-linear-golden: linear-gradient(117deg, #c99e6b 0%, #e2c894 100%);
- --color-linear-pink: linear-gradielinear-gradient(96.8deg, #e2acbc 3%, #ffece8 100%);
+ --color-linear-pink: linear-gradient(96.8deg, #e2acbc 3%, #ffece8 100%);
--color-linear-lightyellow: linear-gradient(96deg, #dcc7a7 3%, #f1ddc5 100%);
--color-linear-blue: linear-gradient(96.8deg, #acc2e2 2.93%, #ddf0fe 100%);
diff --git a/src/components/BrandDetail/BrandDetail.vue b/src/components/BrandDetail/BrandDetail.vue
index ed686e7..47bd06c 100644
--- a/src/components/BrandDetail/BrandDetail.vue
+++ b/src/components/BrandDetail/BrandDetail.vue
@@ -83,7 +83,7 @@
147¥/人
- {{ $t('join') }}
+ {{ $t('join') }}
@@ -91,12 +91,15 @@
+
+
+
+
+
diff --git a/src/composables/useHandleScreen.js b/src/composables/useHandleScreen.js
index c3aadcc..3cba765 100644
--- a/src/composables/useHandleScreen.js
+++ b/src/composables/useHandleScreen.js
@@ -2,6 +2,7 @@ import { reactive, onMounted, toRefs, computed } from 'vue'
import { getBackTime } from '@/http/api'
import { useStore } from '@/store/root'
import { useRouter } from 'vue-router'
+import { useStatistics } from '@/composables/useStatistics'
export const useHandleScreen = callback => {
const router = useRouter()
@@ -122,6 +123,7 @@ export const useHandleScreen = callback => {
//超过一分钟未操作回到首页
const checkHandleScreen = () => {
+ useStatistics('device')
clearInterval(state.timer)
clearInterval(state.wallTimer)
clearTimeout(state.autoTimer)
@@ -132,11 +134,11 @@ export const useHandleScreen = callback => {
state.isWall = false
state.autoTimer = setTimeout(async () => {
if (state.times[0] !== 0) {
- if (router.currentRoute.value.fullPath !== '/') {
+ if (router.currentRoute.value.fullPath !== '/index') {
await indexPromise()
}
- if ((state.times[1] === 0 && router.currentRoute.value.fullPath === '/') || (state.times[0] === 0 && state.times[1] === 0)) {
+ if ((state.times[1] === 0 && router.currentRoute.value.fullPath === '/index') || (state.times[0] === 0 && state.times[1] === 0)) {
await rootPromise()
callback && callback()
}
@@ -154,7 +156,7 @@ export const useHandleScreen = callback => {
initWebSocket()
}
- // onMounted(initMessage)
+ onMounted(initMessage)
return { ...toRefs(state), checkHandleScreen, send }
}
diff --git a/src/composables/useInitMap.js b/src/composables/useInitMap.js
index 23f62a2..643254d 100644
--- a/src/composables/useInitMap.js
+++ b/src/composables/useInitMap.js
@@ -8,16 +8,16 @@ export const useInitMap = function () {
//初始化地图
// onReady(store.currentFloor, () => {
// const facilityList = window.Map_QM.getAllIcon().flat(Infinity)
-
+ //
// const list = facilityList.map(item => {
// item.imgUrl.replace('./', '/')
// return item
// })
-
+ //
// window.Map_QM.addEventListener('shop', onClickShop, false)
-
+ //
// store.SET_FACILITY_LIST(uniqBy(list, 'type'))
-
+ //
// window.Map_QM.renderer.domElement.addEventListener('webglcontextlost', onContextLost)
// })
}
diff --git a/src/composables/useStatistics.js b/src/composables/useStatistics.js
new file mode 100644
index 0000000..4a3a96a
--- /dev/null
+++ b/src/composables/useStatistics.js
@@ -0,0 +1,18 @@
+import { storeToRefs } from 'pinia'
+import { useStore } from '@/store/root'
+import { getStatistics } from '@/http/api'
+
+/**
+ * @param {string} tag 设备点击量:device,导航使用次数:navigation,店铺点击次数:shop,业态点击次数:industry
+ */
+export const useStatistics = tag => {
+ const store = useStore()
+ const { currentFloor } = storeToRefs(store)
+ const { projectCode, deviceCode } = currentFloor.value
+ const params = {
+ projectCode,
+ deviceCode,
+ tag
+ }
+ getStatistics(params)
+}
diff --git a/src/http/api.js b/src/http/api.js
index 64caef4..60f4cba 100644
--- a/src/http/api.js
+++ b/src/http/api.js
@@ -2,43 +2,46 @@ import { post, get } from './http'
import { url } from '@/http/config'
//首页热搜及卡片
-export const getIndexList = () => get(`${url().interfaceUrl}/index`)
+export const getIndexList = () => get(`${url().interfaceUrl}/guide/v1/web/index`)
//获取活动 1商场活动;2品牌活动;3会员活动
-export const getActivityList = type => get(`${url().interfaceUrl}/getActivityList/${type}`)
+export const getActivityList = type => get(`${url().interfaceUrl}/guide/v1/web/getActivityList/${type}`)
//获取会员权益
-export const getMemberBenefits = () => get(`${url().interfaceUrl}/getMemberInterests`)
+export const getMemberBenefits = () => get(`${url().interfaceUrl}/guide/v1/web/getMemberInterests`)
//获取停车场数据
-export const getParkingList = () => get(`${url().interfaceUrl}/getParkingInfo`)
+export const getParkingList = () => get(`${url().interfaceUrl}/guide/v1/web/getParkingInfo`)
//瀑布流
-export const getWaterfallList = type => get(`${url().interfaceUrl}/getColumnList/${type}`)
+export const getWaterfallList = type => get(`${url().interfaceUrl}/guide/v1/web/getColumnList/${type}`)
//获取服务信息
-export const getServeList = () => get(`${url().interfaceUrl}/getServeList`)
+export const getServeList = () => get(`${url().interfaceUrl}/guide/v1/web/getServeList`)
//获取 周边交通图片
-export const getTrafficList = () => get(`${url().interfaceUrl}/getMallTraffic`)
+export const getTrafficList = () => get(`${url().interfaceUrl}/guide/v1/web/getMallTraffic`)
//获取品牌喜欢数量
-export const getBrandLikesNumber = shopId => get(`${url().interfaceUrl}/getBrandStar?shopId=${shopId}`)
+export const getBrandLikesNumber = shopId => get(`${url().interfaceUrl}/guide/v1/web/getBrandStar?shopId=${shopId}`)
//设置品牌喜欢数量
-export const setBrandLikesNumber = shopId => get(`${url().interfaceUrl}/setBrandStar?shopId=${shopId}`)
+export const setBrandLikesNumber = shopId => get(`${url().interfaceUrl}/guide/v1/web/setBrandStar?shopId=${shopId}`)
//获取 影院信息
-export const getCinemaInfo = () => get(`${url().interfaceUrl}/getCinemaInfo`)
+export const getCinemaInfo = () => get(`${url().interfaceUrl}/guide/v1/web/getCinemaInfo`)
//获取商场介绍
-export const getMallInfoList = () => get(`${url().interfaceUrl}/getMallInfo`)
+export const getMallInfoList = () => get(`${url().interfaceUrl}/guide/v1/web/getMallInfo`)
//是否显示语音
-export const getIsShowVoiceBtn = () => get(`${url().interfaceUrl}/getMallVoice`)
+export const getIsShowVoiceBtn = () => get(`${url().interfaceUrl}/guide/v1/web/getMallVoice`)
+
+//获取跳转时间
+export const getBackTime = () => get(`${url().interfaceUrl}/guide/v1/web/getHomeJump`)
//获取地图导览数据
-export const getGuideList = () => get(`${url().interfaceUrl}/getMapInfo`)
+export const getGuideList = () => get(`${url().interfaceUrl}/guide/v1/web/getMapInfo`)
//获取配置项
export const getConfig = () => get('/static/offline/JSON/config.json')
@@ -48,3 +51,6 @@ export const getCurrentFloor = () => get(`/static/offline/JSON/GetDevCoordinateB
//手写地址
export const getHandWriting = params => post('http://saas.1000my.com:8014/words', params)
+
+//数据统计
+export const getStatistics = params => post(`${url().interfaceUrl}/analysis/v1/web/deviceUseClickDataUpload`, params)
diff --git a/src/http/brand/api.js b/src/http/brand/api.js
index ee03a10..38c6100 100644
--- a/src/http/brand/api.js
+++ b/src/http/brand/api.js
@@ -2,10 +2,10 @@ import { get } from '@/http/http'
import { url } from '@/http/config'
//获取品牌数据
-export const getBrandList = () => get(`${url().interfaceUrl}/getBrandShopList`)
+export const getBrandList = () => get(`${url().interfaceUrl}/guide/v1/web/getBrandShopList`)
// //获取品牌模块通过业态排序的品牌列表
-export const getBrandListByFormat = () => get(`${url().interfaceUrl}/getBrandShopListByIndustryId`)
+export const getBrandListByFormat = () => get(`${url().interfaceUrl}/guide/v1/web/getBrandShopListByIndustryId`)
// //获取品牌模块通过楼层排序的品牌列表QueryRecommendShopList
-export const getBrandListByFloor = () => get(`${url().interfaceUrl}/getBrandShopListByFloor`)
+export const getBrandListByFloor = () => get(`${url().interfaceUrl}/guide/v1/web/getBrandShopListByFloor`)
diff --git a/src/http/http.js b/src/http/http.js
index aff2192..734f520 100644
--- a/src/http/http.js
+++ b/src/http/http.js
@@ -5,26 +5,13 @@ axios.defaults.timeout = 10000
axios.interceptors.request.use(
config => {
- try {
- //添加时间戳 防止访问json文件出现缓存
- if (/get/i.test(config.method) && /\.json$/i.test(config.url)) {
- config.params = config.params || {}
- config.params.t = Date.parse(new Date()) / 1000
- }
-
- //请求类型不是json文件
- if (!/\.json$/i.test(config.url)) {
- const store = useStore()
- const hasCode = store.currentFloor?.projectCode
- //处理拼接符号 一开始有 '?' 说明已有query params 需要把符号改成'&'
- const code = `${config.url.includes('?') ? '&' : '?'}projectCode=${store.currentFloor.projectCode}`
- Object.assign(config, {
- url: hasCode ? `${config.url}${code}` : config.url
- })
- }
- } catch (error) {
- console.log('error: ', error)
+ //添加时间戳 防止访问json文件出现缓存
+ if (/get/i.test(config.method) && /\.json$/i.test(config.url)) {
+ config.params = config.params || {}
+ config.params.t = Date.parse(new Date()) / 1000
}
+ const store = useStore()
+ config.headers['projectCode'] = store.currentFloor.projectCode
return config
},
diff --git a/src/router/index.js b/src/router/index.js
index 95eb4e2..e245a59 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -35,7 +35,8 @@ router.beforeEach(async to => {
if (!router.hasRoute('home')) {
//推荐卡片列表长度为0时说明不需要推荐页面 直接从导航栏列表删除
if (!data.columnList.length) {
- store.sidebarList.splice(0, 1)
+ const list = store.sidebarList.slice()
+ store.SET_SIDEBAR_LIST(list.splice(0, 1))
}
//store存储的首页卡片数据长度不等于请求的卡片数据长度时才能去重新提交到store中 防止重复提交
if (store.indexList?.columnList?.length !== data.columnList.length) {
diff --git a/src/store/root/actions.js b/src/store/root/actions.js
index 06b6893..865ae96 100644
--- a/src/store/root/actions.js
+++ b/src/store/root/actions.js
@@ -10,6 +10,9 @@ export const actions = {
SET_INDEX_LIST(list) {
this.indexList = list
},
+ SET_SIDEBAR_LIST(list) {
+ this.sidebarList = list
+ },
SET_BUILDING_LIST(list) {
this.buildingList = list
},
diff --git a/src/store/root/state.js b/src/store/root/state.js
index 8d6dcc0..72b1722 100644
--- a/src/store/root/state.js
+++ b/src/store/root/state.js
@@ -2,6 +2,7 @@ import { sidebarList } from '@/components/Sidebar/list'
export const state = () => ({
sidebarList,
+ is4k: is4k(),
shopList: [], //店铺列表
buildingList: [], //楼栋列表
indexList: {},
@@ -15,5 +16,12 @@ export const state = () => ({
showDetail: false, //是否显示详情
currentFloor: {}, //设备所属的当前楼栋的当前楼层信息
isUseFace: 0, //是否使用人脸 0:不使用 1: 使用
- isUseSpeech: 0 //是否使用语音 0:不使用 1: 使用
+ isUseSpeech: 1 //是否使用语音 0:不使用 1: 使用
})
+
+export const is4k = () => {
+ const retinaList = [2160 * 3840, 3840 * 2160]
+ const width = window.screen.width
+ const height = window.screen.height
+ return retinaList.includes(width * height)
+}
diff --git a/src/views/Brand/Brand.vue b/src/views/Brand/Brand.vue
index 12bf165..309e2ce 100644
--- a/src/views/Brand/Brand.vue
+++ b/src/views/Brand/Brand.vue
@@ -35,6 +35,7 @@
+
@@ -49,12 +50,15 @@ import Industry from '@/components/Industry/Industry.vue'
import Tabs from '@/components/Tabs/Tabs.vue'
import BrandRecommend from '@/components/BrandRecommend/BrandRecommend.vue'
import BrandScroll from '@/components/BrandScroll/BrandScroll.vue'
+import { useStatistics } from '@/composables/useStatistics'
const ALL_BRAND = '全部品牌'
const store = useStore()
const { config, currentFloor, shopList } = storeToRefs(store)
+useStatistics('industry')
+
const selectedList = ref([])
const formatList = ref([])
const recommendList = ref([])
diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue
index 887360c..39408fe 100644
--- a/src/views/Guide/Guide.vue
+++ b/src/views/Guide/Guide.vue
@@ -288,16 +288,7 @@ watch(
right: 24px;
top: 854px;
z-index: 51;
- &::before {
- content: '';
- position: absolute;
- width: 1px;
- height: 24px;
- top: 40px;
- left: 256px;
- background: var(--color-black-opacity-1);
- border-radius: 2px;
- }
+
.hands {
position: fixed;
top: 37px;
diff --git a/src/views/Nav/Nav.vue b/src/views/Nav/Nav.vue
index 5781af3..c7efb49 100644
--- a/src/views/Nav/Nav.vue
+++ b/src/views/Nav/Nav.vue
@@ -50,6 +50,7 @@ import { Refresh } from '@/base/Svg'
import PassShop from './children/PassShop.vue'
import Temperature from '@/base/Temperature/Temperature.vue'
import Time from '@/base/Time/Time.vue'
+import { useStatistics } from '@/composables/useStatistics'
const store = useStore()
const { shop, currentFloor, config } = storeToRefs(store)
@@ -59,6 +60,8 @@ const { directionInfo, pathShopList, backPathArray } = useStartNavi(shop, curren
const { methodIdx, handleControl } = useChangeNavMethod(backPathArray)
const { cameraViewsImage, setCameraViews } = useSetCameraViews(pause)
+useStatistics('navigation')
+
window.Map_QM.changeWindowResize(1366, 1080)
onBeforeUnmount(() => {
diff --git a/src/views/Nav/children/PassShop.vue b/src/views/Nav/children/PassShop.vue
index 90b7a68..615ef76 100644
--- a/src/views/Nav/children/PassShop.vue
+++ b/src/views/Nav/children/PassShop.vue
@@ -277,6 +277,7 @@ defineProps({
position: relative;
flex: 1;
overflow: hidden;
+ height: 640px;
:deep(.bscroll-vertical-scrollbar) {
right: 50px !important;
top: 16px !important;